LemiSt commited on
Commit
913c26f
·
verified ·
1 Parent(s): a0a20a4

Better sampling parameters in example

Browse files
Files changed (1) hide show
  1. README.md +1 -1
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.5, top_p=0.9)
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