Better sampling parameters in example
Browse files
README.md
CHANGED
|
@@ -116,7 +116,7 @@ messages = [
|
|
| 116 |
{"role": "user", "content": "Wie viele Hände hat ein normaler Mensch?"}
|
| 117 |
]
|
| 118 |
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt", add_generation_prompt=True).to(device)
|
| 119 |
-
outputs = model.generate(inputs, max_new_tokens=256, do_sample=True, temperature=0.
|
| 120 |
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
|
| 121 |
```
|
| 122 |
## Training and evaluation data
|
|
|
|
| 116 |
{"role": "user", "content": "Wie viele Hände hat ein normaler Mensch?"}
|
| 117 |
]
|
| 118 |
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt", add_generation_prompt=True).to(device)
|
| 119 |
+
outputs = model.generate(inputs, max_new_tokens=256, do_sample=True, temperature=0.3, top_p=0.9, repetition_penalty=1.2)
|
| 120 |
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
|
| 121 |
```
|
| 122 |
## Training and evaluation data
|