A-03 Solver

69.5% of 200 held-out puzzles solved, up from 1.0%
A 0.8B model is given a handful of numbers and a target, and must reach it using each number once. Thinking mode is off, so every step of its reasoning has to be written into the answer.
It started at 1%. Eighty steps of reinforcement learning on one GPU took it to 69.5%, with no worked examples. The only signal was whether the final expression hit the target.
Run it
Section titled “Run it”The weights are a LoRA adapter on top of Qwen/Qwen3.5-0.8B. Load both with transformers and peft.
-
Install
Terminal window pip install -U transformers peft accelerate -
Load and ask
run.py from transformers import AutoModelForCausalLM, AutoTokenizerfrom peft import PeftModelbase = "Qwen/Qwen3.5-0.8B"tok = AutoTokenizer.from_pretrained(base)model = AutoModelForCausalLM.from_pretrained(base, torch_dtype="auto", device_map="auto")model = PeftModel.from_pretrained(model, "superbird-labs/a-03-solver")SYSTEM = open("system_prompt.txt").read() # the prompt belowmessages = [{"role": "system", "content": SYSTEM},{"role": "user", "content": "your input here"}]ids = tok.apply_chat_template(messages, add_generation_prompt=True,enable_thinking=False, return_tensors="pt").to(model.device)out = model.generate(ids, max_new_tokens=512, do_sample=False)print(tok.decode(out[0][ids.shape[-1]:], skip_special_tokens=True))
The prompt
Section titled “The prompt”Trained with this exact system prompt. Use it word for word: small models are picky about their instructions.
Reach the target number using each given number exactly once, with + - * / and parentheses. Work it out step by step: try a combination, compute it, and check it before moving on. Keep it short. End with only the expression inside <answer></answer>, e.g. <answer>(3 + 5) * 2</answer>.Numbers: 9, 21, 37Target: 444What it answers with
Section titled “What it answers with”37 × 12 = 444, and 21 − 9 = 12<answer>37 * (21 - 9)</answer>Before and after
Section titled “Before and after”Real cases from the held-out set, never seen in training.
Numbers: 9, 21, 37 Target: 444
(21 − 37) + 9 = −16
Gives −16. The target was 444.
444 is 37 × 12. Can 9 and 21 make 12? 21 − 9 = 12 37 × (21 − 9) = 444
Works backwards from the target, then checks the answer.
Numbers: 6, 9, 11 Target: 594
(9 × 6) + 11 × 11
That is 175, and it uses 11 twice.
11 × 9 = 99 99 + 6 = 105, too small 99 × 6 = 594 (11 × 9) × 6
Tries, rejects, and lands on 594 with each number once.
Numbers: 2, 8, 20, 31 Target: 252
(20 + 31) × 2 − 8
That is 94.
31 − 2 = 29 29 × 8 = 232 232 + 20 = 252 (31 − 2) × 8 + 20
252, with all four numbers used once.
The recipe
Section titled “The recipe”| Base model | Qwen/Qwen3.5-0.8B |
| Method | GRPO with LoRA on the Surogate engine |
| Steps | 80 |
| Batch | 16 puzzles × 8 tries each |
| Answer length | up to 1,536 tokens |
| Hardware | one 48 GB L40S |
| Time | 67 minutes |
The data
Section titled “The data”Puzzles generated on the fly: 3 or 4 numbers and a target from 1 to 999. Training and test use different seeds, so there is no dataset to license.
The reward
Section titled “The reward”1 when the expression in <answer> uses exactly the given numbers and equals the target.
Train it yourself
Section titled “Train it yourself”Trained with the open-source Surogate engine (1.5.17 or later), kit countdown. Full kit notes: Surogate countdown kit.
CUDA_VISIBLE_DEVICES=0 surogate grpo-colocate \ --train examples/kits/countdown/train.yaml \ --infer examples/kits/countdown/infer.yaml \ --orch examples/kits/countdown/orch.yamlThe held-out score shows in the log as Avg@1= and the adapter lands in outputs/kits/countdown/. To point it at your data, read Retrain on your data.
The scores
Section titled “The scores”Puzzles solved out of 200 held out. A 1,024-token cap made training collapse; 1,536 fixed it. One run, one seed.
Where it fails
Section titled “Where it fails”- The token budget acts as the curriculum. With answers capped at 1,024 tokens it reached 61%, then fell to 48.5%: long, careful attempts were cut off and scored zero, so it learned that reasoning did not pay. At 1,536 tokens it kept improving.
Where it fits
Section titled “Where it fits”- A clear demonstration of RL. From 1% to 69.5% on one GPU in about an hour: a compact way to see reinforcement learning teach a small model to reason.
- A puzzle tutor. It writes every step, so a learner can follow its working and catch its mistakes.
- A test bed for RL research. Change the reward, the budget or the schedule and measure what changes.

Open small models for every industry, free to run offline. Custom ones for companies.
superbirdlabs.com Custom models Hugging Face hello@superbirdlabs.com