text generation #2874
Replies: 4 comments 2 replies
-
Text generation is autoregressive, so you have to generate a single token at a time. Take a look at the llama generation example for example. |
Beta Was this translation helpful? Give feedback.
-
What's the relationship between transformer example and llama generation example? In my opinion, llama is a model based on transformer. |
Beta Was this translation helpful? Give feedback.
-
Yep! Llama is a model formed by decoder-only transformer blocks. I was linking to the llama generation example simply because it illustrates the autoregressive inference process.
Not yet 👀 it would be a great addition. |
Beta Was this translation helpful? Give feedback.
-
@laggui Is the result the same as your test ? |
Beta Was this translation helpful? Give feedback.
-
Hi,
In the example of text-generation (https://github.com/tracel-ai/burn/tree/main/examples/text-generation), only the training process was performed. How to generate a new text ? I think the principle of generation is a bit different from training, because we can only generate new words one by one, so we cannot use attention mask during text generation. But during training, we can use attention mask to speedup the training parallelized becuase we have already known the whole text sequence.
Beta Was this translation helpful? Give feedback.
All reactions