Instructions to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="sh111111111111111/Qwen3.5-4B-BitClass3-GGUF", filename="Qwen3.5-4B-Q3_K_S.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
Use Docker
docker model run hf.co/sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sh111111111111111/Qwen3.5-4B-BitClass3-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": "sh111111111111111/Qwen3.5-4B-BitClass3-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
- Ollama
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with Ollama:
ollama run hf.co/sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
- Unsloth Studio
How to use sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sh111111111111111/Qwen3.5-4B-BitClass3-GGUF to start chatting
- Pi
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sh111111111111111/Qwen3.5-4B-BitClass3-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": "sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-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 sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf sh111111111111111/Qwen3.5-4B-BitClass3-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 "sh111111111111111/Qwen3.5-4B-BitClass3-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"
- Docker Model Runner
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with Docker Model Runner:
docker model run hf.co/sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
- Lemonade
How to use sh111111111111111/Qwen3.5-4B-BitClass3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3.5-4B-BitClass3-GGUF-Q4_K_M
List all available models
lemonade list
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": "sh111111111111111/Qwen3.5-4B-BitClass3-GGUF:"
}
]
}
}
}Run Pi
# Start Pi in your project directory:
piQwen3.5-4B — BitClass3 Mixed-Precision GGUF
Mixed-precision GGUF quantizations of Qwen3.5-4B
— the first BitClass release of this model. BitClass3 keeps the Hessian-sensitivity
front-end to set each level's bit budget, but hands the per-tensor allocation to an
error-minimizing solver (built on llama.cpp's --target-bpw) that distributes bits
across every tensor — including the hybrid DeltaNet/SSM tensors — to minimize
imatrix-weighted quantization error at the target size.
Available Quantizations
KLD vs the BF16 source is the primary quality metric (mean and the robust 99.9th percentile); wikitext-2 perplexity is reported alongside.
| File | BPW | Size | wiki PPL ↓ | KL-mean ↓ | KL-99.9% ↓ | Use Case |
|---|---|---|---|---|---|---|
Qwen3.5-4B-Q8_0.gguf |
8.5 | 4.48 GB | 8.638 | 0.0028 | 0.073 | Near-lossless reference |
Qwen3.5-4B-Q6_K.gguf |
6.2 | 3.25 GB | 8.767 | 0.0125 | 0.396 | High quality |
Qwen3.5-4B-Q5_K_M.gguf |
5.1 | 2.71 GB | 9.176 | 0.0255 | 0.803 | Balanced quality and size |
Qwen3.5-4B-Q4_K_M.gguf |
5.0 | 2.61 GB | 9.246 | 0.0292 | 0.952 | Best quality-to-size ratio |
Qwen3.5-4B-Q3_K_S.gguf |
3.8 | 1.98 GB | 9.358 | 0.0978 | 3.583 | Maximum compression |
Recommended: Q4_K_M — KL-mean 0.029 at 2.61 GB.
How It Compares
Same harness, same metrics, against a fixed per-suffix LP-recipe baseline at matched BPW (within 0.5%) — the head-to-head that motivated BitClass3's allocator:
| Level | LP recipe KL-mean | BitClass3 KL-mean |
|---|---|---|
| Q3_K_S | 0.1525 | 0.0978 |
| Q4_K_M | 0.0352 | 0.0292 |
| Q5_K_M | 0.0258 | 0.0255 |
The allocator wins KL divergence at every level — largest at aggressive quantization
(Q3_K_S: −36% KL-mean) — and our internal worst-token measurements improve at every level
as well. A key reason: it allocates bits to the hybrid DeltaNet tensors (attn_qkv,
attn_gate, ssm_*) that a standard 7-suffix recipe leaves at the base type — and our
tensor-health scan shows those exact tensors are the statistical outliers of this
architecture.
Key Sensitivity Findings (Qwen3.5-4B)
- blk.3 (early layer) is most sensitive — the same early-layer pattern as Qwen3.5-9B, and the opposite of dense Qwen3-4B-Instruct (blk.34). The hybrid Qwen3.5 family concentrates sensitivity early.
- Attention K projections are consistently ≥ V in sensitivity.
- DeltaNet/SSM tensors are distribution outliers (high kurtosis
ssm_conv1d, shiftedssm_alpha/beta/out,attn_qkv,attn_gatevs same-role peers) — covering them in the allocation matters;ssm_conv1ditself is kept at F32 by llama.cpp.
How It Works
- Hessian sensitivity — compute H_diag = mean(X²) per layer on calibration data; this sets each level's overall bit budget.
- Error-minimizing per-tensor allocation — an imatrix-weighted solver (llama.cpp
--target-bpw) assigns a quant type to every tensor to minimize total quantization error at the target BPW, covering attention, FFN, and the hybrid DeltaNet/SSM tensors. - imatrix — importance matrix computed over wikitext guides the per-tensor error.
- GGUF export — produced with stock
llama-quantize.
Usage
hf download sh111111111111111/Qwen3.5-4B-BitClass3-GGUF \
Qwen3.5-4B-Q4_K_M.gguf --local-dir .
llama-cli -m Qwen3.5-4B-Q4_K_M.gguf -cnv
llama-server -m Qwen3.5-4B-Q4_K_M.gguf --port 8080
Note: Qwen3.5 GGUFs are not currently runnable in Ollama (vision/mmproj handling is not yet supported there); use llama.cpp or LM Studio.
Benchmark Details
NVIDIA GB10 ATOM (128 GB unified memory, aarch64). llama.cpp with --target-bpw
(PR #15550). KLD via llama-perplexity --kl-divergence against BF16-source logits over
wikitext-2 (mean / median / 99.9th percentile reported; the single-token KL-max is
omitted as an unstable order statistic). wikitext-2 PPL via llama-perplexity -c 2048.
Downstream (HellaSwag / WinoGrande / ARC / MMLU) tracked internally.
Disclaimer
Independent project. Not affiliated with or endorsed by Qwen, Unsloth, ByteShape, Bartowski, or llama.cpp. Competitor figures are from our own benchmark harness and may differ from those projects' self-reported numbers; competitor file sizes reflect the revision we tested and may since have changed.
License
Apache 2.0, inherited from Qwen3.5-4B.
- Downloads last month
- 295
3-bit
4-bit
5-bit
6-bit
8-bit
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp# Start a local OpenAI-compatible server: llama serve -hf sh111111111111111/Qwen3.5-4B-BitClass3-GGUF: