Run this model with HF Jobs

Run Lego-X/ProgramGen-27B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Lego-X/ProgramGen-27B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Lego-X/ProgramGen-27B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Lego-X/ProgramGen-27B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/Lego-X/ProgramGen-27B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
ProgramGen-27B / README.md
Conghao97's picture
Add the paper link and citation
a791795 verified
|
Raw History Blame Contribute Delete
17.6 kB
metadata
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

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.

Tasks and trajectories: Lego-X/ProgramGen. Paper: ProgramGen: Scalable Environment Construction for Long-Horizon Coding Agents.

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:

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

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

@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},
}