Qwen3-1.7B-Sudoku-SFT-GRPO
Qwen3-1.7B trained to play Sudoku on the OpenEnv Sudoku environment: a short SFT warmup (openenv/Qwen3-1.7B-Sudoku-SFT), then GRPO with TRL. It fills one cell per call to a place(row, col, number) tool and writes a short reasoning before each move. The OpenEnv Sudoku tutorial walks through the whole pipeline.
| Model | 16 empty cells: solved | Cells filled | 26 empty cells: solved | Cells filled |
|---|---|---|---|---|
| Qwen3-1.7B | 0/30 | 1.9% | 0/30 | 0.1% |
| Qwen3-1.7B-Sudoku-SFT | 19/30 | 79.1% | 10/30 | 55.8% |
| This model | 26/30 | 87.5% | 22/30 | 83.2% |
Greedy, on the same 30 puzzles per level (puzzles_c65.json and puzzles_c55.json, made with TextArena's own generator). The trained models play with thinking on (384 new tokens per move), the base model without it: with thinking on it does not finish reasoning within that budget and never makes a move. A digit that is not the solution of its cell is rejected, and two rejected moves in a row end the game. Each model was trained once, so treat the numbers as one run.
Training
GRPO with environment_factory, starting from the SFT model, against the environment at 55 clues (about 26 empty cells): 4 prompts x 16 games per step, thinking on, constant learning rate 1e-6, max_completion_length=16384, vllm_importance_sampling_mode="token_truncate", vLLM colocated. Two rewards: 1 if the puzzle is solved, plus the fraction of empty cells filled. One A100 80GB through Hugging Face Jobs. These weights are step 75, about 15 hours ($38). Script: grpo.py. Training curves: Trackio. The completions/ folder holds every logged game, and the commit history the checkpoints at steps 25, 50 and 75.
The Space closed its WebSockets about every 2 hours during the run, and the OpenEnv client reconnected to a new session in the middle of some games. Steps 26, 74 and 75 trained partly on those broken games. The example script now opens a new connection per game.
Use it
Play it on the evaluation puzzles with evaluate.py:
uv run evaluate.py --model openenv/Qwen3-1.7B-Sudoku-SFT-GRPO --thinking --max-new-tokens 384 --puzzles puzzles_c55.json --n 5 --out games.jsonl
Framework versions
- TRL: 1.16.0
- OpenEnv: 0.10.0
- Transformers: 5.21.1
- PyTorch: 2.11.0