Instructions to use netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit") config = load_config("netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen3.8-27B-pi-adapted for Apple Silicon (MLX, 8-bit)
harness-hub/Qwen3.8-27B-pi-adapted (revision e786f84) merged into
Qwen/Qwen3.8-27B (revision 3756181) and converted to MLX with mlx-vlm, vision
encoder and Qwen's MTP layer included. In this build the linear layers are quantized to 8-bit (affine, group 64). Size: 30.0 GB.
harness-hub trained this LoRA with reinforcement learning (AsyncGRPO in TRL) to be the model behind the pi coding agent on software-engineering and terminal tasks. Their published results, under pi with thinking off: Terminal-Bench 2.1 39.5% โ 55.8% and SWE-bench Pro (hard 51) 29.4% โ 62.7% against the base model, with 55-64% fewer tool calls per task. See the original adapter card for the method, data and full results.
| Build | Size | Same next token as bf16 | KL vs bf16 |
|---|---|---|---|
| netprojects/Qwen3.8-27B-pi-adapted-MLX-6bit (recommended) | 23.1 GB | 99.0% | 0.0015 |
| netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit | 30.0 GB | 99.1% | 0.0004 |
| netprojects/Qwen3.8-27B-pi-adapted-MLX-4bit | 16.3 GB | 95.6% | 0.0201 |
| netprojects/Qwen3.8-27B-pi-adapted-MLX-bf16 | 55.6 GB | reference | reference |
| netprojects/Qwen3.8-27B-pi-adapted-MLX-adapter | 638 MB | LoRA only, for mlx-lm | on any Qwen3.8-27B MLX build |
The 6-bit build is the recommended balance of size and fidelity; 8-bit is closest to bf16, 4-bit is the smallest.
Use with pi
The adapter was trained and evaluated with thinking off, so keep it off. Serve the model with mlx-lm's OpenAI-compatible server:
pip install -U "mlx-lm>=0.32.2"
mlx_lm.server --model netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit --port 8000 \
--chat-template-args '{"enable_thinking": false}'
Add it to ~/.pi/agent/models.json:
{
"providers": {
"local": {
"baseUrl": "http://localhost:8000/v1",
"api": "openai-completions",
"apiKey": "dummy",
"models": [{ "id": "netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit" }]
}
}
}
"api": "openai-completions" matters: the adapter was trained and evaluated with the Chat Completions API, not the
Responses API. Then:
pi --provider local --model netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit --print "Find out why the tests in tests/test_parser.py fail and fix the bug."
Use from Python
Text only, with mlx-lm:
from mlx_lm import load, generate
model, tokenizer = load("netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit")
messages = [{"role": "user", "content": "Write a Python function that parses '1.5M' into bytes."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, tokenize=False)
print(generate(model, tokenizer, prompt=prompt, max_tokens=512))
With images, with mlx-vlm:
pip install -U "mlx-vlm>=0.7.11"
mlx_vlm.generate --model netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit --image screenshot.png \
--prompt "What error does this terminal show?" --max-tokens 300 # thinking stays off unless --enable-thinking
The tokenizer and chat template are harness-hub's files, unchanged (same vocabulary and tool-call format as Qwen3.8-27B).
Tool calls use Qwen's XML format (<tool_call><function=...><parameter=...>), which mlx-lm's server returns as
OpenAI tool_calls.
Faster decoding: MTP and DSpine
This build keeps Qwen3.8-27B's own multi-token-prediction (MTP) layer in model-mtp.safetensors, quantized to match
the build. The adapter does not change that layer, so it is Qwen's original MTP head. mlx-vlm uses it as a built-in
draft model when you pass the same repository as --draft-model:
mlx_vlm.generate --model netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit --draft-model netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit \
--draft-kind mtp --temperature 0 --max-tokens 512 --prompt "Write a Python function that checks whether a number is prime."
On this build MTP makes decoding about 2.2ร faster with no extra download. The DSpine drafter with dspine-hybrid-mlx also works with these builds. Our measurements (greedy, thinking off, 5 prompts ร 256 tokens from GSM8K, MATH-500, HumanEval, MBPP and MT-Bench, with other services running on the Mac, so treat them as indicative):
| Build | Plain | MTP (mlx-vlm 0.7.11) | DSpine v0.2.1 (4-bit drafter, block 5) |
|---|---|---|---|
| 4-bit | 33 tok/s | 61 tok/s (ร1.84) | 70 tok/s (ร2.25) |
| 6-bit | 23 tok/s | 22 tok/s (ร0.96) | 52 tok/s (ร2.32) |
| 8-bit | 18 tok/s | 41 tok/s (ร2.24) | 54 tok/s (ร3.05) |
Both methods check every drafted token with the full model. With greedy decoding the text matches plain decoding until a near-tie, where the batched check can round the other way, so long answers can diverge slightly.
With Splash
These builds also run in Splash (1.7.0), which uses its own DFlash2 draft model for speculative decoding. Measured on the same 5 prompts ร 256 tokens, thinking off, on 19 November 2026 with other models loaded on the Mac, so treat the speeds as indicative; text, tool calling and image input passed on every build:
| Build | Decode speed | End to end, incl. prompt | Tokens per cycle |
|---|---|---|---|
| 4-bit | 185 tok/s | 135 tok/s | 6.8 |
| 6-bit | 135 tok/s | 104 tok/s | 6.8 |
| 8-bit | 115 tok/s | 90 tok/s | 6.9 |
hf download netprojects/Qwen3.8-27B-pi-adapted-MLX-8bit --local-dir Qwen3.8-27B-pi-adapted-MLX
splash serve --model-dir Qwen3.8-27B-pi-adapted-MLX --model local/qwen3.8-pi --reasoning-effort none
Splash loads the quantized builds (4, 6 and 8-bit); it does not load bf16 MLX checkpoints.
What was checked
On a MacBook Pro M5 Max (128 GB), 18 November 2026, with mlx 0.32.4, mlx-lm 0.32.2 and mlx-vlm 0.7.11.
- Merge. All 256 adapted modules (q, k, v, o in the 16 full-attention layers; gate, up, down in all 64 layers) equal
W + 2.0 ยท B @ Arounded to bf16, checked element by element against an independent float64 computation; every other tensor is byte-identical to Qwen3.8-27B. The adapter does not touch the vision encoder or the Gated DeltaNet layers. - Quantization. Each quantized build is checked to be exactly the affine (group 64) quantization of the bf16 build.
- Agreement with bf16 (12 short prompts, thinking off, 961 teacher-forced positions): the 8-bit build picks the same next token as bf16 on 99.1% of positions, 6-bit on 99.0% and 4-bit on 95.6% (mean KL 0.0004 / 0.0015 / 0.0201).
- Tool calling with the included chat template, thinking off: one agent-style prompt with
bashandreadtools; 8-bit, 6-bit, 4-bit each produced a well-formedbashtool call in Qwen's XML format. - Coding. Three short Python tasks run against asserts: 8-bit 3/3, 6-bit 3/3, 4-bit 3/3.
- Vision (mlx-vlm): asked to name the shapes and colours in a test image, 8-bit, 6-bit, 4-bit answered correctly, and answered a text-only question in the same session.
- MTP layer. The bundled MTP tensors equal Qwen3.8-27B's
mtp.*weights (norms in mlx-vlm's stored form), quantized exactly like the rest of the build; each build loads normally in mlx-lm and mlx-vlm with the extra file present. - Source files. Every file of both pinned upstream revisions matches the Hub's SHA-256 hashes.
Credits
The adapter is by harness-hub; the base model is Qwen3.8-27B by the Qwen Team, Alibaba Cloud. If you use the model, please cite their work (see the adapter card and the Qwen3.8-27B card).
License
Apache-2.0, as Qwen3.8-27B and the harness-hub adapter. LICENSE is the Apache-2.0 text from the Qwen3.8-27B repository
and NOTICE describes the conversion and credits harness-hub and the Qwen Team (Alibaba Cloud).
Published by NetProjects (Internet Projects Ltd). Not affiliated with Hugging Face, harness-hub or Alibaba.
More MLX builds from NetProjects: huggingface.co/netprojects ยท netprojects.com
- Downloads last month
- -
8-bit