Instructions to use shujunyi/Qwen3.5-4B-MTP-Q4_0 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 shujunyi/Qwen3.5-4B-MTP-Q4_0 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 shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0 # Run inference directly in the terminal: llama cli -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0 # Run inference directly in the terminal: llama cli -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_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 shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_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 shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
Use Docker
docker model run hf.co/shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
- LM Studio
- Jan
- vLLM
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shujunyi/Qwen3.5-4B-MTP-Q4_0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shujunyi/Qwen3.5-4B-MTP-Q4_0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
- Ollama
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with Ollama:
ollama run hf.co/shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
- Unsloth Desktop
- Pi
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with Docker Model Runner:
docker model run hf.co/shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
- Lemonade
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
Run and chat with the model
lemonade run user.Qwen3.5-4B-MTP-Q4_0-Q4_0
List all available models
lemonade list
- Hermes Agent
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_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 shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use shujunyi/Qwen3.5-4B-MTP-Q4_0 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_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 "shujunyi/Qwen3.5-4B-MTP-Q4_0:Q4_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.5-4B — MTP — Q4_0 (GGUF)
Q4_0 GGUF quantization of Qwen3.5-4B that retains the Multi-Token
Prediction (MTP) tensors, so it can self-speculate with llama.cpp's
--spec-type draft-mtp — no separate draft model required.
| Architecture | Qwen3.5 dense 4B |
| Quantization | Q4_0 (4.81 BPW) |
| File | Qwen3.5-4B-Q4_0.gguf (~2.6 GB, single file) |
| Speculative decoding | MTP (built in) |
| Source | requantized from unsloth/Qwen3.5-4B-MTP-GGUF → Qwen3.5-4B-Q8_0.gguf |
Requirements
MTP is not yet in mainline llama.cpp. Build the branch that carries the
draft-mtp speculative type:
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp && git checkout mtp-exp # branch with --spec-type draft-mtp
cmake -B build -DGGML_CUDA=ON && cmake --build build -j
Run
llama-server \
-m Qwen3.5-4B-Q4_0.gguf \
--spec-type draft-mtp --spec-draft-n-max 2 \
-c 262144 -ngl 99
Download the weights:
pip install -U "huggingface_hub[hf_transfer]"
HF_HUB_ENABLE_HF_TRANSFER=1 \
hf download shujunyi/Qwen3.5-4B-MTP-Q4_0 \
Qwen3.5-4B-Q4_0.gguf --local-dir .
Notes
- This quant was produced by requantizing the upstream
Q8_0weights toQ4_0(llama-quantize --allow-requantize). Requantizing from an already-quantized 8-bit source is slightly lossier than quantizing directly from the BF16 master; if you need the cleanest Q4_0 baseline, quantize fromQwen3.5-4B-BF16.ggufinstead. Q4_0is a simple/legacy quant chosen for a clean quality baseline; for the best size/quality tradeoff consider anIQ4_XS/ imatrix build instead.
- Downloads last month
- 67
4-bit