Views
No views yet
Qwen/Qwen3.5-4B, RL-trained on Opus Magnum-style motion-planning puzzles.
The agent writes Python that places parts (arm, track, bonder, calcification glyph) and programs
the arm to deliver atoms; the verifier scores solved=True when the program produces the target output.1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = "Qwen/Qwen3.5-4B"
5adapter = "GoodStartLabs/opus-4b-cube-py-step120-2026-04-30"
6tok = AutoTokenizer.from_pretrained(base)
7model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
8model = PeftModel.from_pretrained(model, adapter)--lora-modules.| setting | value |
|---|---|
| Renderer | qwen3_5_disable_thinking (no <think> blocks; cookbook variant) |
| Coord mode | cube — 3-tuple (x, y, z) coordinates with x+y+z=0 |
| Representation | python (model emits a Python program calling place_arm, place_track, place_calcification, place_bonder, arm.grab/drop/rotate_*/track_*, then run()) |
| Sampling temperature | 1.0 |
| Max tokens / turn | 8192 |
| Max trajectory tokens | 40000 |
| Max turns / episode | 6 (multi-turn with verifier feedback between turns) |
| param | value |
|---|---|
| Algorithm | GRPO (importance-sampling loss) |
| LoRA rank | 32 |
| Learning rate | 1e-5 |
| Optimizer | Adam (β₁=0.9, β₂=0.95) |
| Group size | 8 |
| Groups per batch | 16 (→ 128 rollouts/batch) |
num_substeps | 1 |
kl_penalty_coef | 0 |
temperature | 1.0 |
remove_constant_reward_groups | False |
| Reward | +1.0 solve, +0.1 valid-but-wrong submission (stacks), -0.1 overflow, -0.05 no-code on last turn |
move, transmute (bond was excluded — see history below)groups_per_batch=16 distinct puzzles × group_size=8 rollouts = 128 rollouts/batch)| phase | batches | task_types | notes |
|---|---|---|---|
| 1 | 0–60 | move, transmute, bond | initial training, full task set |
| 2 | 60–100 | move, transmute (no bond) | bond removed (was 0% solve rate, pure compute waste) |
| 3 | 100–120 | move, transmute (no bond) | extension to step 150 (in flight at upload time) |
place_arm → grab → rotate_cw/ccw → drop → reset. About half of solved trajectories also use place_track(...); tracks are productive when used.place_calcification(...) before grab, off the rotation path.solved=True on turn 1) account for the majority of successful trajectories on easy puzzles. On d3/d4 the model often needs 2-3 turns of verifier feedback (mostly correcting overlap-with-input or arm-pivot errors).solved=True):| distance | rate |
|---|---|
| d1 | ~94% |
| d2 | ~99% |
| d3 | ~71% |
| d4 | ~76% |
tinker_cookbook.weights.{download, build_lora_adapter} and pushed via publish_to_hf_hub.opus-lite-rl codebase.