reinforced-qwen-grpo
Training Qwen3.5-4B with reinforcement learning on verifiable data analysis tasks.
What I built
Can you make a 4-billion-parameter model comparable to a 27-billion-parameter model using RL? RL environments keep coming up in recent model releases. They give models tasks to practice and a way to check their answers. Xiaomi released thousands of open RL environments with MiMo-V2.6, and Hugging Face’s FineEnvs project includes environments for small models. I wanted to explore one simple question: can you use these open environments on your own hardware to make a small model better?
I used SmolDataEnvs, a collection of verifiable data analysis tasks built around real Kaggle datasets. The model gets a file and a question, investigates through a terminal, and saves its answer. I added a local sandbox and a stricter checker, then trained Qwen3.5-4B with rank-64 LoRA adapters on an AMD Instinct MI300X.

How it works
The original checker could accept “42, yes” when the expected answer was “42.” I wrote a stricter checker that requires a bare numeric answer for numeric tasks, and used it as the training reward.
I used TRL’s GRPO trainer to update the model from the environment’s rewards. For each task, the model makes eight attempts. The checker rewards a correct answer with 1 and an incorrect answer with 0. Training reinforces attempts that beat their group’s average reward.
Groups where every attempt succeeds or fails offer no relative reward signal. I screened about 1,000 tasks and kept 240 with mixed success. These gave the model useful opportunities to practice.

What happened
In the initial RL comparison, episodes ending without an answer fell from 99 to 72. The overall scores plateaued, while distillation followed by RL gave the strongest reported result on unseen datasets.