Update README.md
Browse files
README.md
CHANGED
@@ -63,12 +63,12 @@ results = []
|
|
63 |
for dt in tqdm(datasets):
|
64 |
input = dt["input"]
|
65 |
|
66 |
-
prompt = f"""###
|
67 |
|
68 |
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
|
69 |
|
70 |
outputs = model.generate(**inputs, max_new_tokens = 512, use_cache = True, do_sample=False, repetition_penalty=1.2)
|
71 |
-
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n###
|
72 |
|
73 |
results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
|
74 |
|
|
|
63 |
for dt in tqdm(datasets):
|
64 |
input = dt["input"]
|
65 |
|
66 |
+
prompt = f"""### 指示\n{input}\n\n### 回答\n"""
|
67 |
|
68 |
inputs = tokenizer([prompt], return_tensors = "pt").to(model.device)
|
69 |
|
70 |
outputs = model.generate(**inputs, max_new_tokens = 512, use_cache = True, do_sample=False, repetition_penalty=1.2)
|
71 |
+
prediction = tokenizer.decode(outputs[0], skip_special_tokens=True).split('\n### 回答\n')[-1]
|
72 |
|
73 |
results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
|
74 |
|