OriGent: Post-Training Hardware Engineering Agents through Scalable Environment Synthesis

Fan Cui, Kexing Zhou, Youwei Zhuo Peking University

OriGent turns Qwen3.6-35B-A3B into an agent for repository-level hardware engineering, with long-context SFT and online GRPO on containerized tasks synthesized from 90 hardware repositories.

Solve rate on HWE-Bench v1.1: 417 tasks from 6 repositories that never appear in training. SFT and RL are 3-run means.
74.2%
OriGent-RL, 309.3 of 417 solved

Results on HWE-Bench v1.1

All models run in isolated Harbor containers with a 6-hour budget per task. OriGent and Qwen3.6-35B-A3B run under OpenCode 1.18.22 (256K context, 64K max output; 3-run means for OriGent-SFT and OriGent-RL); frontier baselines use their native harnesses.

Overall solve rate

Solve rate by repository

Base SFT RL

Solved counts by repository

Show tableHide table
Repository Tasks Base OriGent-SFT OriGent-RL RL over base (pp) RL over SFT (pp)

Long-context SFT

OriGent-SFT is trained from Qwen3.6-35B-A3B on 8,444 verified hardware engineering tasks (9,664 segments: 9,054 interaction segments and 610 compaction-summary samples; 436,576 supervised assistant turns) for 3 epochs at batch size 32, with a cosine LR schedule from 1e-5 to 1e-6. Training uses a 256K context, masks loss on assistant turns with over 8K reasoning tokens, and supervises context-compaction summaries.

Training loss

Gradient norm

Online RL with GRPO

Synchronous GRPO from OriGent-SFT on 2,163 tasks from 23 held-out repositories: 64 mixed groups of 8 rollouts per step, constant 1e-6 LR, no KL/entropy term or std normalization, and binary reward requiring both target.sh and regression.sh to pass. TITO, R³ and frozen MoE routers keep training and rollout aligned.

HWE-Bench v1.1 score during GRPO training

3-run mean Min to max SFT start, 66.8%

OriGent-SFT (step 0) and 17 RL checkpoints, each run three times on all 417 tasks. Steps count completed GRPO updates, so OriGent-RL is the checkpoint after update 51.

Training pass@1 gain across epochs

Gain over epoch 0 Gain over epoch 1 ±1 standard error

Same-task pass@1 change relative to earlier epochs (5-rollout pooled window). Across the 1,000 tasks completed in all three epochs, pass@1 rises from 65.7% to 67.1% to 69.2%.

Policy entropy

Mismatch & grad norm

Steady-state KL stays near 0.0012, with only 0.63% of tokens outside a [0.8, 1.25] train/rollout probability ratio. The four marked spikes stem from occasional NaN logits in inference; the released training code automatically filters out such groups.

Agent behaviour

Measured over the 512 training trajectories per step. From the first to the last five steps, mean turns rise from 241 to 293, tool calls from 279 to 368, and cumulative output from 149K to 205K tokens.

Eval tokens on HWE-Bench

Per-task output tokens across 3 runs per checkpoint. Both solved (66K to 143K) and unsolved (119K to 298K) tasks expand; later checkpoints hit the 6-hour limit more often, understating their means.

Dynamic filtering

Each step keeps 64 mixed groups (1–7 of 8 solved) and drops all-pass (median 21), all-fail (5), and infra-dropped (8; median 7.8% of completed groups) groups.

Wall-clock time

Rollout Training Weight sync and saving

Rollout (sandboxes plus grading; 96.7% prefix cache hit) shares 64 H100 GPUs with training (23.7% MFU). The 51 steps took 368.6 hours (~23,600 GPU-hours); the step 11–12 spike cleared after the step 13 GC fix.

Training run log (5 events)

Show logHide log
Step Event Details
5, 8, 40, 44 NaN logit spikes Occasional NaN logits in SGLang caused uniform token sampling in a few trajectories, producing the marked KL and grad-norm spikes.
7 THP compaction stall Transparent huge page compaction on a memory-tight node stalled the Harbor agent server until health checks failed; restarted from the step-6 checkpoint with NUMPY_MADVISE_HUGEPAGE=0.
13 Ray GC GIL fix Steps 11–12 slowed to 12.4 h because Ray's 10-second periodic Python GC held the GIL while driver refs kept the object store full; releasing rollout refs and raising the GC interval to 30 min restored rollout time to ~5.8 h.
45 Host OOM restart One rollout node exhausted host memory during the step-45 rollout; resumed cleanly from the step-44 checkpoint.
51 NaN-group filter Four groups with uniform-sampling trajectories were caught, dropped, and step 51 was rerun from the step-50 checkpoint; this filter is enabled in the released code.

Models, data, and code

Read the preprint on arXiv; all weights, datasets, container images, and code are released under Apache-2.0 on Hugging Face and GitHub.

Repository Type Contents Format Size
henryen/OriGent-RL Model Qwen3.6-35B-A3B after SFT and 51 GRPO updates HF BF16, 34 safetensors shards of 2 GiB 67 GiB
henryen/OriGent-SFT Model Qwen3.6-35B-A3B after long-context SFT HF BF16, 34 safetensors shards of 2 GiB 67 GiB
henryen/OriGent-SFT-Data Dataset 8,447 sanitized trajectories (9,060 segments, 61 repos) and 8,861 Harbor tasks (62 repos) 17 JSONL shards (trajectories/) + Harbor v1.3 (tasks/) 3.5 GiB
henryen/OriGent-RL-Data Dataset 2,163 Harbor tasks (23 repos) and 2,159 deduplicated container images (9,218 blobs) Harbor v1.3 (tasks/) + OCI 1.1 tar+zstd (images/) 707 GiB
Henry-Jessie/origent Code 90 repository templates (148 profiles), SFT and RL training, evaluation, OCI CLI Git repository 2.7 MB

Citation

If you use OriGent models, datasets, or environment synthesis code in your research, please cite our paper.

BibTeX
@article{cui2026origent,
  title   = {OriGent: Post-Training Hardware Engineering Agents through Scalable Environment Synthesis},
  author  = {Fan Cui and Kexing Zhou and Youwei Zhuo},
  journal = {arXiv preprint arXiv:2611.38637},
  year    = {2026},
  url     = {https://arxiv.org/abs/2611.38637}
}