caiyuchen commited on
Commit
727ef2d
·
verified ·
1 Parent(s): 1422da3

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +90 -0
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ license: apache-2.0
4
+ tags:
5
+ - math
6
+ - rl
7
+ - qwen3
8
+ - dapomath17k
9
+ library_name: transformers
10
+ pipeline_tag: text-generation
11
+ language: en
12
+ datasets:
13
+ - BytedTsinghua-SIA/DAPO-Math-17k
14
+ base_model:
15
+ - Qwen/Qwen3-8B-Base
16
+ ---
17
+
18
+ # On Predictability of Reinforcement Learning Dynamics for Large Language Models
19
+
20
+
21
+ ![Overview](overview.png)
22
+
23
+
24
+
25
+ This repository provides one of the models used in our paper **"On Predictability of Reinforcement Learning Dynamics for Large Language Models"** for evaluating and predicting reinforcement learning (RL) dynamics in large language models (LLMs).
26
+
27
+ Recent advances in LLM reasoning capabilities are largely driven by RL, yet the parameter dynamics during RL training remain poorly understood. Our work identifies two key properties of RL-induced parameter updates: **Rank-1 Dominance**, where the top singular subspace of the parameter update matrix captures nearly all reasoning improvements, and **Rank-1 Linear Dynamics**, where this subspace evolves linearly across training, allowing accurate prediction from early checkpoints. Based on these insights, we propose **AlphaRL**, a plug-in acceleration framework that extrapolates final parameter updates from a short early training window, achieving up to 2.5× speedup while retaining over 96% of reasoning performance.
28
+
29
+ This model is one of the training checkpoints used in our paper and is provided to support research on evaluating and predicting parameter dynamics during RL training of LLMs. The full codebase is available at: [AlphaRL GitHub](https://github.com/caiyuchen-ustc/Alpha-RL).
30
+
31
+
32
+
33
+
34
+
35
+ ## 🔧 Prompt Format (Chat Template)
36
+
37
+ During Inference, each question is formatted as:
38
+
39
+ {question} Please reason step by step, and put your final answer within boxed{}.
40
+
41
+ Then wrapped using the chat template:
42
+
43
+ ```python
44
+ prompt = tokenizer.apply_chat_template(
45
+ [{{"content": question_with_instruction, "role": "user"}}],
46
+ tokenize=False,
47
+ add_generation_prompt=True,
48
+ )
49
+ ```
50
+
51
+ ## 🧪 Example Usage
52
+
53
+ ```python
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer
55
+
56
+ model = AutoModelForCausalLM.from_pretrained("caiyuchen/DPO-step-1")
57
+ tokenizer = AutoTokenizer.from_pretrained("caiyuchen/DPO-step-1")
58
+
59
+ question = "Convert the point $(0,3)$ in rectangular coordinates to polar coordinates. Enter your answer in the form $(r,\theta),$ where $r > 0$ and $0 \le \theta < 2 \pi.$"
60
+ question_with_instruction = question + "Please reason step by step, and put your final answer within \boxed{{}}"
61
+
62
+ # Apply chat template
63
+ prompt = tokenizer.apply_chat_template(
64
+ [{{"content": question_with_instruction, "role": "user"}}],
65
+ tokenize=False,
66
+ add_generation_prompt=True,
67
+ )
68
+
69
+ inputs = tokenizer(prompt, return_tensors="pt")
70
+ outputs = model.generate(**inputs, max_new_tokens=256)
71
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
72
+ ```
73
+
74
+ ## 📎 Reference
75
+
76
+ If you find this model useful, please consider citing our paper:
77
+
78
+ 🔗 **Paper Link**: https://huggingface.co/papers/2510.00553
79
+
80
+ ```bibtex
81
+ @misc{cai2025predictabilityreinforcementlearningdynamics,
82
+ title={On Predictability of Reinforcement Learning Dynamics for Large Language Models},
83
+ author={Yuchen Cai and Ding Cao and Xin Xu and Zijun Yao and Yuqing Huang and Zhenyu Tan and Benyi Zhang and Guiquan Liu and Junfeng Fang},
84
+ year={2025},
85
+ eprint={2510.00553},
86
+ archivePrefix={arXiv},
87
+ primaryClass={cs.LG},
88
+ url={https://arxiv.org/abs/2510.00553},
89
+ }
90
+