Update README.md
Browse files
README.md
CHANGED
@@ -71,7 +71,7 @@ model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
|
71 |
print(f"Formatted text:\n {text}")
|
72 |
print(f"Model input:\n {model_inputs}")
|
73 |
|
74 |
-
generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512, do_sample=True)
|
75 |
generated_ids = [
|
76 |
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
77 |
]
|
|
|
71 |
print(f"Formatted text:\n {text}")
|
72 |
print(f"Model input:\n {model_inputs}")
|
73 |
|
74 |
+
generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512, do_sample=True, eos_token_id=tokenizer.eos_token_id)
|
75 |
generated_ids = [
|
76 |
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
77 |
]
|