taka00770078
commited on
Commit
•
11e6230
1
Parent(s):
397ae60
Update
Browse files
README.md
CHANGED
@@ -257,7 +257,7 @@ for dt in tqdm(datasets):
|
|
257 |
|
258 |
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
|
259 |
|
260 |
-
outputs = model.generate(**inputs, max_new_tokens =
|
261 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n### 回答')[-1]
|
262 |
|
263 |
results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
|
|
|
257 |
|
258 |
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
|
259 |
|
260 |
+
outputs = model.generate(**inputs, max_new_tokens = 2048, use_cache = True, do_sample=False, repetition_penalty=1.2)
|
261 |
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n### 回答')[-1]
|
262 |
|
263 |
results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
|