Hugging Face has released a new set of "harness adapters," which are reinforcement learning-trained LoRA adapters designed to optimize large language models for specific agent harnesses and task distributions. The initiative aims to address the inefficiency of using general-purpose models within specialized agentic workflows, demonstrating significant gains in both accuracy and token efficiency.

What Happened

The Hugging Face team trained custom LoRA adapters for the Qwen3.8-27B model, targeting three specific agent harnesses: Pi, OpenCode, and Hermes Agent. By freezing the base model weights and applying RL-trained adapters, the company reports that the model achieves higher performance and lower token usage when operating within its designated harness. For instance, with the Pi harness, the base Qwen3.8-27B scores 39% on Terminal-Bench 2.1 using an average of 2.9K tokens per task. With the custom adapter, the score rises to 55% pass@1 while average token usage drops to 1.5K. The team attributes this efficiency to the model learning to reason less, call fewer tools, and succeed on the first attempt.

The training process utilized TRL's AsyncGRPOTrainer and OpenEnv to perform reinforcement learning directly inside the harnesses. The team generated a custom dataset of 871 tasks from sources including SWE-smith, SWE-Gym, and their own Tasksmith pipeline, ensuring tasks were validated and appropriately difficult for the base model. Each adapter was trained on NVIDIA 2xB200 GPUs, with one GPU handling the vLLM server and the other managing the training process.

Why It Matters

This development highlights a growing trend in AI optimization: tailoring models to specific deployment environments rather than relying solely on general-purpose capabilities. By demonstrating that a single base model can be adapted to multiple harnesses with substantial efficiency gains, Hugging Face provides a reusable recipe for developers to squeeze more performance out of existing infrastructure. The release also includes a "super-adapter," which merges the three specialized adapters into one. While the super-adapter does not always match the peak performance of the specialized versions, it offers a balanced solution for users who operate across multiple harnesses, improving mean pass@1 from 39.5% to 49.0% on Terminal-Bench 2.1 and reducing tool calls by 53–73% on solved tasks.

The Bottom Line

Hugging Face's harness adapters demonstrate that combining reinforcement learning with specific agent harnesses can significantly boost model accuracy and reduce computational costs. The company has released all artifacts, including the adapters, datasets, and training recipes, on the Hugging Face Hub, allowing the broader developer community to replicate and extend this approach for their own model-harness combinations.