Hugging Face Harness Adapters Explained
RL-Trained LoRAs for Qwen3.8-27B in Pi, OpenCode and Hermes Agent: Setup, VRAM, Caveats
Harness Adapters: RL-trained LoRAs for Qwen3.8-27B in Pi, OpenCode and Hermes Agent. Pi lifts Terminal-Bench 2.1 from 40% to 56.5%. Setup, VRAM and caveats.
Harness Adapters are small LoRA adapters trained with reinforcement learning inside a specific agent harness. The base model (Qwen3.8-27B) stays frozen, and Hugging Face has published one adapter each for Pi, OpenCode and Hermes Agent on the Hub. According to the official blog, the Pi adapter lifts Terminal-Bench 2.1 pass@1 from 40.0% to 56.5% and the 51 hardest SWE-bench Pro tasks from 40.0% to 64.0% (thinking off, self-reported).
This article uses the Hugging Face blog post and the Hub model cards as primary sources to cover what is published, how to use it, local-hardware guidance, how it compares with alternatives, and caveats. One correction: InfoQ's piece is dated December 1, but the Hugging Face blog itself was published on November 20, 2026. Secondary sources that say December appear to follow InfoQ's date. All numbers are Hugging Face's own evaluations, not independent reproductions.
What Harness Adapters are: tuning the model to the tool that runs it
A coding agent's behavior depends on its harness as well as the model. The harness hands the model tools (file edits, shell), manages history and parses output. Pi, OpenCode and Hermes Agent each do this differently, and open models often stumble on those differences. For how harness choice moves cost and results, see Coding agent cost can differ 2x by harness.
Harness Adapters train a LoRA with reinforcement learning while actually running the target harness. Per the blog, training uses GRPO (TRL's AsyncGRPOTrainer) with LoRA on all linear layers. The learned weights live in a separate adapter file, so you can swap them without touching the base model.
What it can do and why it matters
- Higher success rates: the Pi adapter goes from 39.5% to 55.8% on Terminal-Bench 2.1 (86 tasks) and from 39.2% to 64.7% on SWE-bench Pro hard-51 (paired comparison on the model card, thinking off)
- Fewer turns and tokens: on solved tasks, median turns drop from 59 to 23 on SWE-bench Pro and from 18 to 8 on Terminal-Bench 2.1 (Pi model card)
- Base stays frozen: adapters are small and can be swapped per harness
- Reproducible materials: adapters, training tasks, trajectories and the recipe are on the Hub
- Safety tooling included: the safeagents plugin reportedly blocked 647 of about 1.3M checked tool calls during training
In practice this adds an option between prompt tweaking and switching to a bigger model: if you already know which harness you use, you can add a small component trained in that exact harness. As noted below, part of the gain comes from finishing within a 100-call budget, so it is not a universal boost.
What is published
The harness-hub collection "qwen38-27b-harness-adapters" contains 11 items. The model items are:
| Adapter (repo) | Harness | Base model | Size / notes |
|---|---|---|---|
| Qwen3.8-27B-pi-adapted | Pi 1.5.2 | Qwen/Qwen3.8-27B | LoRA rank 32, alpha 64, step 160. File size not stated |
| Qwen3.8-27B-hermes-adapted | Hermes Agent v0.22.6 | same | rank 32, step 160 |
| Qwen3.8-27B-opencode-adapted | OpenCode 2.2.7 | same | rank 32, step 150 |
| Qwen3.8-27B-super-adapter | all three | same | rank 96 (three adapters concatenated), applied at half strength |
| -GGUF versions | llama.cpp | same | collection shows 0.2B each for pi/opencode/hermes, 0.5B for super |
All live under the harness-hub organization. The collection also includes RL environment datasets (harness-hub/harness-adapters, ai-and/termgrade-environments), the safety plugin (harness-hub/qwen-safeagents-plugin) and an evaluation-trajectory bucket. The base Qwen3.8-27B is Apache-2.0, and the Pi and super-adapter cards also list apache-2.0. We did not check the license field on the Hermes and OpenCode cards, so verify before use.
The super-adapter merges the three specialists via PEFT concatenation (combination_type="cat"). The blog compared weights of 1/3, 1/2 and 1 on all 89 Terminal-Bench 2.1 tasks and picked 1/2. At weight 1, Hermes reached 62.8% but Pi fell to 40.2%, and the blog explains that a plain sum made agents too terse and hurt Pi.
How to use it
The model cards cover loading with PEFT, merging into the base weights, serving as a LoRA in vLLM, llama.cpp with GGUF, and transformers serve. Below is only what we could confirm; always check each card for the exact full commands.
1. Load with PEFT (Pi example; a minimal form using only the class and repo names, with dtype and device options omitted)
from transformers import AutoModelForCausalLM
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B")
model = PeftModel.from_pretrained(base, "harness-hub/Qwen3.8-27B-pi-adapted")2. Serve as a LoRA in vLLM. These are the flags listed on the Pi card (see the card for the full command and exact ordering).
vllm serve Qwen/Qwen3.8-27B \
--enable-lora --max-lora-rank 32 \
--lora-modules qwen3.8-pi=harness-hub/Qwen3.8-27B-pi-adapted \
--max-model-len 131072 \
--mamba-cache-mode align \
--tool-call-parser qwen3_xml \
--reasoning-parser qwen3 \
--default-chat-template-kwargs '{"enable_thinking": false}'- Set --max-lora-rank to 32 for a specialist and 128 for the super-adapter (rank 96)
- Register adapters as name=repo with --lora-modules; several can be registered on the same base
- Turn thinking off with enable_thinking: false via --default-chat-template-kwargs; specialists were trained with thinking off
- The card also lists --max-model-len 131072, --mamba-cache-mode align (prefix caching), --tool-call-parser qwen3_xml and --reasoning-parser qwen3
3. Configure the harness. For Pi, add a provider in ~/.pi/agent/models.json pointing to http://localhost:8000/v1 with "api": "openai-completions". The card stresses this because the adapter was not trained or evaluated with the Responses API. Hermes Agent uses ~/.hermes/config.yaml (at least 64,000 tokens of context) and OpenCode uses ~/.config/opencode/opencode.json, both pointing to localhost:8000/v1 with the model name.
4. Merge into the weights. Load the base on CPU in BF16, attach the adapter, call merge_and_unload() and save. The result serves like a normal model without LoRA support. The blog also says each LoRA was merged and served alone with vLLM on a single GPU.
VRAM and hardware notes for running locally
Confirmed figures: the merged BF16 checkpoint is about 54 GB (Pi and super-adapter cards). The Qwen3.8-27B card gives no VRAM requirement. Each adapter was trained on two NVIDIA B200 GPUs (one for vLLM, one for training). The GGUF adapters show as 0.2B (0.5B for super) in the collection.
What follows is general guidance, not official numbers. Weight memory is roughly parameters times bytes per parameter: about 54 GB for 27B in BF16 (matching the official figure), roughly 27 to 30 GB at 8-bit and 15 to 18 GB at 4-bit, plus the KV cache, which grows with context length (see Local LLM context length and VRAM). Serving the adapter as a LoRA instead of merging adds a little memory for the adapter.
- BF16 on a single GPU: about 54 GB for weights alone, so an 80 GB-class GPU
- Quantized: the card describes a GGUF path (Q8_0 base plus F16 adapter) for llama.cpp, but the adapter was trained on BF16 weights, lower-bit quantization drifts from trained behavior, and the GGUF version was not re-evaluated
- Context: evaluations used 131,072 tokens; Hermes Agent needs at least 64,000. Longer context means a larger KV cache
The Pi card also describes a macOS setup via Llama.app (ctx-size 32768 in its example). We could not confirm Ollama support from primary sources, so we do not cover it.
Comparison with alternatives
| Aspect | Harness Adapters | Full fine-tune | Prompt-only tuning | Generic coding model as is |
|---|---|---|---|---|
| What changes | Frozen base plus small LoRA | All model weights | Instructions, tool definitions | Nothing |
| Training cost | RL needed (official: 2x B200 per adapter) | Highest | None | None |
| Distribution | Attach or detach an adapter | A separate 27B model | Text files | n/a |
| Harness-specific quirks | Trained in that harness, so effective | Depends on data | Limited | Varies by harness |
| Weak points | Tied to the harness and base; sensitive to quantization | Cost and management | Low ceiling | Many failed tool calls possible |
On related tools: Pi, OpenCode and Hermes Agent are open harnesses where you can swap models, and they are the targets of these adapters. Claude Code and Codex ship as agents paired with their vendors' own models and are outside the scope of these adapters. A fair framing is that Harness Adapters are an add-on for running an open model of your choice inside an open harness. A different Qwen3.8-27B retune is covered in Arete-27B.
For choosing between specialist and super-adapter, the official evaluation helps. With thinking off and a single harness, the specialist tends to score higher (64.0% vs 46.0% on Pi SWE-bench Pro). The super-adapter fits multi-harness use or thinking-on use (mean 55.5% to 63.5% against the thinking-on base), though thinking-on behavior was evaluated but never trained.
Caveats and limits
- Self-reported numbers: evaluations are Hugging Face's own, one attempt per task at temperature 0.8; task counts are small and most per-row differences are within noise per the card
- Inconsistent figures in the blog: Pi SWE-bench Pro appears as 40.0% to 64.0% in the table and 39.2% to 64.7% in the text; the model card uses the latter paired result
- Terminal-Bench is slightly optimistic: the 1/2 merge weight was chosen on Terminal-Bench 2.1
- No cross-harness comparison: Pi compacts context by default while OpenCode and Hermes do not; compare only within a harness
- Budget effect: the base often exhausted its 100-call budget, so part of the gain comes from finishing in time
- Thinking leakage: trained with thinking off, the model sometimes writes short reasoning-like text before tool calls; the authors call it open
- Out-of-distribution results vary: on AutomationBench (300 tasks), base 23.0%, Pi 27.0%, OpenCode 25.3%, merged 23.7%, Hermes 17.7%
- Base dependency: works only with Qwen3.8-27B
- Text only: the vision tower was not served or evaluated
- Data handling: evaluation trajectories contain canary strings and should be kept out of training data
InfoQ notes that Pi's creator, Mario Zechner, corrected a claim that Pi drops earlier reasoning turns, saying the gap comes from auto-compaction. It is a good example of how harness defaults affect results.
FAQ
When were Harness Adapters announced?
The Hugging Face blog post was published on November 20, 2026. InfoQ's coverage is dated December 1, so some write-ups say December, but the primary source says November 20.
Which models and harnesses are supported?
Only Qwen/Qwen3.8-27B as the base, and three harnesses: Pi (1.5.2), OpenCode (2.2.7) and Hermes Agent (v0.22.6). The Pi card says the adapter does not work with other base models.
Can I use them commercially?
The base Qwen3.8-27B is Apache-2.0, and the Pi and super-adapter cards list apache-2.0. We did not check the Hermes and OpenCode cards. Confirm each model card and dataset terms before use.
Should I choose a specialist or the super-adapter?
With one harness and thinking off, the specialist tends to score higher. For switching between harnesses or thinking-on use, the super-adapter (rank 96, half strength) is the option. Test both on your own tasks.
Can I run this on a local GPU?
The merged BF16 checkpoint is about 54 GB. A GGUF path (Q8_0 base plus F16 adapter) exists for llama.cpp, but quantization drifts from trained behavior and the GGUF version was not re-evaluated.
Does it work with Claude Code or Codex?
No, they are not targets. The adapters are for Pi, OpenCode and Hermes Agent when paired with the open Qwen3.8-27B model.
Primary sources: the Hugging Face blog "Introducing harness adapters" (huggingface.co/blog/harness-adapters-at-scale), the collection (huggingface.co/collections/harness-hub/qwen38-27b-harness-adapters), the individual model cards and the Qwen/Qwen3.8-27B card. InfoQ (December 1, 2026) was also consulted as commentary.
株式会社オブライト
Oflight Inc. is a Tokyo-based IT company providing software development, digital signage, web development, network systems, and IoT/AR/VR technology services.
Related free tools (no sign-up, instant results)
Feel free to contact us
Contact Us