Results
Before/after probe, 40 samples each through an identical scoring path:
Table with columns: before, after | before | after |
|---|
| reward | 0.4806 | 0.8744 |
| judge | 0.3719 | 0.9375 |
| paint_fraction | 0.0839 | 0.4524 |
| gate failures | 6/40 | 0/40 |
Over 110 training steps: reward t = +13.73, HPSv3 t = +11.81, paint coverage
t = +20.98. frac_reward_zero_std stayed 0.000 at every step, so no step ever lost
its gradient. Published arms for comparison: hps-only +6.41, judge-led +10.5,
hps-led +15.6.
Zero gate failures in 40 samples is the headline: every sketch compiles, uses the
library correctly, and paints something. That is the effect the write-up identifies as
the real mechanism — the policy stops producing bad paintings.
Deviations from the published recipe
Table with columns: change, why| change | why |
|---|
--lora-experts (941.9M params, 2.61%) | --all-linear reaches 30.4M (0.084%): the 256 routed experts are a fused 3-D nn.Parameter no target_modules entry can match |
| Adapter merged for generation | PEFT rebuilds the fused-expert delta every decode pass: 700ms/token unmerged vs 36.8ms merged, a 19x speedup over ~1700 sequential passes. TRL does not do this on the transformers.generate path |
max_completion_length 8192 → 3072 | 96GB and a 248,320-token vocabulary make the logits tensor the peak allocation |
TARGET_LENGTH_TOKENS 3000 → 1800, 6000 → 2400 |
Usage
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-35B-A3B", dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "infinitylogesh/watercolour-grpo-hps-led")
model.merge_adapter()
The system prompt matters: it restricts the model to ten p5.brush methods and asks
for layered petals. Get it from the environment's core/prompt.py.
Training
110 steps, ~14h. lr 5e-5 constant with 5-step warmup, 8 generations/step,
batch 1 x grad-accum 8, scale_rewards none, top-p 0.95 / top-k 20.
Reward: gate 0.05, length 0.05, judge 0.30, HPSv3 0.60.