This model is an iterative system
The model is one half of an attempt–measure–revise loop, and the loop is how
you run it: sample 8 attempts, render and score each with the deterministic
verifier, keep the champion, then revise the champion for 3 rounds of 4
revisions under number-free feedback — a closeness bucket plus whether the
rendering has EXTRA or MISSING material, read from boundary-chamfer
asymmetry. The verifier only measures; the model does all the searching. The
loop and verifier ship in the repo
(rl/track_a/agent_loop.py,
rl/common/evaluator.py).
On the repo's 8-device held-out benchmark (data/benchmark/final_1..8 —
real devices from published papers, never seen in training), the loop
reaches mean champion IoU 0.491:
Table with columns: final_1, final_2, final_3, final_4, final_5, final_6, final_7, final_8| final_1 | final_2 | final_3 | final_4 | final_5 | final_6 | final_7 | final_8 |
|---|
| 0.518 | 0.507 | 0.336 | 0.651 | 0.293 | 0.716 | 0.489 | 0.418 |
Used instead as a bare one-shot generator (single pass, T=1.0), expect mean
IoU 0.23 with 39/64 attempts executable — the base model scores 0/64.
Prompt contract
The deployment prompt is the training prompt, unchanged
(rl/common/prompt.py,
contract pixcell-direct-reconstruction-v3): the device raster (longest side
≤1440 px) and its footprint in μm, non-thinking chat template, ≤4096 new
tokens, temperature 1.0. The model answers with one Python program over the
seven-primitive GDSFactory catalog that writes device.gds.
from peft import PeftModel
from transformers import AutoModelForCausalLM
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.6-35B-A3B", torch_dtype="bfloat16")
model = PeftModel.from_pretrained(base, "qpaig-mit/pixcell")
Training
GRPO (importance-sampling loss, KL 0, group size 8, 8 groups/step, lr 1e-5,
temperature 1.0) over the curriculum L0→L4, 30 steps per level with 80/20
replay of earlier levels; reward shaped_v3b — rectangle-baseline-normalized
IoU and Dice plus a boundary-chamfer teacher over a 0.05 validity floor,
recomputed from rendered artifacts by the deterministic evaluator
(rl/track_a/reward.py).
Trained with Tinker. The full evidence
record (benchmark JSONs, loop trajectories, champion programs, gallery) is
versioned at
data/training/qwen-rl-v2/.
Citation
@misc{agarwal2026pixcell,
title = {From Pixels to {PCells}: A Neurosymbolic Approach to Photonic Component Creation},
author = {Aadarsh Agarwal and Kenaish Al Qubaisi and Dirk Englund},
year = {2026},
eprint = {2608.00084},
archivePrefix = {arXiv},
primaryClass = {cs.CV},
doi = {10.48550/arXiv.2608.00084},
url = {https://arxiv.org/abs/2608.00084}
}