Instructions to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use lmcoleman/Qwen3.8-27B-MagicQuant-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 lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_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 lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_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 lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
Use Docker
docker model run hf.co/lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmcoleman/Qwen3.8-27B-MagicQuant-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": "lmcoleman/Qwen3.8-27B-MagicQuant-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
- Ollama
How to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with Ollama:
ollama run hf.co/lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
- Unsloth Studio
How to use lmcoleman/Qwen3.8-27B-MagicQuant-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 lmcoleman/Qwen3.8-27B-MagicQuant-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 lmcoleman/Qwen3.8-27B-MagicQuant-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for lmcoleman/Qwen3.8-27B-MagicQuant-GGUF to start chatting
- Pi
How to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_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": "lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with Docker Model Runner:
docker model run hf.co/lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
- Lemonade
How to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.8-27B-MagicQuant-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use lmcoleman/Qwen3.8-27B-MagicQuant-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 lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_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 lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use lmcoleman/Qwen3.8-27B-MagicQuant-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_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 "lmcoleman/Qwen3.8-27B-MagicQuant-GGUF:Q4_K_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"
Qwen3.8-27B-MagicQuant-GGUF
Derivative of Qwen3.8-27B, quantized using MagicQuant hybrid evolutionary per-tensor search.
Sibling repo with AMD-native (ROCmFPX fork-only) builds: lmcoleman/Qwen3.8-27B-ROCmFPX-GGUF.
Base Model
This is a derivative of Qwen3.8-27B. All credit for the base model architecture and weights goes to the original authors. The base model's license applies to this derivative.
Quantization Method
Quantized using MagicQuant hybrid evolutionary per-tensor quantization, based on the methodology by magiccodingman:
- Tensors are classified into sensitivity groups (Embeddings, Head, Query, Key, Output, FFN Up/Down, MoE Experts, Router)
- An evolutionary search finds the optimal quantization type per group, balancing size vs. perplexity
- Q4/Q5/Q6 tier targets are searched, and each one ships only if it earns its place (see below)
- Small-row tensors and sensitivity-critical layers (embeddings, output head, router) are kept at F32/F16/BF16
- This is NOT a uniform quantization -- each tensor group gets its own optimal type
A tier name here is a size band, not a promise that every tensor uses that exact type. A "Q5" is whatever mix of schemes landed in the Q5 size band with the lowest measured perplexity loss -- which is the point of the search.
GGUF Files
| File | Size | Quant | Perplexity vs BF16 |
|---|---|---|---|
| Qwen3.8-27B-Q4_K_M.gguf | 15.7 GB | Q4 hybrid | 6.7611 (+0.25%) |
| Qwen3.8-27B-Q6_K.gguf | 22.4 GB | Q6 hybrid | 6.7579 (+0.20%) |
| mmproj-Qwen3.8-27B-f16.gguf | 0.9 GB | F16 (unquantized) | not measured |
Why there is no Q5
A Q5 tier was searched, built and measured. It is not published, because it was dominated by Q4 on every axis measured here:
| Size | Perplexity vs BF16 | Generation | |
|---|---|---|---|
| Q4_K_M | 14.65 GiB | 6.7611 (+0.25%) | 6.03 tok/s |
| Q5 (withheld) | 17.68 GiB | 6.7666 (+0.33%) | 4.57 tok/s |
| Q6_K | 20.89 GiB | 6.7579 (+0.20%) | 4.47 tok/s |
It was 21% larger than Q4, measured slightly worse, and generated ~24% slower. The quality difference is small enough to be a tie rather than a real regression, but a tie at 21% more disk and a quarter less speed is not a tier worth shipping: there is no request for which it is the right answer.
This is a property of how the schemes round into size bands for this particular model, not a defect in the file. The useful ladder here is Q4 for speed, Q6 for quality.
Throughput figures above are CPU-only (llama-bench, no GPU offload, on a
Ryzen AI MAX+ 395), measured during the search alongside other load. They are
useful for comparing these tiers against each other -- generation rate was
consistent across all 15 measured candidates -- but they are not the speed you
should expect from a GPU or Metal build, and they are not a benchmark of this
hardware. Prompt-processing figures from the same runs were inconsistent and are
omitted for that reason.
Perplexity measured on wikitext-2 (100 chunks, ctx 512) against the BF16 baseline of 6.7443. Lower is better; the percentage is the increase over BF16. These are the same measurements the tier selection is based on, so a tier that shipped is one that earned its size.
Recommended: Q4 (14.65 GiB). It is the smallest tier that is statistically tied with the best measured quality here. Q6 is 43% larger for 0.048 percentage points of perplexity, which is below what this measurement can resolve -- so the extra bytes buy nothing you can detect.
Usage
LM Studio
- Download the GGUF file of your preferred quantization tier
- Place it in your LM Studio models directory
- Load the model in LM Studio -- it will auto-detect the chat template
- The model supports the base model's full context length
llama.cpp
# Interactive chat (--jinja uses the model's embedded chat template, not a hardcoded one)
llama-cli -m Qwen3.8-27B-Q4_K_M.gguf -c 8192 --jinja -cnv
# Single prompt
llama-cli -m Qwen3.8-27B-Q4_K_M.gguf -c 8192 -p "Your prompt here"
# Server mode
llama-server -m Qwen3.8-27B-Q4_K_M.gguf -c 8192 --port 8080 --jinja
Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(model_path="./Qwen3.8-27B-Q4_K_M.gguf", n_ctx=8192)
output = llm.create_chat_completion(
messages=[
{"role": "user", "content": "Hello, how are you?"}
]
)
print(output["choices"][0]["message"]["content"])
Vision (image input)
llama-server -m Qwen3.8-27B-Q4_K_M.gguf --mmproj mmproj-Qwen3.8-27B-f16.gguf -c 8192 --port 8080 -ngl 99 -fa on
Serving: MTP Speculative Decoding
This model includes MTP ("nextn") draft tensors, enabling self-speculative decoding -- measured ~1.6-1.9x faster generation with a ~95% first-token accept rate (no separate draft model needed; it drafts from itself):
llama-server -m Qwen3.8-27B-Q4_K_M.gguf -c 8192 --port 8080 --host 127.0.0.1 -ngl 99 -md Qwen3.8-27B-Q4_K_M.gguf --spec-type draft-mtp -ctk q8_0 -ctv q8_0 -fa on
Memory cost: MTP needs its own draft context alongside the main context,
so serving with it uses roughly 2x the model's memory compared to serving
without -md/--spec-type draft-mtp.
Caveats
- The base model's license (apache-2.0) applies to all derivative files
- Quantization reduces precision -- verify outputs for your specific use case
- The hybrid quantization assigns different precision to different tensor groups, which means quality characteristics may differ from uniform quantizations
Limitations
- Quantized models may exhibit subtle differences from the full-precision fine-tune
- This model inherits any limitations and biases present in the base model
Generated with MagicQuant
- Downloads last month
- 394
4-bit
6-bit
Model tree for lmcoleman/Qwen3.8-27B-MagicQuant-GGUF
Base model
Qwen/Qwen3.8-27B