VictorSanh
commited on
Commit
•
65215b0
1
Parent(s):
dff8ac8
`eos_token_id`
Browse files
README.md
CHANGED
@@ -158,7 +158,7 @@ inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
|
|
158 |
|
159 |
|
160 |
# Generate
|
161 |
-
generated_ids = model.generate(**inputs, bad_words_ids=BAD_WORDS_IDS, max_new_tokens=500)
|
162 |
generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
163 |
|
164 |
print(generated_texts)
|
@@ -209,7 +209,7 @@ inputs = {k: v.to(DEVICE) for k, v in inputs.items()}
|
|
209 |
|
210 |
|
211 |
# Generate
|
212 |
-
generated_ids = model.generate(**inputs, bad_words_ids=BAD_WORDS_IDS, max_new_tokens=500)
|
213 |
generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
214 |
|
215 |
print(generated_texts)
|
|
|
158 |
|
159 |
|
160 |
# Generate
|
161 |
+
generated_ids = model.generate(**inputs, bad_words_ids=BAD_WORDS_IDS, eos_token_id=EOS_WORDS_IDS, max_new_tokens=500)
|
162 |
generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
163 |
|
164 |
print(generated_texts)
|
|
|
209 |
|
210 |
|
211 |
# Generate
|
212 |
+
generated_ids = model.generate(**inputs, bad_words_ids=BAD_WORDS_IDS, eos_token_id=EOS_WORDS_IDS, max_new_tokens=500)
|
213 |
generated_texts = processor.batch_decode(generated_ids, skip_special_tokens=True)
|
214 |
|
215 |
print(generated_texts)
|