harness-hub/Qwen3.8-27B-pi-adapted
!(banner.png) A LoRA adapter for Qwen/Qwen3.8-27B(https://huggingface.co/Qwen/Qwen3.8-27B), trained with reinforcement learning to work as the model behind the pi(https://github.com/earendil-works/pi) coding agent on software-engineering and terminal...
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của ngày
#1 Repository của tuần
#1 Repository của ngày

A LoRA adapter for Qwen/Qwen3.8-27B, trained with reinforcement learning to work as the model behind the pi coding agent on software-engineering and terminal tasks.
- Terminal-Bench 2.1: 39.5% → 55.8% under pi (+16.3 points); 62% fewer tool calls per task.
- SWE-bench Pro (hard 51): 29.4% → 62.7% under pi (+33.3 points); 55% fewer tool calls per task.
Full recipe will be shared in the release blogpost for anyone to build their own harness adapter.
Pick your setup
A real SWE-bench Pro task under pi: the base model searches and re-runs snippets until it hits the 100-step limit; this adapter finds the function, edits it, runs the tests and fixes the last case, in 8 tool calls.

Still version, and the task

Task: instance_ansible__ansible-d62496fe416623e88b90139dc7917080cb04ce70 from SWE-bench Pro (hard 51), fix
human_to_bytes. Both runs are from the evaluation above: the base model was graded 0, this adapter 1. Each line is one
tool call as the trajectory recorded it, cut to fit.
Results

Full paired results (intervals, sign tests, tool calls on the tasks both solved)
Evaluated with the pi harness, one attempt per task at temperature 0.8, thinking off, paired against the base model under pi on the same tasks. The interval is 95%; the p-value is an exact sign test on the tasks that changed outcome. Tool calls are compared over every task, and on the tasks both solved (their number in brackets).
| Benchmark | Tasks | Base model | This adapter (step 160) | Difference (points) | Newly solved / lost | Tool calls per task | Tool calls, tasks both solved |
|---|---|---|---|---|---|---|---|
| Terminal-Bench 2.1 | 86 | 39.5% | 55.8% | +16.3 ± 9.1 | 16 / 2 (p = 0.0013) | -62% | -48% (32) |
| Terminal-Bench 2.1, the 68 tasks not used to pick the checkpoint | 68 | 39.7% | 55.9% | +16.2 ± 10.6 | 13 / 2 (p = 0.0074) | -64% | -32% (25) |
| SWE-bench Pro (hard 51) | 51 | 29.4% | 62.7% | +33.3 ± 14.2 | 18 / 1 (p = 7.6e-05) | -55% | -59% (14) |
- Terminal-Bench 2.1: all 89 tasks of Terminal-Bench 2.1, 1 h and 100 agent steps per task.
- SWE-bench Pro (hard 51): the 51 hardest tasks of SWE-bench Pro, 2 h and 100 agent steps per task.
Step 160 was picked by looking at the checkpoints' scores on SWE-bench Pro and on an 18-task subset of Terminal-Bench 2.1, tracked during training.
Use with pi
Serve the adapter with vLLM and point pi at it
1. Serve the adapter with vLLM
vllm serve Qwen/Qwen3.8-27B \
--enable-lora --max-lora-rank 32 \
--lora-modules qwen3.8-pi=harness-hub/Qwen3.8-27B-pi \
--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
This is the configuration of the evaluations. Thinking is off, as in training: the adapter was never trained with it.
Prefix caching on this hybrid model needs --mamba-cache-mode align; without it, every agent turn re-reads its whole
history.
2. Point pi at it
Install pi (Node.js 22.19 or newer):
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
Add the server to ~/.pi/agent/models.json:
{
"providers": {
"local": {
"baseUrl": "http://localhost:8000/v1",
"api": "openai-completions",
"apiKey": "dummy",
"models": [{ "id": "qwen3.8-pi" }]
}
}
}
"api": "openai-completions" matters: without it pi uses the Responses API, which this adapter was not trained or
evaluated with.
pi --provider local --model qwen3.8-pi --print "Find out why the tests in tests/test_parser.py fail and fix the bug."
Use with pi (transformers serve)
Serve with transformers and point pi at it
transformers serve is a lightweight OpenAI-compatible
server, for local use and experimentation (vLLM is faster under load). It handles Qwen's tool calls out of the box.
Serve the merged checkpoint from Merge the adapter into the base model:
pip install "transformers[serving]"
transformers serve ./Qwen3.8-27B-pi-merged --dtype bfloat16 --continuous-batching --reasoning off
--reasoning off keeps thinking off, as in training. The server listens on http://localhost:8000, so the pi
configuration from the vLLM section works as is, with the model id set to the name the server
serves, here ./Qwen3.8-27B-pi-merged:
pi --provider local --model ./Qwen3.8-27B-pi-merged --print "Find out why the tests in tests/test_parser.py fail and fix the bug."
Use with pi (llama.cpp)
Serve the GGUF adapter with llama.cpp and point pi at it
The GGUF version of this adapter is in harness-hub/Qwen3.8-27B-pi-GGUF. It runs on top of a GGUF of the base model:
hf download ggml-org/Qwen3.8-27B-GGUF Qwen3.8-27B-Q8_0.gguf --local-dir .
hf download harness-hub/Qwen3.8-27B-pi-GGUF Qwen3.8-27B-pi-lora-F16.gguf --local-dir .
llama serve -m Qwen3.8-27B-Q8_0.gguf --lora Qwen3.8-27B-pi-lora-F16.gguf \
--chat-template-kwargs '{"enable_thinking": false}' -c 65536 --port 9931 --alias qwen3.8-pi
Then point pi at it with the pi-llama extension:
pi install git:github.com/huggingface/pi-llama
pi --model llama-cpp/qwen3.8-pi
The adapter was trained on the BF16 weights: the closer the base GGUF is to them, the closer you get to the trained
behavior. Q8_0 is a good default; lower-bit quants drift further. The GGUF version has not been re-evaluated.
Run it with Llama.app (macOS)
Load the GGUF adapter on top of a Qwen3.8-27B GGUF
-
Install Llama.app and launch it once. On first launch it creates
~/.config/llama/models.user.ini. -
Download the adapter and register the model:
LORA=$(hf download harness-hub/Qwen3.8-27B-pi-GGUF Qwen3.8-27B-pi-lora-F16.gguf) cat >> ~/.config/llama/models.user.ini <<EOF [harness-hub/Qwen3.8-27B-pi] hf-repo = unsloth/Qwen3.8-27B-GGUF:Q4_K_XL ; This is just an example but you can also use any GGUF that is derived from Qwen3.8-27B lora = $LORA temp = 0.7 ctx-size = 32768 EOFhf-reposets the base model: the app downloads it on first use, about 17 GB. To use another quant of the same base, change the part after the colon, for example:Q8_0. -
Restart Llama.app and choose harness-hub/Qwen3.8-27B-pi from the model list.
You can also use it through the app's OpenAI-compatible server. Llama.app shows the port; the example below uses 9931:
curl localhost:9931/v1/chat/completions -d '{"model":"harness-hub/Qwen3.8-27B-pi","messages":[{"role":"user","content":"hi"}]}'
The adapter must be loaded on top of Qwen3.8-27B. It does not work with other base models.
Merge the adapter into the base model
Get a standalone model, with no LoRA at serving time
The adapter can be merged into the base weights with PEFT. The result is a regular Qwen3.8-27B checkpoint (about 54 GB in BF16) that any engine serves without LoRA support. Merge on CPU if the GPU is needed for serving afterwards:
import torch
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoTokenizer
base = AutoModelForImageTextToText.from_pretrained("Qwen/Qwen3.8-27B", dtype=torch.bfloat16, device_map="cpu")
model = PeftModel.from_pretrained(base, "harness-hub/Qwen3.8-27B-pi").merge_and_unload()
model.save_pretrained("Qwen3.8-27B-pi-merged")
AutoTokenizer.from_pretrained("harness-hub/Qwen3.8-27B-pi").save_pretrained("Qwen3.8-27B-pi-merged")
Then serve it like the base model, without the LoRA flags:
vllm serve Qwen3.8-27B-pi-merged --served-model-name qwen3.8-pi \
--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
The similar approach can be also adopted and used to serve with llama.cpp and serve the merged GGUF file.
Training
Method, data, hyperparameters and hardware
| Method | AsyncGRPO (TRL, experimental), LoRA |
| Environment | Harbor tasks served by OpenEnv, rollouts in HF sandboxes, tool calls screened by safeagents |
| Harness | pi |
| Tasks | 750 scale800 tasks interleaved with 300 TermGrade tasks; 1,919 task groups trained up to this checkpoint |
| Reward | the task verifier's correctness (falls back to reward), plus a tool-efficiency bonus of weight 0.1 |
| Steps | 160 (this checkpoint); the run was stopped at step 191 of 1000 planned |
| Learning rate | 2e-5 |
| LoRA | r = 32, alpha = 64, on q, k, v, o, gate, up and down projections |
| Rollouts | 8 per task, temperature 0.8, thinking off, up to 50 agent steps and 1,800 s per rollout |
| Batch | 16 micro-batches of up to 65,536 tokens per step, rollouts up to 16 policy versions stale |
| Hardware | 2× NVIDIA B200 per harness: vLLM on one, the trainer on the other |
The training script is
examples/async_grpo_harbor in TRL.
Below is an animated training curve of the evolution of the number of tool calls on the train set:

For a full write-up, please refer to the release blogpost.
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
autotrust/JEV-27B-VL JEV-27B that can see: the same System 1 decisions and System 2, now on images autotrust/JEV-27B-VL is autotrust/JEV-27B(https://huggingface.co/autotrust/JEV-27B) with vision. | | what it does | output | |---|---|---| | System 1...
!(banner.png) A LoRA adapter for Qwen/Qwen3.8-27B(https://huggingface.co/Qwen/Qwen3.8-27B), trained with reinforcement learning to work as the model behind the OpenCode(https://opencode.ai) coding agent on software-engineering and terminal tasks. !Ti...
One LoRA adapter for Qwen/Qwen3.8-27B(https://huggingface.co/Qwen/Qwen3.8-27B) behind three coding agents: pi(https://github.com/earendil-works/pi), Hermes Agent(https://github.com/NousResearch/hermes-agent) and OpenCode(https://opencode.ai). It merg...
!(banner.png) A LoRA adapter for Qwen/Qwen3.8-27B(https://huggingface.co/Qwen/Qwen3.8-27B), trained with reinforcement learning to work as the model behind Hermes Agent(https://github.com/NousResearch/hermes-agent) on software-engineering and termina...
Qwen3.8-27B !Note This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format. These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, TokenSpeed, etc. !Tip F...
📰 Tech Blog | 📄 Full Report 1. Model Introduction Kimi K3 is an open-weight, native multimodal agentic model and our most capable model to date. It is a 2.8T-parameter model built on Kimi Delta Attention (K...
Qwen3.8-Flash-Next !Note This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format. These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, TokenSpeed, etc....
Unlimited OCR Works Welcome the Era of One-shot Long-horizon Parsing. Release - 2026/06/23 📄 Our paper is now available on arXiv(https://arxiv.org/abs/2606.23050). - 2026/06/23 🤝 Thanks to the ModelScope community for their support. Our model is n...
Hugging Face | GitHub | Launch Blog | Documentation License: Apache 2.0 | Authors: Google DeepMind Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on small...