diff --git a/chapters/en/chapter1/3.mdx b/chapters/en/chapter1/3.mdx index 7efc4ef8e..c0e1ad5b1 100644 --- a/chapters/en/chapter1/3.mdx +++ b/chapters/en/chapter1/3.mdx @@ -146,10 +146,10 @@ generator("In this course, we will teach you how to") 'HTTP'}] ``` -You can control how many different sequences are generated with the argument `num_return_sequences` and the total length of the output text with the argument `max_length`. +You can control how many different sequences are generated with the argument `num_return_sequences` and the maximum number of newly generated tokens with the argument `max_new_tokens`. > [!TIP] -> ✏️ **Try it out!** Use the `num_return_sequences` and `max_length` arguments to generate two sentences of 15 words each. +> ✏️ **Try it out!** Use the `num_return_sequences` and `max_new_tokens` arguments to generate two sequences with at most 15 new tokens each. ## Using any model from the Hub in a pipeline[[using-any-model-from-the-hub-in-a-pipeline]] @@ -163,7 +163,7 @@ from transformers import pipeline generator = pipeline("text-generation", model="HuggingFaceTB/SmolLM2-360M") generator( "In this course, we will teach you how to", - max_length=30, + max_new_tokens=30, num_return_sequences=2, ) ```