Commit 9e9b8a09 authored by Yu Shi Jie's avatar Yu Shi Jie
Browse files

changed choices -> options in yaml config to fit dataset schema

parent ad01e887
...@@ -4,7 +4,7 @@ fewshot_split: dev ...@@ -4,7 +4,7 @@ fewshot_split: dev
fewshot_config: fewshot_config:
sampler: first_n sampler: first_n
doc_to_text: "Question: {{question.strip()}}\nAnswer:" doc_to_text: "Question: {{question.strip()}}\nAnswer:"
doc_to_choice: "{{choices}}" doc_to_choice: "{{options}}"
doc_to_target: "{{answer}}" doc_to_target: "{{answer}}"
metadata: metadata:
version: 0.0 version: 0.0
...@@ -4,7 +4,7 @@ fewshot_split: dev ...@@ -4,7 +4,7 @@ fewshot_split: dev
fewshot_config: fewshot_config:
sampler: first_n sampler: first_n
output_type: multiple_choice output_type: multiple_choice
doc_to_text: "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}\nE. {{choices[4]}}\nF. {{choices[5]}}\nG. {{choices[6]}}\nH. {{choices[7]}}\nI. {{choices[8]}}\nJ. {{choices[9]}}\nAnswer:" doc_to_text: "{{question.strip()}}\nA. {{options[0]}}\nB. {{options[1]}}\nC. {{options[2]}}\nD. {{options[3]}}\nE. {{options[4]}}\nF. {{options[5]}}\nG. {{options[6]}}\nH. {{options[7]}}\nI. {{options[8]}}\nJ. {{options[9]}}\nAnswer:"
doc_to_choice: ["A", "B", "C", "D", "E","F","G","H","I","J"] doc_to_choice: ["A", "B", "C", "D", "E","F","G","H","I","J"]
doc_to_target: answer doc_to_target: answer
metric_list: metric_list:
......
...@@ -5,7 +5,7 @@ fewshot_split: dev ...@@ -5,7 +5,7 @@ fewshot_split: dev
fewshot_config: fewshot_config:
sampler: first_n sampler: first_n
output_type: generate_until output_type: generate_until
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}} (E) {{choices[4]}} (F) {{choices[5]}} (G) {{choices[6]}} (H) {{choices[7]}} (I) {{choices[8]}} (J) {{choices[9]}}\nA: Let's think step by step." doc_to_text: "Q: {{question.strip()}}\n(A) {{options[0]}} (B) {{options[1]}} (C) {{options[2]}} (D) {{options[3]}} (E) {{options[4]}} (F) {{options[5]}} (G) {{options[6]}} (H) {{options[7]}} (I) {{options[8]}} (J) {{options[9]}}\nA: Let's think step by step."
doc_to_target: "{{['(A)', '(B)', '(C)', '(D)', '(E)', '(F)', '(G)', '(H)', '(I)', '(J)'][answer]}}" doc_to_target: "{{['(A)', '(B)', '(C)', '(D)', '(E)', '(F)', '(G)', '(H)', '(I)', '(J)'][answer]}}"
filter_list: filter_list:
- name: "get-answer" - name: "get-answer"
......
...@@ -2,7 +2,7 @@ dataset_path: sjyuxyz/MMLU-Pro-with-subset ...@@ -2,7 +2,7 @@ dataset_path: sjyuxyz/MMLU-Pro-with-subset
validation_split: validation validation_split: validation
fewshot_split: dev fewshot_split: dev
output_type: generate_until output_type: generate_until
doc_to_text: "Q: {{question.strip()}}\n(A) {{choices[0]}} (B) {{choices[1]}} (C) {{choices[2]}} (D) {{choices[3]}} (E) {{choices[4]}} (F) {{choices[5]}} (G) {{choices[6]}} (H) {{choices[7]}} (I) {{choices[8]}} (J) {{choices[9]}}\nA: Let's think step by step." doc_to_text: "Q: {{question.strip()}}\n(A) {{options[0]}} (B) {{options[1]}} (C) {{options[2]}} (D) {{options[3]}} (E) {{options[4]}} (F) {{options[5]}} (G) {{options[6]}} (H) {{options[7]}} (I) {{options[8]}} (J) {{options[9]}}\nA: Let's think step by step."
doc_to_target: "{{['(A)', '(B)', '(C)', '(D)', '(E)', '(F)', '(G)', '(H)', '(I)', '(J)'][answer]}}" doc_to_target: "{{['(A)', '(B)', '(C)', '(D)', '(E)', '(F)', '(G)', '(H)', '(I)', '(J)'][answer]}}"
filter_list: filter_list:
- name: "strict-match" - name: "strict-match"
......
...@@ -4,7 +4,7 @@ fewshot_split: dev ...@@ -4,7 +4,7 @@ fewshot_split: dev
fewshot_config: fewshot_config:
sampler: first_n sampler: first_n
output_type: generate_until output_type: generate_until
doc_to_text: "{{question.strip()}}\nA. {{choices[0]}}\nB. {{choices[1]}}\nC. {{choices[2]}}\nD. {{choices[3]}}\nE. {{choices[4]}}\nF. {{choices[5]}}\nG. {{choices[6]}}\nH. {{choices[7]}}\nI. {{choices[8]}}\nJ. {{choices[9]}}\nAnswer:" doc_to_text: "{{question.strip()}}\nA. {{options[0]}}\nB. {{options[1]}}\nC. {{options[2]}}\nD. {{options[3]}}\nE. {{options[4]}}\nF. {{options[5]}}\nG. {{options[6]}}\nH. {{options[7]}}\nI. {{options[8]}}\nJ. {{options[9]}}\nAnswer:"
doc_to_target: "{{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'][answer]}}" doc_to_target: "{{['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'][answer]}}"
generation_kwargs: generation_kwargs:
until: until:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment