Instructions to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M # Run inference directly in the terminal: llama cli -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M # Run inference directly in the terminal: llama cli -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M # Run inference directly in the terminal: ./llama-cli -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Use Docker
docker model run hf.co/pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
- LM Studio
- Jan
- vLLM
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
- SGLang
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Ollama
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Ollama:
ollama run hf.co/pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
- Unsloth Studio
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF to start chatting
- Pi
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Docker Model Runner:
docker model run hf.co/pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
- Lemonade
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Run and chat with the model
lemonade run user.Qwen3.8-27B-imatrix-MTP-GGUF-IQ2_M
List all available models
lemonade list
- Hermes Agent
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
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 pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M
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 "pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ2_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Run and chat with the model
lemonade run user.Qwen3.8-27B-imatrix-MTP-GGUF-List all available models
lemonade list📊 Unified benchmark & quality table
- 📐 Static — measured against FP16 on the external holdout (code + math + tools, 90k tokens, disjoint from every calibration source) at
eval-ctx 8192. KLD is median;top_pis top-token agreement with FP16. - 🤖 Agentic — 25 held-out tool-use sessions (174 scored turns), plus one SWE-rebench issue solved end-to-end through the OpenAI Agents SDK.
| Metric | FP16 (ref) | Q5_K_M | IQ4_XS | IQ3_M | IQ2_M |
|---|---|---|---|---|---|
| File | — | Q5_K_M.gguf | IQ4_XS.gguf | IQ3_M.gguf | IQ2_M.gguf |
| Method | — | imatrix | imatrix | imatrix | imatrix |
| Quality | — | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ | ⭐ |
| BPW | 16.000 | 5.763 | 4.549 | 3.816 | 3.062 |
| Size (GiB) | 50.90 | 18.33 | 14.47 | 12.14 | 9.74 |
| 🤖 SWE issue resolved | ✅ | ✅ | ✅ | ✅ | ✅ |
| 🤖 Steps to solve | 10 | 13 | 14 | 26 | 20 |
| 🤖 Malformed commands | 0 | 0 | 0 | 0 | 0 |
| 🤖 Tool-selection acc | 0.494 | 0.474 | 0.503 | 0.454 | 0.494 |
| 🤖 Param accuracy | 0.256 | 0.265 | 0.274 | 0.239 | 0.260 |
| 📐 PPL | 22.850 | 23.274 | 31.118 | 37.363 | 56.540 |
| 📐 KLD (med) | 0.000 | 0.0036 | 0.0105 | 0.0354 | 0.1242 |
| 📐 same_top_p | 100.0% | 91.8% | 88.2% | 82.4% | 72.0% |
⚠️ The 🤖 rows are a band, not a ranking. At n≈174 turns the standard error is ±3.8pp, and the whole spread — FP16 included — is 0.454–0.503. That is a 4.9pp range inside one standard error. It supports "every rung, down to 3.06 bpw, tool-calls indistinguishably from FP16 here" and nothing finer. IQ2_M and FP16 both score 86/174 yet disagree on 24 turns (12 each way) — the tie is a coincidence, not equivalence.
📐 KLD and
top_pare the trustworthy columns, strictly monotone across all six evals. IQ2_M gives up ~28% of top-token decisions — a memory-constrained option, not a drop-in.
📌 Sampling, methodology & all six eval distributions
Sampling. Static: eval-ctx 8192. Tool-call replay: greedy (temperature=0), ctx=32768, --no-stop-on-fail so every model is scored on the identical 174 turns (the default stop-on-fail halts a weak model early and scores it on fewer, easier turns — which makes models incomparable). Agentic: temperature=0.25, top_p=0.95, max_tokens=8096, 2,048-token reasoning budget, step cap 60. Run on an RTX PRO 6000 Blackwell.
"Tool errors" are classified, not counted. A non-zero exit is not an agent error — a grep that legitimately matched nothing and a pytest correctly reporting a failure both exit non-zero. Errors are split into malformed (shell syntax error, command not found, failed cd — the intended work never ran), timeout, and nonzero (the program ran and reported a result). Under that split every rung issues zero malformed commands; the only genuine tool failure in the whole sweep is one timeout on IQ3_M.
The reasoning budget is a cost control, not a quality lever. Uncapped, IQ2_M was observed emitting a 12,566-token single completion — a repetition loop, not reasoning. An unbudgeted control sweep was run alongside: at n=1 the 2k budget shows no reliable effect on whether the issue gets solved (IQ4_XS and Q5_K_M improved, IQ3_M got worse, FP16 rose).
Six eval distributions, each with its own FP16 baseline — never concatenated:
| eval | what it is | FP16 PPL | IQ2_M | IQ3_M | IQ4_XS | Q5_K_M |
|---|---|---|---|---|---|---|
external |
code + math + tools, disjoint from calibration — the headline | 22.850 | 0.1242 | 0.0354 | 0.0105 | 0.0036 |
general |
combined_en_tiny, broad English (30k tok) |
92.797 | 0.2199 | 0.0569 | 0.0154 | 0.0062 |
tools |
held-out CLI + agent log sessions (150k tok) | 21.652 | 0.0498 | 0.0115 | 0.0032 | 0.0014 |
agentic |
held-out SWE trajectories (99k tok) | 43.473 | 0.0169 | 0.0048 | 0.0013 | 0.0006 |
broad |
held-out broad-instruct (100k tok) | 88.193 | 0.2691 | 0.0702 | 0.0204 | 0.0076 |
cal8k |
slice of the previous 8192-packed corpus — a fit probe, not a holdout | 17.400 | 0.0840 | 0.0261 | 0.0062 | 0.0025 |
⚠️ The four chat-templated evals (tools, agentic, broad, cal8k) are quant-vs-quant only: llama-perplexity has no --parse-special, so chat markers tokenize as ordinary BPE and absolute PPL is off-distribution. KLD and top_p remain valid — which is why PPL goes non-monotone there while KLD does not.
📚 What it was calibrated on
An imatrix is only as good as the text it watched. Here is exactly what this one saw.
| source | what it is | samples | windows | tokens | share | median window |
|---|---|---|---|---|---|---|
| logs | real Claude Code / opencode / qwen code sessions | 108 sessions | 125 | 2,000,139 | 47.0% | 13,004 |
| swe-trajectories | agent runs on real GitHub issues | 61 sessions | 62 | 681,012 | 16.0% | 9,650 |
| reasoning | <think> turns, re-cut so reasoning lands last |
65 sessions | 230 | 638,046 | 15.0% | 2,022 |
| broad-supplement | broad-instruct, non-coding | 2,704 convos | 2,704 | 537,851 | 12.6% | 182 |
| wiki | wiki.test.raw, raw prose |
10 chunks | 10 | 297,053 | 7.0% | 29,641 |
| redteam-refusals | attack prompts + generic refusals | 305 convos | 305 | 101,660 | 2.4% | 231 |
| 3,436 | 4,255,761 | 100% |
Three things worth reading off that table:
- Nearly two-thirds is agentic (logs + swe-trajectories = 63%), and those are the long windows — median 13,004 and 9,650 tokens against a 182-token median for broad-instruct. 84 of the 125 log windows exceed 7,500 tokens and 50 exceed 16,384, which is only possible because packing is at ctx 32,768. Nothing was truncated: 0 sessions hit the 32,076-token cap.
- Tool-calling is dense, not decorative — 6,786
<tool_call>blocks and 5,827<tool_response>blocks across 76 distinct tool schemas, and in the log windows 99.3% of tokens sit in tool-bearing turns. reasoningoverlapslogsby design. It re-renders the same conversations with a reasoning turn placed last, because chat templates keep<think>only on a render's final assistant turn and scrub it from history. Without those extra windows the corpus would contain almost no reasoning at all.
The red-team slice ships attack prompts with generic refusals substituted — the targets' original harmful completions never enter any corpus. Refusal behaviour is what low-bit quantization erodes first, so the attack distribution belongs in calibration; the responses do not.
🔬 How they were made
- Hybrid imatrix at ctx 32,768 — activation energy
E[a²]blended with weight-column energy‖W[:,c]‖²·E[a²]per tensor, collected over the corpus above in 129 chunks of a full 32,768-token context (3h54m on an RTX PRO 6000 Blackwell). 496 tensors received statistics. - SSM passthrough — Qwen3.8 is hybrid (48 linear-attention + 16 full-attention layers). 144 SSM tensors pass through with raw
E[a²]; output-aware re-ranking is mathematically invalid for state-space tensors. - Bundled MTP draft head — the trained MTP head (
mtp_num_hidden_layers=1) is remapped toblk.64and pinned to Q8_0 in every rung: 8 × Q8_0 + 7 × F32, zero low-bit tensors, verified per file. This is checked rather than assumed becausellama-quantizesilently accepts a--tensor-typepattern that matches nothing — a stale pin would quantize the draft head with the trunk and surface only as poor acceptance. The head gets no imatrix statistics; it sits outside the forward pass, which is why it is pinned rather than calibrated. - The tool-call format trap — Qwen3.8's chat template emits tool calls as XML (
<tool_call><function=NAME><parameter=KEY>), not the JSON form earlier Qwen3.x templates used. Calibrating on the JSON form would have collected statistics on a syntax this model never produces. output.weightis calibrated —llama-imatrixonly collects tensors namedblk.*unless you pass--process-output, so the largest quantized tensor (and the one that most directly shapes the distribution KLD measures) is otherwise quantized blind.llama-quantizeprintsdid not find weights for output.weightand proceeds anyway, so the only symptom is a line in a log.- Disjoint splits — calibration (train) and every eval holdout are disjoint by construction, so the static table measures generalization, not fit. The one exception is
cal8k, explicitly labelled a fit probe. - Toolchain: Quant-Tuner with vendored llama.cpp
@ f3e1828. Calibration logs mined with LogMiner.
🔁 Reproduce
git clone https://github.com/pearsonkyle/Quant-Tuner && cd Quant-Tuner
git submodule update --init --recursive
cmake -S vendor/llama.cpp -B vendor/llama.cpp/build -DGGML_CUDA=ON \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=120 -DLLAMA_CURL=ON
cmake --build vendor/llama.cpp/build -j 64
uv sync --extra dev
PYTHONPATH=src .venv/bin/python scripts/exp060_repack_cal_32k.py --ctx 32768 \
--wiki out/exp-001/wiki/wiki.test.raw
PYTHONPATH=src .venv/bin/python scripts/exp060_quants_qwen38.py \
--run exp-060-32k --ctx 32768 --eval-ctx 8192 \
--evals external general tools agentic broad cal8k
⚠️
llama-imatrixneeds--no-pplabove ~17k ctx on this model. Its perplexity path computesall_logits + first*n_vocabwithfirst = n_ctx/2inintarithmetic (tools/imatrix/imatrix.cpp:911). With Qwen3.8's 248,320-token vocab that product overflowsINT_MAXfor anyn_ctx > 2³²/248320 ≈ 17,296, and the process segfaults after the first pass.--no-pplskips only the perplexity bookkeeping — the forward pass, and therefore every activation statistic, is unchanged.
🚀 Usage
Ollama
ollama run hf.co/pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF:IQ4_XS
# also: :Q5_K_M · :IQ3_M · :IQ2_M
llama.cpp server, with MTP speculative decoding
./llama-server \
--model Qwen3.8-27B-IQ4_XS.gguf \
--ctx-size 32768 --n-gpu-layers 999 \
--spec-type draft-mtp --spec-draft-n-max 1 \
--flash-attn on --cache-type-k q8_0 --cache-type-v q8_0 \
--host 0.0.0.0 --port 1234
The draft head is inside the GGUF — no --model-draft, nothing extra to fetch. Qwen3.8
exposes one nextn layer, so --spec-draft-n-max 1 is the right setting. Drop both
--spec-* flags to run without speculative decoding.
🖼️ Vision (text + image)
The vision tower ships separately as mmproj-Qwen3.8-27B-Q8_0.gguf (629 MB) so you only
download it if you need images. It pairs with any of the four rungs — the text weights are
identical; the mmproj just adds the encoder + projector.
# one-shot from the CLI
./llama-mtmd-cli \
-m Qwen3.8-27B-IQ4_XS.gguf \
--mmproj mmproj-Qwen3.8-27B-Q8_0.gguf \
--image screenshot.png \
--jinja -ngl 999 --temp 0.2 -n 512 \
-p "Describe this image."
# or serve it — /v1/chat/completions then accepts image_url content parts
./llama-server \
-m Qwen3.8-27B-IQ4_XS.gguf \
--mmproj mmproj-Qwen3.8-27B-Q8_0.gguf \
--jinja --ctx-size 32768 --n-gpu-layers 999 \
--host 0.0.0.0 --port 1234
--jinjais required — the chat template is Jinja-based and the multimodal path needs it. For grounding tasks (pointing at or locating things in an image) llama.cpp recommends--image-min-tokens 1024; the default tokenization is fine for description and Q&A.
OpenAI-compatible API
import json, urllib.request
def ask(content, max_tokens=512):
body = {"messages": [{"role": "user", "content": content}], "max_tokens": max_tokens}
req = urllib.request.Request("http://127.0.0.1:1234/v1/chat/completions",
json.dumps(body).encode(),
{"Content-Type": "application/json"})
return json.loads(urllib.request.urlopen(req).read())["choices"][0]["message"]["content"]
print(ask("Write a Python function that reverses a linked list."))
🪪 License & attribution
- Inherits the license of the base model
Qwen/Qwen3.8-27B(Apache-2.0). - Calibration + quantization: Quant-Tuner with vendored llama.cpp
@ f3e1828. - Calibration logs mined with LogMiner.
- Downloads last month
- 3,576
2-bit
3-bit
4-bit
5-bit
Model tree for pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF
Base model
Qwen/Qwen3.8-27B
Pull the model
# Download Lemonade from https://lemonade-server.ai/lemonade pull pearsonkyle/Qwen3.8-27B-imatrix-MTP-GGUF: