ageron / ageron/handson-ml2

(Chapter 16, question 11) How to generate shakespearean text using BERT?

Offen
#125 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
30k
Forks
13.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi, first, the book is amazing!

I have question about the NLP chapter (16). In the 11th question you asked to generate shakespearean text with "one of the recent language models (e.g. BERT) to generate more convincing shakespearean text".

How is it possible to generate sentences using BERT?

BERT is transformer-encoder, meaning it looks at the whole sentence, and not just what came before the current word (not like GPT that is transformer-decoder, meaning it looks only at the previous words, and try to guess the next word).

I read that BERT is also trained for next sentence prediction. And what I understand, is that I give BERT two sentences, and it try to guess if sentence two can complete sentence one.
This is not the case with generating new text.

As I missing something?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.