Instructions to use sdkyuan/qwen3.8-27B-qat-q2_0-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 sdkyuan/qwen3.8-27B-qat-q2_0-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 sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0 # Run inference directly in the terminal: llama cli -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0 # Run inference directly in the terminal: llama cli -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
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 sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
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 sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
Use Docker
docker model run hf.co/sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
- LM Studio
- Jan
- vLLM
How to use sdkyuan/qwen3.8-27B-qat-q2_0-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sdkyuan/qwen3.8-27B-qat-q2_0-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": "sdkyuan/qwen3.8-27B-qat-q2_0-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
- Ollama
How to use sdkyuan/qwen3.8-27B-qat-q2_0-gguf with Ollama:
ollama run hf.co/sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
- Unsloth Studio
How to use sdkyuan/qwen3.8-27B-qat-q2_0-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 sdkyuan/qwen3.8-27B-qat-q2_0-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 sdkyuan/qwen3.8-27B-qat-q2_0-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sdkyuan/qwen3.8-27B-qat-q2_0-gguf to start chatting
- Pi
How to use sdkyuan/qwen3.8-27B-qat-q2_0-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
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": "sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use sdkyuan/qwen3.8-27B-qat-q2_0-gguf with Docker Model Runner:
docker model run hf.co/sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
- Lemonade
How to use sdkyuan/qwen3.8-27B-qat-q2_0-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
Run and chat with the model
lemonade run user.qwen3.8-27B-qat-q2_0-gguf-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use sdkyuan/qwen3.8-27B-qat-q2_0-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 sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
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 sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use sdkyuan/qwen3.8-27B-qat-q2_0-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0
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 "sdkyuan/qwen3.8-27B-qat-q2_0-gguf:Q8_0" \ --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-QAT-Q2_0
This is a 2-bit (Q2_0) quantization-aware-trained (QAT) checkpoint of Qwen3.8-27B for llama.cpp at 8.76 GB.
Quantized by Samuel Yuan <sdkyuan@mit.edu>.
This quantization was heavily focused on preserving code and reasoning performance. As such, multimodal and raw fact recall performance are slightly degraded.
Interestingly, being able to preserve reasoning and code performance at the expense of Wikitext recall performance during quantization via QAT seems to be in line with the "cognitive core" hypothesis.
A Q1_0 version and improved Q2_0 quant are in the works.
Unlike most community quants that use Post-Training Quantization (PTQ) (i.e. Unsloth), this is a quantization-aware-trained model.
Hopefully this quant makes Qwen3.8 27b-level coding and reasoning more accessible to those with <12-16 GB cards or Macs, since every little bit saved in model size means more room for KV cache and faster decode on memory bandwidth bound devices!
Experiments
We measure Top-1 agreement (how often the next-token argmax matches the FP16 teacher's) and mean KL divergence (nats/token, lower is better) on held-out chat-formatted slices and on wikitext-2.
Slices correspond to:
- Reasoning:
nvidia/Nemotron-Post-Training-Dataset-v1 (math),open-thoughts/OpenThoughts3-1.2M,nvidia/OpenMathReasoning (cot) - Code:
nvidia/OpenCodeReasoning,open-r1/codeforces-cots,nvidia/Nemotron-Post-Training-Dataset-v1 (code),bigcode/the-stack-smol - Tool calling:
Salesforce/xlam-function-calling-60k,togethercomputer/glaive-function-calling-v2-formatted,togethercomputer/CoderForge-Preview-32B-SWE-Bench-Verified-Evaluation-trajectories,nvidia/Nemotron-Post-Training-Dataset-v1 (tool_calling) - Wikitext-2:
Salesforce/wikitext(wikitext-2-raw-v1, test)
So this quantization exceeds the reasoning and code performance of SOTA PTQ quants over 1 GB larger, but does indeed suffer lower Wikitext accuracy. The comparatively lower tool calling performance may be due to our data blend, and we are looking to release a improved version with more focus on that as well for local agentic use cases.
Methods
We applied the Efficient QAT (https://arxiv.org/abs/2407.11062) recipe with some improvements to the E2E-QP step (KD from teacher instead of CE on dataset) and data blend.
We have included a mmproj file for vision. Again, note that multimodal capabilities may be slightly degraded.
Run it
./llama-cli \
-m qwen38-27b-qat-q2_0.gguf \
--jinja -cnv \
--reasoning-budget -1 \
-c 32768 -ngl 99 \
--temp 1.0 --top-p 0.95 --top-k 20 --min-p 0.0 \
--presence-penalty 0.0 --repeat-penalty 1.0 \
--flash-attn on \
--spec-type ngram-mod --spec-ngram-mod-n-match 24 --spec-ngram-mod-n-min 48 --spec-ngram-mod-n-max 64 \
--no-mmproj
or
./llama-server \
--model qwen38-27b-qat-q2_0.gguf \
--jinja \
--reasoning-budget -1 \
--ctx-size 32768 \
--host 127.0.0.1 \
--port 8033 \
-ngl 99 \
--temp 1.0 \
--top-p 0.95 \
--top-k 20 \
--min-p 0.0 \
--presence-penalty 0.0 \
--repeat-penalty 1.0 \
--flash-attn on \
--spec-type ngram-mod --spec-ngram-mod-n-match 24 --spec-ngram-mod-n-min 48 --spec-ngram-mod-n-max 64 \
--no-mmproj
Requires a llama.cpp build with Q2_0 support.
License
apache-2.0 inherited from the base model.
Feel free to reach out if you have any quesions about the model.
- Downloads last month
- 751
2-bit
Model tree for sdkyuan/qwen3.8-27B-qat-q2_0-gguf
Base model
Qwen/Qwen3.8-27B