RL post-training
Collection
25 items • Updated
This model is a fine-tuned version of Qwen3-1.7B using RLOO (REINFORCE Leave-One-Out) without KL penalty for mathematical reasoning.
Trained with PipelineRL.
| Split | Datasets |
|---|---|
| Train | gsm8k_train, math_train |
| Test | gsm8k_test, math_500 |
| Parameter | Value |
|---|---|
| Algorithm | RLOO (REINFORCE Leave-One-Out) |
| Advantage Baseline | Leave-one-out mean reward over the group |
| Extra Inference | None |
| Group Structure | Required |
| Policy Loss | reinforce |
| KL Coefficient | 0.0 |
| Epsilon (clip) | 0.02 |
Discount Factor (gamma) |
1.0 |
| Divide Advantage by Std | False |
| Filter Zero Advantage Groups | False |
| Rollouts per Problem | 16 |
RLOO uses the leave-one-out mean of the other responses in the group as the baseline, trained with a REINFORCE-style policy loss.
| Parameter | Value |
|---|---|
| Base Model | Qwen/Qwen3-1.7B |
| Learning Rate | 1e-06 |
| LR Scheduler | cosine |
| Warmup Steps | 25 |
| Max Training Steps | 1500 |
| Micro Batch Size | 4 |
| Gradient Accumulation | 64 |
| Effective Batch Size | 256 |
| Sequence Length | 8192 |
| Gradient Clipping | 0.3 |
| Weight Decay | 0.01 |
| Optimizer | adamw_torch |
| Precision | bf16 |
| DeepSpeed | ZeRO Stage 3 |
Pass@k on math reasoning benchmarks (N=32 samples per problem, temperature=1.0):
| Dataset | pass@1 | pass@2 | pass@4 | pass@8 | pass@16 | pass@32 |
|---|---|---|---|---|---|---|
| GSM8K (test) | 80.72 | 87.23 | 91.39 | 94.06 | 95.75 | 96.66 |
| MATH-500 | 69.94 | 78.31 | 84.41 | 88.71 | 91.69 | 93.80 |
| Overall | 77.76 | 84.78 | 89.47 | 92.59 | 94.63 | 95.88 |
GSM8K test: 1319 problems · MATH-500: 500 problems · Overall: 1819 problems (overall weighted by problem count).
Full training logs: https://wandb.ai/jaygala24-team/rl-post-training/runs/qwen3_1.7b_rloo_no_kl_3a1f_4xh100_236659_finetune_68063672
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("jaygala24/Qwen3-1.7B-RLOO-math-reasoning", revision="step-0200") # optional branch, e.g. "step-0400"
tokenizer = AutoTokenizer.from_pretrained("jaygala24/Qwen3-1.7B-RLOO-math-reasoning", revision="step-0200")
prompt = "Please reason step by step, and put your final answer within \\boxed{}.\n\nWhat is the sum of 123 and 456?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from vllm import LLM, SamplingParams
llm = LLM(model="jaygala24/Qwen3-1.7B-RLOO-math-reasoning", revision="step-0200") # optional branch, e.g. "step-0400"
sampling_params = SamplingParams(temperature=0.7, max_tokens=4096)
prompt = "Please reason step by step, and put your final answer within \boxed{}.
What is the sum of 123 and 456?"
outputs = llm.generate([prompt], sampling_params)
print(outputs[0].outputs[0].text)