Update README.md
Browse files
README.md
CHANGED
@@ -152,7 +152,7 @@ for dt in tqdm(datasets):
|
|
152 |
|
153 |
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
|
154 |
|
155 |
-
outputs = model.generate(**inputs, max_new_tokens =
|
156 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n### 回答')[-1]
|
157 |
|
158 |
results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
|
|
|
152 |
|
153 |
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
|
154 |
|
155 |
+
outputs = model.generate(**inputs, max_new_tokens = 512, use_cache = True, do_sample=False, repetition_penalty=1.2)
|
156 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n### 回答')[-1]
|
157 |
|
158 |
results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
|