harness-hub's thinking pi adapter for Qwen3.8-27B on a Mac: MLX and GGUF builds
NetProjects
harness-hub trained a LoRA adapter for Alibaba Cloud's Qwen3.8-27B with reinforcement learning (AsyncGRPO in TRL) with thinking on, so that it works as the model behind the pi coding agent on software-engineering and terminal tasks, and released the step-90 checkpoint, chosen from steps 70, 90, 120 and 150. It is the thinking counterpart of harness-hub's pi adapter, which was trained with thinking off and which we also publish: https://netprojects.com/insights/harness-hub-qwen3-8-27b-pi-adapted-coding-agent-mlx-gguf
Under pi, with thinking on and one attempt per task, harness-hub reports 76.5% on SWE-bench Pro (hard 51), against 74.5% for both the base model and the pi adapter with thinking on, and 57.5% on Terminal-Bench 2.1 (87 tasks), against 59.8% for the pi adapter and 60.9% for the base model, both with thinking on. It treats the three as level, since none of the differences is significant. The gain is in length: on the SWE-bench Pro tasks all three solve, the adapter needs 26.7k output tokens per task where the pi adapter with thinking on needs 46.0k, 42% fewer (mean), and on Terminal-Bench 2.1 6.9k against 10.7k, 35% fewer (median). These are harness-hub's figures, from its own setup with a 100-step budget, text only, and not comparable with the results on the Qwen3.8-27B model card; we have not reproduced them.
We merged the adapter into Qwen3.8-27B, kept the vision encoder and Qwen's own multi-token-prediction (MTP) layer, and published four ready-to-run MLX builds for Macs with Apple Silicon, the adapter on its own for mlx-lm, and GGUF files for llama.cpp that need no LoRA options. Everything is under the Apache-2.0 licence.
Always up to date. We keep these builds current on Hugging Face. When harness-hub releases a new version of the adapter, we rebuild, re-test and publish it there, so the links on this page always point to the latest version. The numbers in this article were measured on the version named in each section; the model cards on Hugging Face carry the current figures.
- Hugging Face: https://huggingface.co/netprojects
- NetProjects MLX builds collection: https://huggingface.co/collections/netprojects/netprojects-mlx-builds
What we released
Merged from harness-hub's adapter at revision c85fad6 and Qwen3.8-27B at revision 3756181. The MLX builds were converted with mlx-vlm; the quantised ones use affine quantisation with group 64. Peak memory is for an 8K-token prompt with mlx-lm (text).
| Hugging Face | Size | Same next token as bf16 | GSM8K, 50 questions | Peak memory | Suggested Mac memory |
|---|---|---|---|---|---|
| netprojects/Qwen3.8-27B-think-pi-adapted-MLX-6bit (recommended) | 23.1 GB | 98.8% | 46/50 | 23.4 GB | 36 GB+ |
| netprojects/Qwen3.8-27B-think-pi-adapted-MLX-8bit | 30.0 GB | 99.1% | 44/50 | 29.7 GB | 48 GB+ |
| netprojects/Qwen3.8-27B-think-pi-adapted-MLX-4bit | 16.3 GB | 96.0% | 46/50 | 17.1 GB | 32 GB+ |
| netprojects/Qwen3.8-27B-think-pi-adapted-MLX-bf16 | 55.6 GB | reference | 45/50 | 53.4 GB | 96 GB+ |
| netprojects/Qwen3.8-27B-think-pi-adapted-MLX-adapter | 638 MB | LoRA only, for mlx-lm | – | – | – |
The GGUF repository, netprojects/Qwen3.8-27B-think-pi-adapted-GGUF, has Q6_K (22.4 GB, recommended) and Q4_K_M (16.8 GB), each with the MTP layer, plus a 0.9 GB vision projector for image input. Compared with the BF16 GGUF, they pick the same next token on 98.6% and 94.2% of positions. harness-hub publishes its own merged Q8_0 file.
How well it matches the original
Measured on 24 November 2026, MacBook Pro M5 Max (128 GB), with mlx 0.32.4, mlx-lm 0.32.2 and mlx-vlm 0.7.11.
- Merge: all 256 adapted modules equal the base weight plus 2.0 times the LoRA product, rounded to bf16, checked element by element against an independent computation. Every other tensor, including the vision encoder and the MTP layer, is the same as in Qwen3.8-27B, byte for byte.
- Quantisation: each quantised MLX build is exactly the affine (group 64) quantisation of the bf16 build.
- Thinking on, as the adapter was trained, at the chat template's default effort: the 6-bit and 4-bit MLX builds each answered two short reasoning questions correctly, after one closed thinking block and with no looping (median 114 and 94 thinking tokens).
- Agreement with bf16, thinking off, on 12 short teacher-forced prompts (951 positions): 8-bit 99.1%, 6-bit 98.8%, 4-bit 96.0%.
- GSM8K, 50 fixed test questions, greedy, thinking off: 8-bit 44/50, 6-bit 46/50, 4-bit 46/50, against 45/50 for the bf16 build.
- Tool calling: with the included chat template and thinking off, the 8-bit, 6-bit and 4-bit MLX builds and both GGUF files each produced a well-formed bash tool call on an agent-style prompt.
- Coding: three short Python tasks run against asserts, 3 of 3 on the 8-bit, 6-bit and 4-bit MLX builds and on both GGUF files.
- Vision: the 8-bit, 6-bit and 4-bit MLX builds, and both GGUF files with the vision projector, described a test image correctly.
- MTP: the 4-bit MLX build and the Q4_K_M GGUF file loaded and decoded with the bundled MTP layer.
- Source files: every file of both pinned upstream revisions matches the Hub's SHA-256 hashes.
Try it
Keep thinking on: harness-hub trained and evaluated the adapter that way, with up to 32,768 output tokens per model call, so allow long replies. On a Mac with Apple Silicon, serve it with mlx-lm's OpenAI-compatible server and point pi at it through the Chat Completions API:
pip install -U "mlx-lm>=0.32.2"
mlx_lm.server --model netprojects/Qwen3.8-27B-think-pi-adapted-MLX-6bit --port 8000 \
--chat-template-args '{"enable_thinking": true}'The model card has the pi configuration, image input with mlx-vlm and the MTP command: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-MLX-6bit. The GGUF card has the llama.cpp commands: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-GGUF
Honest limits
- We did not run SWE-bench Pro, Terminal-Bench or any other agent test suite on these builds, so the agent scores above are harness-hub's, from its own setup under pi, text only.
- harness-hub notes that with one attempt per task, differences smaller than about 9 points cannot be resolved, and that the step-90 checkpoint was picked on these same benchmarks, so its scores carry some selection bias. On Terminal-Bench 2.1 the adapter scores slightly below both references, within noise.
- Our checks are short: 12 prompts for agreement, two reasoning questions with thinking on, one tool-calling prompt, three coding tasks and 50 GSM8K questions, all on one machine.
- We did not time these builds, so we give no speed figures, with or without MTP.
- Peak memory is for an 8K-token prompt; long thinking needs room for a longer context.
- The 4-bit builds differ more from the bf16 weights than the others.
Licence
Qwen3.8-27B, harness-hub's adapter and our builds are all under the Apache-2.0 licence. Each of our repositories carries the licence text and a notice that describes the conversion and credits harness-hub and the Qwen team (Alibaba Cloud).
Links
- MLX 6-bit build (recommended): https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-MLX-6bit
- MLX 8-bit build: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-MLX-8bit
- MLX 4-bit build: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-MLX-4bit
- MLX bf16 build: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-MLX-bf16
- MLX adapter: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-MLX-adapter
- GGUF builds: https://huggingface.co/netprojects/Qwen3.8-27B-think-pi-adapted-GGUF
- harness-hub's original adapter: https://huggingface.co/harness-hub/Qwen3.8-27B-think-pi-adapted
- pi: https://github.com/earendil-works/pi
- Qwen3.8-27B: https://huggingface.co/Qwen/Qwen3.8-27B
- Our pi adapter builds (thinking off): https://netprojects.com/insights/harness-hub-qwen3-8-27b-pi-adapted-coding-agent-mlx-gguf
- All our AI ports: https://netprojects.com/ai
Credits
The adapter is by harness-hub; Qwen3.8-27B is by Alibaba Cloud's Qwen team, under the Apache-2.0 licence. The MLX and GGUF builds are by NetProjects (Internet Projects Ltd). Not affiliated with harness-hub or Alibaba Cloud.
This article was drafted with AI assistance, then edited and approved by people on our team. You can read more about how we use AI at https://netprojects.com/standards/ai.