06Chapter 06 of 09· 6 min · , and chat models today
and
The first had two parts: an and a . is the rule: each new word is mixed only from the input and the words already written.
The first model was built for translation. The read the source sentence. The wrote the target sentence one word at a time. It used the result and the words it had already written.
is a rule on
At each step, on words that have not been written yet is set to 0%. Those words add nothing this step. The current word is mixed from the result and the words already written.
During training, the full target sentence is already there. makes training match writing: each prediction is made only from what came before, which is how the model writes when it produces a reply.
· input
Available at every step.
· output
Writing “le”.
| Writing | Encoder | Decoder | ||
|---|---|---|---|---|
| the | cat | le | chat | |
| le | used | used | masked | masked |
| chat | used | used | used | masked |
Writing “le”. can use “the” and “cat”. “le” and “chat” have 0% and add none of the mix.
Chat models you use today are mostly -only. The prompt and the reply are one . The same rule applies: when the model writes the 12th word, the 13th word is still unwritten, so its share is 0%.
Quiz
9 questions
Before moving forward, test your knowledge of what you’ve just learned!
1.Why mask future tokens in the decoder?
2.A typical chat model is mostly:
3.The encoder:
4.The decoder:
5.A weight of 0% in masking means:
6.During training the full target sequence is present. Masking:
7.When writing “chat” in the translation “the cat” → “le chat”, attention can use:
8.When the model writes the 12th word of a reply:
9.A demonstration teaches the decoder:
0 of 9 answered
6 / 9