Update README.md
Browse files
README.md
CHANGED
|
@@ -55,7 +55,7 @@ prompt = "Question: What is the capital of United Kingdom?\nAnswer:"
|
|
| 55 |
input_ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)
|
| 56 |
|
| 57 |
with torch.no_grad():
|
| 58 |
-
output_ids = model.generate(input_ids, max_new_tokens=
|
| 59 |
|
| 60 |
print(tokenizer.decode(output_ids[0].tolist()))
|
| 61 |
```
|
|
|
|
| 55 |
input_ids = torch.tensor([tokenizer.encode(prompt)], dtype=torch.long)
|
| 56 |
|
| 57 |
with torch.no_grad():
|
| 58 |
+
output_ids = model.generate(input_ids, max_new_tokens=3, do_sample=False)
|
| 59 |
|
| 60 |
print(tokenizer.decode(output_ids[0].tolist()))
|
| 61 |
```
|