Thinkless icon indicating copy to clipboard operation
Thinkless copied to clipboard

使用Qwen-1.5B采样short answer的细节

Open CurryxIaoHu opened this issue 1 year ago • 5 comments

论文里提到“The corresponding short-form answers are derived using Qwen2.5-Math-1.5B-Instruct [41], a compact instruction-tuned model optimized for concise mathematical responses.” 请问作者这里采样short answer的细节是什么?例如采样次数、验证答案正确性的方法(math_verify?)、采样Promot、温度等;非常感谢!

CurryxIaoHu avatar Jun 03 '25 09:06 CurryxIaoHu

Hi @CurryxIaoHu, we used the following configs for generation. There is no correctness verification.

dataset_name: default
dataset_path: open-thoughts/OpenThoughts2-1M
doc_to_target: answer
doc_to_text: problem
process_docs: !function utils.process_docs_1m_filtered
filter_list:
- filter:
  - function: regex
    regex_pattern: ''
  - function: take_first
  name: strict-match
generation_kwargs:
  until:
  - <|end▁of▁sentence|>
  - <|im_end|>
  do_sample: true
  temperature: 0.6
  max_gen_toks: 8192
tag:
- chain_of_thought
metadata:
  version: 3.0
metric_list:
- aggregation: mean
  higher_is_better: true
  ignore_case: true
  ignore_punctuation: false
  metric: exact_match
  regexes_to_ignore:
  - ','
num_fewshot: 0
output_type: generate_until
repeats: 1
task: gen_open_thoughts_1m
test_split: train

The process function, without additional instructions:

def process_docs_1m(dataset: datasets.Dataset) -> datasets.Dataset:
    def _process_doc(doc: dict) -> dict:
        #additional_prompt = "Please reason step by step, and put your final answer within \\boxed{}.\n"
        problem = doc["conversations"][0]["value"]
        lm_solution = doc["conversations"][1]["value"]
        answer = ""
        out_doc = {
            "problem": problem,
            "answer": answer,
        }
        return out_doc
    return dataset.map(_process_doc)

VainF avatar Jun 03 '25 12:06 VainF

Thanks for your reply! I would like to double-check:

  1. When generating responses, you did not use any additional prompt like "Please reason step by step, and put your final answer within \boxed{}.\n";
  2. The responses in warm-up SFT dataset may have wrong answers, as they are not verified?

CurryxIaoHu avatar Jun 03 '25 12:06 CurryxIaoHu

Thanks for your reply! I would like to double-check:

  1. When generating responses, you did not use any additional prompt like "Please reason step by step, and put your final answer within \boxed{}.\n";
  2. The responses in warm-up SFT dataset may have wrong answers, as they are not verified?

Exactly! Just a straightforward generation without verification.

VainF avatar Jun 03 '25 13:06 VainF

Thank you for your reply! One additional question: what is the learning rate used in the SFT phase?

CurryxIaoHu avatar Jun 10 '25 06:06 CurryxIaoHu

Thank you for your reply! One additional question: what is the learning rate used in the SFT phase?

The warmup model was trained with LR=1e-5 and a CosineAnnealingScheduler was used with minLR=1e-6

VainF avatar Jun 11 '25 16:06 VainF