BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Hugging Face Introduces Harness Adapters to Specialize Open Models for Agent Runtimes

Hugging Face Introduces Harness Adapters to Specialize Open Models for Agent Runtimes

Listen to this article -  0:00

Hugging Face has published a reproducible recipe for harness adapters: small LoRA adapters trained with reinforcement learning inside a specific agent harness, while the base model stays frozen. The release includes adapters for Qwen3.8-27B under Pi, OpenCode, and Hermes Agent, plus a merged super-adapter, GGUF builds, training tasks, and a safeagents plugin, all in a Hugging Face collection.

According to Hugging Face, general-purpose models leave accuracy and tokens on the table once they run inside a particular coding agent. Qwen3.8-27B scores 39% pass@1 on Terminal-Bench 2.1 under Pi and uses about 2.9K tokens per task; a LoRA trained inside that harness reaches 55% at 1.5K tokens, mainly by calling fewer tools and succeeding on the first attempt. The company reports a similar jump on the 51 hardest SWE-bench Pro tasks, from 39.2% to 64.7% under Pi.

Unlike many RL setups that reimplement the agent loop, the recipe runs the shipping harness and trains on tokens a proxy records between the harness and vLLM. Training uses TRL's AsyncGRPOTrainer and OpenEnv, and Harbor. Tasks from SWE-smith, SWE-Gym, and Repo2RLEnv's Tasksmith pipeline must pass openenv validate and a difficulty screen that keeps only problems the base model sometimes solves. Each adapter was trained on two NVIDIA B200 GPUs, with thinking turned off.

Hugging Face then concatenated the three rank-32 LoRAs into a rank-96 super-adapter, scaled at half strength after a plain sum made agents too terse and hurt Pi. With thinking off, the company says each harness's own adapter still leads on most comparisons and is the better choice when only one harness is in use. The super-adapter, though not trained with thinking on, is reported to beat or tie the thinking base model on all six harness-benchmark pairs while cutting tool calls. Hugging Face notes the Terminal-Bench figures are slightly optimistic because the merge weight was chosen on that benchmark.

The results should not be compared across harnesses, the team warns, because Pi applies context compaction by default and OpenCode and Hermes do not. On 300 AutomationBench tasks, run in that benchmark's own agent loop, the adapters stayed close to the base model. The team also found that adapters trained with thinking off sometimes emit short, reasoning-like text before a tool call, which they describe as reasoning leakage.

Mario Zechner, who created the Pi coding agent, posted a correction on X. Hugging Face had written that Pi does not keep previous reasoning turns, unlike OpenCode and Hermes. Zechner said Pi does send each assistant turn back with its reasoning_content, and that the gap is auto-compaction: 16 of 51 of the published SWE-bench Pro thinking runs compacted.

That's your context overflow difference, not dropped reasoning.

On the merged adapter, @MrNirmata argued that the specialist is still the one to ship. The blog's own table, with thinking off, shows the Pi adapter at 64% on SWE-bench Pro hard-51 versus 46% for the super-adapter:

Concatenation is a cool experiment. It is not a free lunch across harnesses.

Independently, Hacker News commenter Wheen wrote that:

Qwen3.8-27B Fails a lot of basic tool calls in Pi and this seems to mitigate that.

The same idea of keeping the production harness in the training loop appears in Agent Lightning v1.0 and in SkyRL's Harbor integration. Other RL stacks, including verl, SkyRL-Gym, rLLM, and ART, typically train against a reimplemented agent interface rather than the unmodified runtime.

The adapters, training data, trajectories, and recipe are available on the Hugging Face Hub, starting from the blog post and the Qwen3.8-27B harness-adapter collection.

About the Author

Rate this Article

Adoption
Style

BT