Skip to content

Commit 7188b5c

Browse files
committed
📝 Add max_new_tokens in example
1 parent ddba53b commit 7188b5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎packages/inference/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ await hf.textGeneration({
7878

7979
for await (const output of hf.textGenerationStream({
8080
model: "google/flan-t5-xxl",
81-
inputs: 'repeat "one two three four"'
81+
inputs: 'repeat "one two three four"',
82+
parameters: { max_new_tokens: 250 }
8283
})) {
8384
console.log(output.token.text, output.generated_text);
8485
}

0 commit comments

Comments
 (0)