Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the format of mgsm zh and ja. #2587

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/direct/mgsm_direct_ja.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by utils.py
dataset_name: ja
doc_to_target: '{% if answer is not none %}{{answer[11:]}}{% else %}{{answer_number|string}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nAnswer:"}}{% else %}{{"問題: "+question+"\nAnswer:"}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nAnswer:"}}{% else %}{{"問題 "+question+"\nAnswer:"}}{% endif %}'
generation_kwargs:
do_sample: false
until:
- '問題:'
- 問題:
- </s>
- <|im_end|>
include: direct_yaml
Expand Down
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/direct/mgsm_direct_zh.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by utils.py
dataset_name: zh
doc_to_target: '{% if answer is not none %}{{answer[6:]}}{% else %}{{answer_number|string}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nAnswer:"}}{% else %}{{"问题: "+question+"\nAnswer:"}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nAnswer:"}}{% else %}{{"问题 "+question+"\nAnswer:"}}{% endif %}'
generation_kwargs:
do_sample: false
until:
- '问题:'
- 问题:
- </s>
- <|im_end|>
include: direct_yaml
Expand Down
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/en_cot/mgsm_en_cot_ja.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by utils.py
dataset_name: ja
doc_to_target: '{% if answer is not none %}{{answer[11:]}}{% else %}{{answer_number|string}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nStep-by-Step Answer:"}}{% else %}{{"問題: "+question+"\nStep-by-Step Answer:"}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nStep-by-Step Answer:"}}{% else %}{{"問題 "+question+"\nStep-by-Step Answer:"}}{% endif %}'
generation_kwargs:
do_sample: false
until:
- '問題:'
- 問題:
- </s>
- <|im_end|>
include: cot_yaml
Expand Down
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/en_cot/mgsm_en_cot_zh.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Generated by utils.py
dataset_name: zh
doc_to_target: '{% if answer is not none %}{{answer[6:]}}{% else %}{{answer_number|string}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nStep-by-Step Answer:"}}{% else %}{{"问题: "+question+"\nStep-by-Step Answer:"}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nStep-by-Step Answer:"}}{% else %}{{"问题 "+question+"\nStep-by-Step Answer:"}}{% endif %}'
generation_kwargs:
do_sample: false
until:
- '问题:'
- 问题:
- </s>
- <|im_end|>
include: cot_yaml
Expand Down
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/native_cot/mgsm_native_cot_ja.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated by utils.py
dataset_name: ja
doc_to_target: '{% if answer is not none %}{{answer[11:]}}{% else %}{{answer_number|string}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nステップごとの答え:"}}{% else %}{{"問題: "+question+"\nステップごとの答え:"}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\nステップごとの答え:"}}{% else %}{{"問題 "+question+"\nステップごとの答え:"}}{% endif %}'
filter_list:
- filter:
- function: regex
Expand All @@ -17,7 +17,7 @@ filter_list:
generation_kwargs:
do_sample: false
until:
- '問題:'
- 問題:
- </s>
- <|im_end|>
include: cot_yaml
Expand Down
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/native_cot/mgsm_native_cot_zh.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Generated by utils.py
dataset_name: zh
doc_to_target: '{% if answer is not none %}{{answer[6:]}}{% else %}{{answer_number|string}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\n逐步解答:"}}{% else %}{{"问题: "+question+"\n逐步解答:"}}{% endif %}'
doc_to_text: '{% if answer is not none %}{{question+"\n逐步解答:"}}{% else %}{{"问题 "+question+"\n逐步解答:"}}{% endif %}'
filter_list:
- filter:
- function: regex
Expand All @@ -17,7 +17,7 @@ filter_list:
generation_kwargs:
do_sample: false
until:
- '问题:'
- 问题:
- </s>
- <|im_end|>
include: cot_yaml
Expand Down
4 changes: 2 additions & 2 deletions lm_eval/tasks/mgsm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
},
"ja": { # Japanese
# "QUESTION": "問題:",
"QUESTION": "\u554f\u984c:",
"QUESTION": "\u554f\u984c",
# "ANSWER": "ステップごとの答え:",
"ANSWER": "\u30b9\u30c6\u30c3\u30d7\u3054\u3068\u306e\u7b54\u3048:",
"DIRECT": "Answer:",
Expand All @@ -84,7 +84,7 @@
},
"zh": { # Chinese
# "QUESTION": "问题:",
"QUESTION": "\u95ee\u9898:",
"QUESTION": "\u95ee\u9898",
# "ANSWER": "逐步解答:",
"ANSWER": "\u9010\u6b65\u89e3\u7b54:",
"DIRECT": "Answer:",
Expand Down