Hugging Face released Harness Adapters, which use reinforcement learning to optimize models for specific agent harnesses and task distributions.
TL;DR
Harness Adapters improve model accuracy and efficiency for custom tasks by training a LoRA adapter with reinforcement learning. This method optimizes models like Qwen3.8-27B for specific agent harnesses, leading to better performance and lower token usage. The adapters are reusable and can be applied to various model and harness combinations.
Key facts
- Maker: Hugging Face
- What's new: RL-trained LoRA adapters for specific agent harnesses and tasks
- Context: Models are not fully optimized for all harnesses and tasks
- Benchmark: Qwen3.8-27B with pi harness improved from 39% to 55% pass@1
- Efficiency: Qwen3.8-27B with pi harness reduced token usage from 2.9K to 1.5K
What is it?
Harness Adapters are custom LoRA adapters trained with reinforcement learning to optimize a model for a specific agent harness and task distribution. They improve the model's performance and efficiency for the intended use case. This approach addresses the issue of models being generally optimized rather than tailored for specific applications.
How does it work?
The process involves freezing the base model's weights and adding a custom RL-trained LoRA adapter. Reinforcement learning is applied within the target harness using a custom task dataset. This training allows the adapter to learn how to make the model reason less, call fewer tools, and perform better on the first attempt.
Why does it matter?
This technology allows users to get more accurate and efficient results from their models for specific tasks. By tailoring models to particular harnesses, it reduces token usage and improves overall performance. This means models can achieve better outcomes with fewer computational resources.
Who is it for?
Developers and researchers who want to optimize large language models for specific agent harnesses and custom task distributions.
Try it
All artifacts, including adapters, GGUFs, RL tasks, and a safeagents plugin, are available through a Hugging Face collection.
Frequently asked questions
What is a harness adapter?
A harness adapter is a custom LoRA adapter trained using reinforcement learning. It is designed to optimize a base model for a specific agent harness and a particular distribution of tasks. This helps the model perform more accurately and efficiently in that targeted environment.
How do harness adapters improve model performance?
Harness adapters improve performance by enabling the model to reason less, call fewer tools, and achieve better results on the first attempt for specific tasks. For example, Qwen3.8-27B's Terminal-Bench 2.1 score with the pi harness improved from 39% to 55% pass@1 with an adapter.
Do harness adapters reduce token usage?
Yes, harness adapters can reduce token usage. The Qwen3.8-27B model with the pi harness, when equipped with a custom RL-trained LoRA adapter, saw its average token usage per task decrease from 2.9K to 1.5K.
What models and harnesses were used for training?
The Qwen3.8-27B model was used as the base. LoRA adapters were trained for three agent harnesses: Pi, OpenCode, and Hermes Agent. The training was conducted using TRL's AsyncGRPOTrainer, OpenEnv, and Harbor.
Sources
Follow news like this automatically
RAI AI watches news, X, Telegram and Reddit for the topics you choose and sends a short AI summary to the app, email or Telegram. Try RAI AI free for 7 days