--- license: apache-2.0 language: - en base_model: - Qwen/Qwen3.8-27B datasets: - Lego-X/ProgramGen library_name: transformers pipeline_tag: text-generation tags: - code - agent - software-engineering ---
ProgramGen

ProgramGen-27B

Scalable Environment Construction for Long-Horizon Coding Agents Paper · Code · Documentation · Dataset
> [!Note] > **Qwen3.8-27B fine-tuned on 2,585 ProgramGen trajectories**, in which an agent rebuilds a real open-source project from scratch. Weights and configuration are in the Hugging Face Transformers format. > [!Tip] > Tasks and trajectories: [`Lego-X/ProgramGen`](https://huggingface.co/datasets/Lego-X/ProgramGen). Paper: [*ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents*](https://arxiv.org/abs/2612.03336). ## Results
Qwen3.8-27BProgramGen-27BChange
Building software from scratch
Repository generation
NL2Repo-Bench
Pass
39.3
Full
4.8
Pass
46.6
Full
4.8
Pass
+7.3
Full
0.0
Program reconstruction
ProgramBench
Avg.
48.0
Almost
4.0
Avg.
61.0
Almost
10.0
Avg.
+13.0
Almost
+6.0
Software repair
DeepSWE
resolved, %
41.660.2+18.6
SWE-bench Pro HARD
resolved, %
76.584.3+7.8
SWE-bench Pro V2
resolved, %
92.594.4+1.9
SWE-bench Multilingual
resolved, %
78.079.7+1.7
Terminal tasks
Terminal-Bench 2.1
resolved, %
60.770.8+10.1
Scores in %. Both models run in the same adapted OpenHands SDK 1.33 scaffold. The better result in each row is shown in bold.
The supervision is program reconstruction only; the gains on the **software-repair benchmarks** (DeepSWE, SWE-bench Pro, SWE-bench Multilingual) and on **Terminal-Bench 2.1** come without any repair or terminal-task data. The paper gives the protocol and the comparison with other models. ## Usage The model keeps the architecture, tokenizer and tool-calling format of Qwen3.8-27B, so it is served the same way. We evaluated it with SGLang: ```bash sglang serve --model-path Lego-X/ProgramGen-27B \ --context-length 524288 \ --tool-call-parser qwen3_coder --reasoning-parser qwen3 \ --tensor-parallel-size 2 ``` Settings used in our evaluations:
SettingValue
Context window524,288 tokens (the native 262,144 extended with YaRN, factor 2; already set in config.json)
Samplingtemperature 1.0, top-p 0.95, top-k 20
Maximum output per call128K tokens
AgentOpenHands SDK 1.33, up to 1,000 model calls and six hours per task
> [!Important] > Use the chat template shipped in this repository. It is the template the model was trained with and differs from the one of the base model: it does not add a reasoning-effort instruction to the system prompt. Fine-tuning used text only. The vision encoder of the base model is kept unchanged and was not evaluated. ## Training
Base modelQwen/Qwen3.8-27B
Data2,585 trajectories from DeepSeek-V4.1-Flash-1017, 1,290 in forward mode and 1,295 in reverse mode, each scoring above 0.9 on its task; public in Lego-X/ProgramGen
Methodfull-parameter supervised fine-tuning; trajectories are kept whole, not split
Sequence lengthpacked to 524,288 tokens with per-example attention masking
Optimisation8 epochs (184 steps), peak learning rate 4e-5, 10% warmup, cosine decay to 4e-6, AdamW with β = (0.9, 0.98), weight decay 0.04, seed 1105
Batch48 packed sequences per step
Precisionbfloat16
FrameworkLLaMA-Factory with the Megatron-LM backend
## Licence Apache-2.0, the licence of the base model. ## Citation ```bibtex @misc{xiong2026programgen, title={ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents}, author={Conghao Xiong and Chaofan Tao and Jierun Chen and Yuxin Jiang and Ruoyu Wang and Sidi Yang and Xiao-Hui Li and Lifeng Shang and Hao Chen and Joseph J. Y. Sung and Haoli Bai and Irwin King}, year={2026}, eprint={2612.03336}, archivePrefix={arXiv}, primaryClass={cs.SE}, url={https://arxiv.org/abs/2612.03336}, } ```