princeton-nlp
commited on
Commit
•
c2d0a06
1
Parent(s):
10bef66
Update README.md
Browse files
README.md
CHANGED
@@ -48,7 +48,10 @@ generator = pipeline(
|
|
48 |
model_kwargs={"torch_dtype": torch.bfloat16},
|
49 |
device="cuda",
|
50 |
)
|
51 |
-
outputs = generator([{"role": "user", "content": "What's the difference between llamas and alpacas?"}],
|
|
|
|
|
|
|
52 |
print(outputs[0]['generated_text'])
|
53 |
```
|
54 |
|
|
|
48 |
model_kwargs={"torch_dtype": torch.bfloat16},
|
49 |
device="cuda",
|
50 |
)
|
51 |
+
outputs = generator([{"role": "user", "content": "What's the difference between llamas and alpacas?"}],
|
52 |
+
do_sample=False,
|
53 |
+
eos_token_id=[generator.tokenizer.convert_tokens_to_ids("<end_of_turn>"), generator.tokenizer.eos_token_id],
|
54 |
+
max_new_tokens=200)
|
55 |
print(outputs[0]['generated_text'])
|
56 |
```
|
57 |
|