Views
No views yet
Qwen/Qwen2.5-0.5B-Instruct
on the GSM8k training split (7,473 worked
solutions), trained with verl's sft_trainer.| Metric | Value |
|---|---|
| GSM8k test accuracy (greedy, 1319 examples) | 36.2% (477/1319) |
Qwen/Qwen2.5-0.5B-Instruct#### N#### <number>:You are a math problem solver. Think step by step. You MUST end your response with '####' where is the final numerical answer (digits only, no units or markdown).
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3m = AutoModelForCausalLM.from_pretrained("OhhMoo/qwen05b-gsm8k-sft-instruct")
4tok = AutoTokenizer.from_pretrained("OhhMoo/qwen05b-gsm8k-sft-instruct")
5
6messages = [
7 {"role": "system", "content": "You are a math problem solver. Think step by step. You MUST end your response with '#### <number>' where <number> is the final numerical answer (digits only, no units or markdown)."},
8 {"role": "user", "content": "Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May? Let's think step by step."},
9]
10ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
11out = m.generate(ids, max_new_tokens=512, do_sample=False)
12print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))