跳到正文
Turing Post (Ksenia Se)· @TheTuringPost · X·· 3 天前精选AI 评分80
AI 导读

Turing Post 转述 Hugging Face 团队的做法:为每个 harness 训练一个小 LoRA 适配器,让 Qwen3.8-27B 在 pi harness 下 SWE-bench Pro(hard 51)从 39.2% 提升到 64.7%,Terminal-Bench 2.1 从 39.5% 提升到 55.8%。

推荐理由

原文给出按 harness 训练小 LoRA 的完整配方与修正后评测数据,可迁移到自有编码智能体。

正文 · 原文

How to fit an open model to YOUR coding agent. Super concrete recipe from @ClementDelangue and the @huggingface team, who took @Alibaba_Qwen's Qwen3.8-27B from 39% to 65% on SWE-bench Pro (hard 51) with RL and one small LoRA:

1. Keep the harness, adapt the model.
The same model behaves differently in different harnesses. Each one has its own tools, prompt and control flow. So instead of switching harnesses to get a better model, they train a small LoRA adapter per harness and you swap it in behind the agent you already use. First one is for @pidotdev.

2. Train inside the real, unmodified harness.
The harness runs as is, in its own sandbox per rollout, and training uses exactly the tokens the harness saw. No re-tokenisation, no simplified copy of the agent.

3. Reward correctness, then efficiency.
The reward is the task verifier's correctness plus a tool-efficiency bonus with weight 0.1. Tasks: 750 scale800 tasks mixed with 300 TermGrade tasks, 8 rollouts per task.

4. Keep the adapter small.
LoRA r = 32, alpha = 64, on the attention and MLP projections. Async GRPO in TRL, learning rate 2e-5, 2× B200 per harness. The released checkpoint is step 160. The run was stopped at step 191 of 1,000 planned.

5. Block reward hacking during training.
A proxy called safeagents checks every tool call. Clear attempts to hack the reward are blocked and score 0. In an earlier ablation, turning the guard on changed accuracy by +0.0 ± 4.1 points. It costs nothing.

6. Keep thinking off.
With thinking off, the adapter matches the base model at its highest reasoning effort: 64.7% vs 64.7% on SWE-bench Pro, 56.6% vs 54.2% on Terminal-Bench 2.1, with about 4.5× fewer tokens. Turning thinking on for the adapter adds nothing.

7. Check your evals before you celebrate.
The first version of the model card said 29.4% → 62.7%. Then they found nine base-model runs had failed because the tunnel between the sandboxes and the model server went down. They reran the affected runs on both sides: 39.2% → 64.7%. Smaller jump, still +25.5 points, 15 tasks newly solved vs 2 lost.

The results they report under pi: SWE-bench Pro (hard 51) 39.2% → 64.7%, Terminal-Bench 2.1 39.5% → 55.8%, and less than half the turns on the tasks both models solve (23 vs 59 median on SWE-bench Pro). Apache 2.0, open weights, a GGUF version for llama.cpp, and an @opencode adapter came out today.

And what about "just use a bigger model"?

The interesting thing is that the harness itself becomes training data. You can't do this with a closed model. With an open one, a 27B model you run locally gets fitted to the tools you actually use.

Full recipe blog is promised for Friday. Great work by @yb2698, @LysandreJik, @ben_burtenshaw, @nathanhabib1011 and the team 🤗

Model: http://huggingface.co/harness-hub/Qwen3.8-27B-pi-adapted

来源:Turing Post (Ksenia Se) · x.com