casperhansen commited on
Commit
344ed4c
·
1 Parent(s): 6c03407

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -2
README.md CHANGED
@@ -61,6 +61,5 @@ print('generating...')
61
  # or you can also use pipeline
62
  streamer = TextStreamer(tokenizer, skip_special_tokens=True)
63
  tokens = tokenizer(prompt, return_tensors="pt").to(model.device)
64
- output = model.generate(**tokens, max_length=512, streamer=streamer)
65
-
66
  ```
 
61
  # or you can also use pipeline
62
  streamer = TextStreamer(tokenizer, skip_special_tokens=True)
63
  tokens = tokenizer(prompt, return_tensors="pt").to(model.device)
64
+ output = model.generate(**tokens, max_length=512, streamer=streamer, eos_token_id=tokenizer.eos_token_id)
 
65
  ```