Views
No views yet
| pass@1 acc | MATH500 | Minerva Math | Olymapaidbench | AMC23 | AIME24 | Avg. |
|---|---|---|---|---|---|---|
| Qwen2.5-Math-7B * | 64.8 | 15.4 | 25.6 | 37.5 | 16.7 | 32.0 |
| Qwen2.5-Math-7B-Instruct * | 83.2 | 33.5 | 38.4 | 62.5 | 20.0 | 47.5 |
| rStar-Math-7B ^ | 78.4 | - | 47.1 | 47.5 | 26.7 | - |
| Eurus-2-7B-PRIME * | 74.0 | 39.7 | 35.6 | 57.5 | 23.3 | 46.0 |
| Qwen2.5-7B-Simple-RL-Zero ^ | 77.2 | 33.5 | 37.6 | 62.5 | 33.3 | 48.8 |
| Qwen2.5-7B-Simple-RL-Zero * | 75.6 | 34.2 | 39.0 | 52.5 | 26.7 | 45.6 |
| Qwen2.5-7B-PURE-VR * | 79.8 | 36.8 | 41.9 | 60.0 | 20.0 | 47.7 |
| Qwen2.5-7B-DPO-VP | 74.8 | 35.3 | 36.9 | 67.5 | 26.7 | 48.2 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "SunnyLin/Qwen2.5-7B-DPO-VP"
4device = "cuda" # the device to load the model onto
5
6model = AutoModelForCausalLM.from_pretrained(
7 model_name,
8 torch_dtype="auto",
9 device_map="auto"
10)
11tokenizer = AutoTokenizer.from_pretrained(model_name)
12
13prompt = "Find the value of $x$ that satisfies the equation $4x+5 = 6x+7$."
14
15messages = [
16 {"role": "system", "content": "Please reason step by step, and put your final answer within \\boxed{}."},
17 {"role": "user", "content": prompt}
18]
19
20text = tokenizer.apply_chat_template(
21 messages,
22 tokenize=False,
23 add_generation_prompt=True
24)
25model_inputs = tokenizer([text], return_tensors="pt").to(device)
26
27generated_ids = model.generate(
28 **model_inputs,
29 max_new_tokens=2048
30)
31generated_ids = [
32 output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
33]
34
35response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]