Editorial

Qwen3.8-27B LoRA for Hermes, pi and OpenCode

Hugging Face LoRA adapters lift Qwen3.8-27B under Hermes Agent, pi and OpenCode with thinking off. Scores, VRAM and serve flags.

JJyoti Ranjan SwainUpdated
Qwen3.8-27B harness adapters: pi 39.2% to 64.7% on SWE-bench Pro hard 51 with thinking off, 304 MiB LoRA

Hugging Face published three LoRA adapters for Qwen3.8-27B on 16 November 2026, one each for the pi, Hermes Agent and OpenCode coding agents, plus a fourth "super-adapter" that merges all three. The write-up followed on 20 November. Each adapter was trained with reinforcement learning inside the agent it targets, so the model learned that harness's tool names, its prompt layout and its habits.

The pitch is thinking-level accuracy with thinking switched off. On the pi adapter's card, Terminal-Bench 2.1 goes from 39.5% to 55.8% and the hard 51-task slice of SWE-bench Pro goes from 39.2% to 64.7%, with no reasoning tokens at all. That changes two bills if you run a 27B model yourself: output tokens per task, and the time the GPU spends producing them. The VRAM cost of the adapter is small. Below are the scores per harness, which file to pick, what it adds to memory, and the serve commands with the flags that are easy to miss.

Table of contents

What harness-hub released

All the files sit under the harness-hub organization on Hugging Face. None of them is a full model. They're low-rank updates you load on top of the stock Qwen/Qwen3.8-27B weights.

AdapterHarnessLoRA rankGGUF adapter file
Qwen3.8-27B-pi-adaptedpi32318,802,304 bytes
Qwen3.8-27B-hermes-adaptedHermes Agent32318,802,400 bytes
Qwen3.8-27B-opencode-adaptedOpenCode32318,802,400 bytes
Qwen3.8-27B-super-adapterall three96956,336,640 bytes

The specialists use rank 32 and alpha 64 on all seven projection matrices (q, k, v, o, gate, up, down). Training used TRL's experimental AsyncGRPO on Harbor tasks served through OpenEnv, with 8 rollouts per task, thinking off, and a small tool-efficiency bonus in the reward. The pi run used 750 scale800 tasks interleaved with 300 TermGrade tasks, on two B200s per harness. The released pi checkpoint is step 160 of a run stopped at 191.

The blog post names the harness versions baked into the training images: pi 1.5.2, OpenCode 2.2.7 and Hermes Agent v0.22.6. That's worth knowing before you upgrade your agent and wonder why the adapter feels less sharp. All four repos are Apache 2.0.

Scores under each harness

Every number here is self-reported by the authors, one attempt per task, a 100-step budget and a 131,072-token context, at temperature 0.8. The cards warn that these runs aren't comparable with the Qwen3.8-27B model card, which used other harnesses, maximum-effort thinking and the full SWE-bench Pro. They also can't be compared across harnesses, because pi compacts context by default and Hermes Agent and OpenCode don't.

Thinking off, base model against its own specialist:

HarnessSWE-bench Pro (hard 51)Terminal-Bench 2.1
pi39.2% → 64.7%39.5% → 55.8%
Hermes Agent29.4% → 43.1%44.7% → 58.8%
OpenCode35.3% → 51.0%46.4% → 52.4%

Some of these gains are shakier than others. The Hermes SWE-bench Pro jump is 10 tasks newly solved against 3 lost, with p = 0.092, so it doesn't clear the usual 0.05 bar on 51 tasks. The Hermes Terminal-Bench result (19 against 7, p = 0.029) and both pi results (p = 0.0023 and 0.0013) do. OpenCode's +6.0 on Terminal-Bench becomes +13.6 on the 66 tasks that weren't used to pick the checkpoint.

Both the pi and Hermes cards carry correction notes. An earlier pi card said 29.4% → 62.7% on SWE-bench Pro, before nine base-model rollouts that had died on a dropped network tunnel were rerun. The Hermes adapter first shipped as harness-hub/Qwen3.8-27B-hermes claiming 27.5% → 49.0%. Publishing those corrections makes me trust the current numbers more.

Hermes Agent, SWE-bench Pro hard 51: base 29.4%, base thinking 45.1%, adapter 43.1%, super-adapter thinking 60.8%

Specialist or super-adapter

The super-adapter is the three specialists merged by concatenation, each at weight ½, which is why its rank is 96 (3 x 32). No extra training went into it. Its card says to use it with thinking on, and the numbers back that up:

HarnessBenchmarkBase, thinkingSuper-adapter, thinking
piSWE-bench Pro74.0%74.0%
Hermes AgentSWE-bench Pro45.1%60.8%
OpenCodeSWE-bench Pro47.1%66.7%
piTerminal-Bench 2.152.9%57.6%
Hermes AgentTerminal-Bench 2.158.8%63.5%
OpenCodeTerminal-Bench 2.154.9%58.5%

With thinking off, the specialists win on four of six pairs. Under pi the gap is large: 64.0% for the specialist against 46.0% for the super-adapter on SWE-bench Pro.

So the choice comes down to two questions. If you use one harness and keep thinking off, load its specialist. If you switch between agents, or you want the highest score and can pay for reasoning tokens, load the super-adapter with thinking on. Under Hermes Agent on SWE-bench Pro it's 15.7 points above the base model thinking at the same effort.

There's a catch for Hermes users with thinking on. The Hermes card explains that Hermes Agent sends each turn's reasoning back to the model, and with no compaction configured many thinking-on sessions ran past the 131,072-token window and were scored as failures. If you turn thinking on, turn on Hermes' context compression too, or expect long sessions to die.

Output tokens per task, costed

Nobody hosts the adapters as a paid API yet, so this is a way to put a number on the efficiency claim, not a bill you'll get. DeepInfra serves the base Qwen3.8-27B at $0.20 per million input tokens, $0.05 cached and $2.50 output. At that output rate, here are the medians from the Hermes adapter's card, over tasks both runs solved:

BenchmarkBase, thinkingHermes adapterOutput cost per task, base vs adapter
SWE-bench Pro22.5k tokens6.5k tokens$0.0563 vs $0.0163
Terminal-Bench 2.121.0k tokens4.8k tokens$0.0525 vs $0.012

Over 1,000 SWE-bench-sized tasks, that's $56.25 of output against $16.25. Input is a separate line and depends on how much repo context each turn re-reads, so I've left it out. On pi the difference is bigger: 48.8k generated tokens per task for the base model with thinking, 9.4k for the adapter, 5.19x fewer.

The same ratio applies to wall-clock time on your own GPU, which is the cost most people running a 27B model locally will feel. Fewer turns help too. On SWE-bench Pro tasks both solved, the Hermes adapter needed 22 turns and 28 tool calls where the base model needed 59 and 63.

To try other token counts, the API cost calculator now lists Qwen3.8-27B under DeepInfra at these list rates.

VRAM with the adapter loaded

The adapter barely moves the memory total. The specialist GGUF is 304 MiB and the super-adapter is 912 MiB, both F16.

The rest is the base model's math. Qwen3.8-27B has 64 layers, but only 16 are full attention, each caching keys and values for 4 heads of 256 values. In FP16 that's 2 x 16 x 4 x 256 x 2 bytes, or 65,536 bytes per token. The 48 Gated DeltaNet layers hold a fixed 144 MiB state. File sizes are from ggml-org/Qwen3.8-27B-GGUF, converted to GiB:

Base GGUFWeights+ specialist, 64K+ specialist, 128K+ super-adapter, 64K
Q8_026.63 GiB31.07 GiB35.07 GiB31.66 GiB
Q4_K_M18.07 GiB22.51 GiB26.51 GiB23.10 GiB
BF1650.11 GiB54.55 GiB58.55 GiB55.14 GiB

Compute buffers and the CUDA context come on top, so leave 1 to 2 GiB free. The cards recommend Q8_0 as the base, because the adapter was trained on BF16 weights and "lower-bit quants drift further." The GGUF versions haven't been re-evaluated at all. On a 32 GB card, Q8_0 at 64K is 31.07 GiB, which is too tight once buffers load. A q8_0 KV cache halves the 4 GiB cache line and gets you back under. On a 24 GB card you're on Q4_K_M at 22.51 GiB with a 64K window, and you accept some drift from the trained behavior.

Hermes Agent wants at least 64,000 tokens of context, so 64K is the floor for that harness, not a nice-to-have. The AI VRAM calculator has a Qwen3.8 27B preset that counts only the 16 attention layers. Add the adapter's 0.3 GiB by hand.

Qwen3.8-27B base GGUF plus a 304 MiB harness LoRA, served by vLLM or llama.cpp to Hermes Agent, pi or OpenCode

Serving it behind Hermes Agent or pi

vLLM loads the stock base model and attaches the adapter by name. This is the evaluation setup from the Hermes card:

bash
vllm serve Qwen/Qwen3.8-27B \
  --enable-lora --max-lora-rank 32 \
  --lora-modules qwen3.8-hermes=harness-hub/Qwen3.8-27B-hermes-adapted \
  --language-model-only --enable-prefix-caching --mamba-cache-mode align \
  --enable-auto-tool-choice --tool-call-parser qwen3_xml --reasoning-parser qwen3 \
  --default-chat-template-kwargs '{"enable_thinking": false}' \
  --max-model-len 131072

Three flags are easy to drop by accident:

  • --mamba-cache-mode align. Without it, prefix caching doesn't work on this hybrid model and every agent turn re-reads the whole history.
  • enable_thinking: false. The specialists were trained with thinking off. With it on, the pi card reports about 4x more tokens "for at most a few more solved tasks."
  • --max-lora-rank. The super-adapter is rank 96 and vLLM only accepts certain limits, so its card uses --max-lora-rank 128.

Then point Hermes Agent at the server in ~/.hermes/config.yaml:

yaml
model:
  default: qwen3.8-hermes
  provider: custom
  base_url: http://localhost:8000/v1
  api_key: dummy

For pi, add a provider to ~/.pi/agent/models.json with "api": "openai-completions". Leave that field out and pi falls back to the Responses API, which the adapter was never trained or evaluated with. If you're editing these files by hand, paste them into the JSON formatter first to catch a stray comma.

On a single consumer card, llama.cpp takes the base GGUF plus the adapter file:

bash
hf download ggml-org/Qwen3.8-27B-GGUF Qwen3.8-27B-Q8_0.gguf --local-dir .
hf download harness-hub/Qwen3.8-27B-hermes-adapted-GGUF Qwen3.8-27B-hermes-lora-F16.gguf --local-dir .

llama serve -m Qwen3.8-27B-Q8_0.gguf --lora Qwen3.8-27B-hermes-lora-F16.gguf \
  --chat-template-kwargs '{"enable_thinking": false}' -c 65536 --port 8080 --alias qwen3.8-hermes

Use base_url: http://localhost:8080/v1 in the Hermes config for that one. If your engine has no LoRA support, PEFT's merge_and_unload() folds the adapter into a regular checkpoint of about 54 GB in BF16, which any server can load. The adapter only works on Qwen3.8-27B. It won't load onto DaisyRose-27B or other fine-tunes with any guarantee, since their weights moved.

FAQ

Does the Hermes adapter work with other agents?

It loads, but the gains were measured only inside Hermes Agent. For several agents, use the super-adapter, which beats the base model under all three harnesses.

Can I run it on a 16 GB GPU?

Not comfortably. Q4_K_M weights alone are 18.07 GiB before any KV cache. A lower quant of the base would fit, but the cards say quality drifts further below Q8_0 and nobody has tested those combinations.

Is the training recipe public?

Yes. The training script is examples/async_grpo_harbor in TRL, the task datasets are on the Hub, and every evaluation trajectory is in the harness-hub/harness-adapters-trajectories bucket.

Sources

  • Hugging Face, harness-hub/Qwen3.8-27B-pi-adapted model card and adapter_config.json (read 23 November 2026): benchmark tables, paired results and p-values, work-per-task medians, thinking comparison, correction notes, vLLM, pi, llama.cpp and merge commands, training table.
  • Hugging Face, harness-hub/Qwen3.8-27B-hermes-adapted model card (read 23 November 2026): Hermes results, p-values, turns, tool calls and generated tokens, context-window note, earlier Qwen3.8-27B-hermes figures, Hermes config and 64,000-token minimum.
  • Hugging Face, harness-hub/Qwen3.8-27B-opencode-adapted and harness-hub/Qwen3.8-27B-super-adapter model cards and adapter config (read 23 November 2026): OpenCode results, super-adapter merge method, rank 96, thinking-on table, --max-lora-rank 128.
  • Hugging Face blog, "Introducing harness adapters" (published 20 November 2026): harness versions, merge-weight comparison, cross-harness caveat on context compaction.
  • Hugging Face file listings for the four -GGUF adapter repos and ggml-org/Qwen3.8-27B-GGUF (read 23 November 2026): file sizes in bytes. Qwen/Qwen3.8-27B config.json: 64 layers, 16 full-attention, 4 KV heads, head dim 256.
  • DeepInfra model API (api.deepinfra.com/v1/openai/models, read 23 November 2026): Qwen3.8-27B input, cached and output rates.
  • Per-task costs, GiB conversions and memory totals are calculated by ToolMintX from those figures. Compute buffers are not included.

Tools In This Article

Browser-based, no sign-up. Try them while the topic is fresh.

More From ToolMintX

Other Blog Posts