bofenghuang
commited on
Commit
•
5e1fdb1
1
Parent(s):
d448eb1
Update readme
Browse files
README.md
CHANGED
@@ -52,6 +52,8 @@ generated_outputs = model.generate(
|
|
52 |
max_new_tokens=512,
|
53 |
),
|
54 |
return_dict_in_generate=True,
|
|
|
|
|
55 |
)
|
56 |
generated_tokens = generated_outputs.sequences[0, input_length:]
|
57 |
generated_text = tokenizer.decode(generated_tokens, skip_special_tokens=True)
|
|
|
52 |
max_new_tokens=512,
|
53 |
),
|
54 |
return_dict_in_generate=True,
|
55 |
+
pad_token_id=tokenizer.eos_token_id,
|
56 |
+
eos_token_id=tokenizer.eos_token_id,
|
57 |
)
|
58 |
generated_tokens = generated_outputs.sequences[0, input_length:]
|
59 |
generated_text = tokenizer.decode(generated_tokens, skip_special_tokens=True)
|