Run Whittle 9B with llama.cpp
Our llama.cpp fork adds Whittle 9B’s ternary weights to llama.cpp as a new weight type, WTG, on the CPU and on Metal, so Whittle 9B runs in llama-cli, llama-server and llama-bench as one 2.5 GB GGUF. This quickstart builds the fork on a Mac and runs the model.
What you need
Section titled “What you need”- An Apple-silicon Mac with the Xcode command-line tools and CMake (
brew install cmake). Other backends, such as CUDA and Vulkan, don’t runWTGyet and fall back to the CPU. whittle-9b-WTG2_0.gguffrom whittle-9b-gguf in~/models/whittle/, checked against itsSHA256SUMS(see Get the model).
Apps built on upstream llama.cpp can’t load this GGUF: its weight type exists only in this fork.
1. Build
Section titled “1. Build”Clone the fork’s whittle branch (its default; master is upstream llama.cpp, unchanged):
git clone --branch whittle https://github.com/literal-labs/whittle-llama.cpp.gitcd whittle-llama.cppThen build the tools. HF_UI_VERSION names the upstream release the fork is based on, so llama-server downloads that release’s chat UI.
HF_UI_VERSION=b12484 cmake -B buildcmake --build build --config Release -j --target llama-cli llama-server llama-bench2. Chat from the command line
Section titled “2. Chat from the command line”Ask one question with every layer on the GPU (-ngl 99) and flash attention on (-fa 1), then exit (-st):
build/bin/llama-cli -m ~/models/whittle/whittle-9b-WTG2_0.gguf -ngl 99 -fa 1 --presence-penalty 1.5 -p "Explain why the sky is blue." -stLeave out -p and -st for an interactive chat. The GGUF carries the model’s sampling settings (temperature 1.0, top-p 0.95, top-k 20, min-p 0), so llama.cpp uses them unless told otherwise. A presence penalty can’t be stored in a GGUF, so pass --presence-penalty 1.5 yourself. Don’t use --temp 0: greedy decoding loops in thinking mode.
To draft tokens with the model’s MTP head, add:
--spec-type draft-mtp --spec-draft-n-max 13. Serve it
Section titled “3. Serve it”Start llama.cpp’s OpenAI-compatible server, with its chat UI at localhost:8080:
build/bin/llama-server -m ~/models/whittle/whittle-9b-WTG2_0.gguf -ngl 99 -fa 1Any OpenAI-compatible client works with the base URL http://localhost:8080/v1.
Images
Section titled “Images”Images need the model’s vision tower as an mmproj GGUF, published beside the model. Pass it with --mmproj:
build/bin/llama-server -m ~/models/whittle/whittle-9b-WTG2_0.gguf --mmproj ~/models/whittle/mmproj-whittle-9b-bf16.gguf -ngl 99 -fa 1Make the GGUF yourself
Section titled “Make the GGUF yourself”convert_whittlebin_to_gguf.py, in the fork, turns a .whittlebin into a GGUF. --hf-dir is a folder with Qwen3.5-9B’s config.json, tokenizer.json and tokenizer_config.json, and the script needs the packages in requirements/requirements-convert_hf_to_gguf.txt.
python3 convert_whittlebin_to_gguf.py ~/models/whittle/whittle-9b-WTG2_0.whittlebin --hf-dir ~/models/Qwen3.5-9B --outfile ~/models/whittle/whittle-9b-WTG2_0.ggufThe fork’s docs/whittle.md describes the WTG format, how its output is checked against the Whittle engine, its speed, and what is not done yet. Everything else is llama.cpp’s own documentation.