Text Generation
Transformers
Safetensors
English
qwen3
math
rl
dapomath17k
conversational
text-generation-inference
Instructions to use caiyuchen/DAPO-step-21 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use caiyuchen/DAPO-step-21 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="caiyuchen/DAPO-step-21") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("caiyuchen/DAPO-step-21") model = AutoModelForCausalLM.from_pretrained("caiyuchen/DAPO-step-21", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use caiyuchen/DAPO-step-21 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "caiyuchen/DAPO-step-21" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "caiyuchen/DAPO-step-21", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/caiyuchen/DAPO-step-21
- SGLang
How to use caiyuchen/DAPO-step-21 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "caiyuchen/DAPO-step-21" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "caiyuchen/DAPO-step-21", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "caiyuchen/DAPO-step-21" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "caiyuchen/DAPO-step-21", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use caiyuchen/DAPO-step-21 with Docker Model Runner:
docker model run hf.co/caiyuchen/DAPO-step-21
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -15,6 +15,23 @@ base_model:
|
|
| 15 |
- Qwen/Qwen3-8B-Base
|
| 16 |
---
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
## 🔧 Prompt Format (Chat Template)
|
| 19 |
|
| 20 |
During Inference, each question is formatted as:
|
|
@@ -36,8 +53,8 @@ prompt = tokenizer.apply_chat_template(
|
|
| 36 |
```python
|
| 37 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 38 |
|
| 39 |
-
model = AutoModelForCausalLM.from_pretrained("caiyuchen/DAPO-step-
|
| 40 |
-
tokenizer = AutoTokenizer.from_pretrained("caiyuchen/DAPO-step-
|
| 41 |
|
| 42 |
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.$"
|
| 43 |
question_with_instruction = question + "
|
|
|
|
| 15 |
- Qwen/Qwen3-8B-Base
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# On Predictability of Reinforcement Learning Dynamics for Large Language Models
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+

|
| 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:
|
|
|
|
| 53 |
```python
|
| 54 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 55 |
|
| 56 |
+
model = AutoModelForCausalLM.from_pretrained("caiyuchen/DAPO-step-21")
|
| 57 |
+
tokenizer = AutoTokenizer.from_pretrained("caiyuchen/DAPO-step-21")
|
| 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 + "
|