Instructions to use evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp 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 "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp"
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 evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp"
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 "evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp" \ --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-oQ4e-fp16-mtp
4-bit MLX quantization of Qwen/Qwen3.8-27B (hybrid Gated DeltaNet + Gated Attention, native vision, 262K context, thinking mode with preserved reasoning) — the fp16 variant of the 4-bit build, tuned for M1/M2-generation Apple Silicon, where fp16 non-quant weights prefill ~20% faster than bf16. It is also the family's ANE-eligible speed build: oMLX 0.6.1's experimental Qwen ANE prompt processing accepts this q4 layout, measured at +21% prefill throughput on an M2 Ultra (details below). Made with oQ (oMLX v0.6.1) mixed-precision quantization.
Sibling repos:
- Qwen3.8-27B-oQ4e-mtp — 4-bit / bf16, the same weights in the safe dtype for M3/M4/M5 machines
- Qwen3.8-27B-oQ6e-mtp — 6-bit / bf16, ~22 GB, for 64 GB-class machines
- Qwen3.8-27B-oQ8e-fp16-mtp — 8-bit / fp16, ~27.5 GiB, highest fidelity
Quantization details
- Model type: qwen3_5
- Bits: 4 (effective ~4.9 bpw mixed precision), group size 64 — ~16.7 GiB weights
- Enhanced quantization (oQe): imatrix-calibrated (1024 samples, shared calibration with the family) — affine quantization weighted by activation importance
- MTP weights preserved (
mtp.*tensors + config) — multi-token-prediction / Lightning MTP works after quantization - Non-quant weight dtype: float16 — ~20% faster prefill on M1/M2; on M3+ prefer the bf16 sibling. No fp16 activation-overflow issues observed with Qwen3.8 in extended agentic use (this is a Gemma-class problem, not a Qwen one)
- Vision components included (not a text-only strip)
- Format: MLX safetensors
Recommended sampling (per the Qwen3.8 model card)
| Mode | temperature | top_p |
|---|---|---|
| Thinking (default) | 1.0 | 0.95 |
| Instruct (non-thinking) | 0.7 | 0.80 |
Thinking controls via chat_template_kwargs:
enable_thinking(defaulttrue)preserve_thinking(defaulttrue) — keeps reasoning traces across multi-turn historyreasoning_effort:xhigh(default) /medium/low— in our testing (on the 8-bit sibling),mediumreduced thinking volume ~25% with no loss on agentic tasks
Measured: ANE prompt processing (oMLX 0.6.1, experimental)
This layout (q4, group size 64) is eligible for oMLX 0.6.1's dual-ANE/GPU prefill split. Measured on an M2 Ultra Mac Studio (128 GB), ~78K-token cold prefills, 3 unique-prompt runs per leg, prefix cache verified cold:
| Configuration | Prefill tok/s |
|---|---|
| GPU only (ANE off) | ~222 |
| ANE on (dual-ANE + GPU) | ~269 (+21%) |
| 8-bit sibling, GPU only (ANE-ineligible), same machine | ~207† |
†Measured at ~88K, depth-adjusted to ~78K. The +21% slightly exceeds the M3 Ultra reference figures (+18.9% at 32K) because longer prompts amortize more complete 2,048-token ANE blocks — the win grows with prompt length and applies to cold prefills only (prefix-cached turns are unaffected).
oMLX 0.6.2's built-in split tuner, swept on the same M2 Ultra, confirmed 53% MLP / 50% GDN as the optimal split and measured +37.6% (444.9 prompt tok/s) at its shorter benchmark prompt shape. The percentage gain varies with prompt depth: it rises with block count out of the small-prompt regime, peaks mid-range, then tapers at very long contexts as the full-attention layers (not ANE-accelerated) claim a growing share of prefill time — hence +37.6% at the tuner's shape vs. +21% at 78K.
Costs to know before enabling: ~4.15 GB extra resident memory for the model's lifetime (≈68K tokens' worth of KV cache), ~40 s eager ANE program compile added to every model load, and an approximate INT8 weight copy on the ANE path (upstream reports matching output hashes at 16K/32K vs. the GPU path). On 64 GB machines, leave it off — the resident cost comes out of exactly the headroom that long-context prefill needs.
Measured context windows
The 64 GB ladder was run on the bf16 sibling (M5 Pro, oMLX, default wired-memory limit): 64K OK, 131K OK, 160K crashed the oMLX server (allocation spike during prefill; no graceful rejection) — 131,072 is the recommended client window on 64 GB machines. Real windows on this hybrid architecture are prefill-overhead-bound, not KV-bound, so don't size your window from KV math, and cap the context client-side — an over-window request may crash the server rather than return an error. The full 262,144 native window was validated with the 8-bit sibling on a 128 GB Mac Studio.
Fidelity note
4-bit is the aggressive end for a 27B reasoning model; the imatrix calibration mitigates but does not eliminate low-bit degradation, so expect the largest quality gap of the family on long reasoning chains. This exact build passed the family's multi-turn agentic battery (2026-08-18, M2 Mac Studio, thinking fed back into history verbatim): 3/3 scenarios completed with correct answers, 0 stalled turns across 8 agentic tool-call turns. The battery's scenarios are short; the caveat about very long reasoning chains stands. A good deployment pattern from our own use: run this build as a fast long-context instruct tier (batch summarization/extraction, one-shot long-document Q&A — cold-prefill-dominated work where the ANE gain lands and quant sensitivity is lowest) and keep an 8-bit sibling for thinking-grade tasks.
- Downloads last month
- 280
4-bit
Model tree for evsinlb/Qwen3.8-27B-oQ4e-fp16-mtp
Base model
Qwen/Qwen3.8-27B