Instructions to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
Use Docker
docker model run hf.co/analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "analogalok/Qwen3.8-27B-DFlash2-Q2_K-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": "analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
- Ollama
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF with Ollama:
ollama run hf.co/analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
- Unsloth Studio
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF to start chatting
- Pi
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
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": "analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF with Docker Model Runner:
docker model run hf.co/analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
- Lemonade
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
Run and chat with the model
lemonade run user.Qwen3.8-27B-DFlash2-Q2_K-GGUF-Q2_K
List all available models
lemonade list
- Hermes Agent
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
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 analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K
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 "analogalok/Qwen3.8-27B-DFlash2-Q2_K-GGUF:Q2_K" \ --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-DFlash2-Q2_K (2-Bit Zero-Loss Speculative Drafter)
This repository provides the Q2_K (2-bit) quantization of z-lab/Qwen3.8-27B-DFlash2 (~700 MB on disk).
It is engineered specifically for 24GB consumer GPUs (NVIDIA GeForce RTX 4090 / RTX 3090) to run speculative decoding alongside Qwen3.8-27B dense models without spilling into system RAM.
🚀 Benchmark Discovery: Zero Quality Loss at 2-Bit
By quantizing the DFlash 2 block-diffusion drafter down from the official Q4_K_M (1.1 GB) to 700 MB), we save ~400–450 MB of VRAM with zero degradation in speculative draft accuracy.Q2_K (
Strict A/B Performance on Single RTX 4090 (24GB VRAM):
Evaluated on Qwen3.8-27B-UD-Q4_K_XL using llama-server (PR #27342) with --spec-draft-n-max 3 across a 28k prompt baseline.
| Drafter Quant | File Size | Mean Accepted Length | Acceptance Rate | Decode Speed | Max Usable Context (24GB VRAM) |
|---|---|---|---|---|---|
| Official Q4_K_M | ~1.10 GB | 2.80 / 3.0 tokens | 60.00% | 75.89 t/s | 150,000 tokens (Q4 KV) |
| Custom Q2_K (This Repo) | ~700 MB | 2.81 / 3.0 tokens | 60.22% | 75.93 t/s | 170,000 tokens (+20k) |
Key Takeaways:
- Identical Acceptance Rate: The target 27B model accepts 2.81 out of 3.0 drafted tokens on average $(93.7% \text{ theoretical efficiency})$, matching the 4-bit drafter identically.
- Context Expansion: The ~400 MB saved VRAM directly unlocks:
- 170,000 Context on
Q4_0 KV(~76 t/s @ 23.89 GB) - 100,000 Context on high-precision
Q8_0 KV(~75 t/s @ 23.88 GB)
- 170,000 Context on
⚙️ Why Q2_K is the True Physical Floor for DFlash 2
DFlash 2 is a cross-layer block-diffusion drafter that extracts hidden states from layers [6, 20, 34, 48, 62] of the base model. Because it is not a standalone causal LM, standalone llama-imatrix calibration fails (dflash requires ctx_other to be set).
This means importance-matrix quants (IQ1_S, IQ2_XXS) cannot be computed, making Q2_K the absolute lowest non-degrading quantization floor for DFlash 2.
🛠️ Quickstart with llama.cpp
Requires llama.cpp built from PR #27342.
1. Build llama.cpp:
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
git fetch origin pull/27342/head:pr-27342
git switch pr-27342
# Build with CUDA
cmake -B build -DGGML_CUDA=ON && cmake --build build -j
- Downloads last month
- 497
2-bit