Downloads · 30 days
36
5% of all-time downloads
dmaheshwar22/qwen-1.5b-coder-grpo-scratch-step200
qwen-1.5b-coder-grpo-scratch-step200 is a text generation model from dmaheshwar22. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
GRPO-trained variant of Qwen/Qwen2.5-Coder-1.5B-Instruct, optimized with verifiable rewards from sandboxed test execution — same family of techniques behind DeepSeek-R1 and Kimi-K1.5, scaled down to a 1.5B model that…
Downloads · 30 days
36
5% of all-time downloads
All-time downloads
745
Public
Parameters
1.8B
3.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.6 GB · 100%
From the Hugging Face model README
GRPO-trained variant of Qwen/Qwen2.5-Coder-1.5B-Instruct, optimized with
verifiable rewards from sandboxed test execution — same family of
techniques behind DeepSeek-R1 and Kimi-K1.5, scaled down to a 1.5B model
that fits on a single 24 GB GPU.
Honest framing: this is a pipeline-validation run, not the headline checkpoint. Trained from base (no SFT warm-start), 200 steps, single A100. Pass@1 on HumanEval+ is essentially tied with the SFT baseline — see Results for numbers. The headline run (SFT-warmstarted, 500+ steps) is forthcoming as a separate model.
| Base model | Qwen/Qwen2.5-Coder-1.5B-Instruct |
| RL algorithm | GRPO (group-relative policy optimization) |
| RL framework | verl v0.7.0 |
| Rollout engine | vLLM |
| Group size (samples per prompt) | 8 |
| Train batch | 32 prompts × 8 rollouts = 256 candidates per step |
| Learning rate | 1e-6 |
| KL coefficient (loss-side) | 0.04, low-variance KL |
| KL coefficient (reward-side) | 0.001 |
| Temperature (rollout) | 1.0 |
| Total steps | 200 |
| Hardware | 1× A100 80 GB (FSDP with CPU offload) |
| Warm-start | None — trained from base instruct model |
| Training data | 319 MBPP-train prompts (MBPP+ contamination removed) |
Each rollout is scored by a composite reward executed in a sandboxed Docker container running pytest:
ruff clean code bonusAll numeric rewards are bounded in [0, ~1.1] to keep GRPO group-relative
advantages well-scaled.
Greedy decoding, n=5 samples, temperature=0.2, evaluated with evalplus:
| Setup | HumanEval+ pass@1 | HumanEval+ pass@5 |
|---|---|---|
| Qwen-2.5-Coder-1.5B base | 0.627 | — |
| + SFT (3 epochs LoRA on rejection-sampled MBPP) | 0.638 | — |
| + GRPO from base, 200 steps (this model) | 0.6415 | 0.6890 |
| + SFT + Coordinator retry (max 3 rounds) | 0.677 | — |
| Best-of-8 @ T=0.7 (oracle ceiling) | 0.783 | — |
Reading the numbers honestly:
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "dmaheshwar22/qwen-1.5b-coder-grpo-scratch-step200"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="bfloat16", device_map="auto")
prompt = "Write a Python function `is_prime(n: int) -> bool` that returns True iff n is prime."
messages = [{"role": "user", "content": prompt}]
inputs = tok.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
out = model.generate(inputs, max_new_tokens=256, temperature=0.2, do_sample=True)
print(tok.decode(out[0][inputs.shape[1]:], skip_special_tokens=True))
Or with vLLM for batched evaluation:
from vllm import LLM, SamplingParams
llm = LLM(model="dmaheshwar22/qwen-1.5b-coder-grpo-scratch-step200",
gpu_memory_utilization=0.5, dtype="bfloat16")
out = llm.generate(["def is_prime(n):"],
SamplingParams(max_tokens=256, temperature=0.2))
print(out[0].outputs[0].text)
```. Strip fences
in any downstream evaluator.sandbox/runner.py.Full training config, reward function, and sandbox runner are in the companion repo:
configs/grpo_qwen1_5b.yamlsrc/verifiable_rl_coder/training/grpo_reward.pysrc/verifiable_rl_coder/sandbox/runner.pychtc/train_grpo.{sub,sh}, chtc/submit_train_grpo.sh@misc{verifiable-rl-coder-2026,
author = {Maheshwari, Devesh},
title = {Verifiable-RL Coder: GRPO-trained Qwen-2.5-Coder with sandboxed verifiable rewards},
year = {2026},
howpublished = {\url{https://github.com/Devesh-Maheshwari/verifiable-rl-coder}}
}