llama.cpp, the C/C++ engine behind a huge share of local LLM tools, released v1.1.0 on 26 November 2026, its first feature release since v1.0.0. The release adds a long list of models, but two changes stand out for anyone who quantizes and serves models themselves:
- Automatic per-tensor quantization to a size or bits-per-weight budget (
--target-size/--target-bpw), so you can make a GGUF that fills your VRAM almost exactly. - OpenAI-style named
tool_choiceinllama-server, so you can force the model to call one specific function.
This tutorial shows how to use both, explains the trade-offs, and summarises the other changes worth knowing, including a C API deprecation.
Get llama.cpp v1.1.0
Prebuilt binaries for each platform are attached to the GitHub release. To build from source:
git clone --depth 1 --branch v1.1.0 https://github.com/ggml-org/llama.cpp
cd llama.cpp
cmake -B build # add -DGGML_CUDA=ON for NVIDIA GPUs
cmake --build build --config Release -j
ls build/bin | grep -E 'llama-(quantize|imatrix|server)'
Part 1: quantize to an exact size with --target-size / --target-bpw
The problem it solves
Classic quantization presets such as Q4_K_M use hand-written rules (“Q4_K, but bump some tensors up, keep others unquantized…”). The result is a fixed size that rarely matches your hardware. In the pull request’s example, a 70B model on a 24 GB GPU gives you either a 16.8 GB file (quality left on the table) or a 24.1 GB file (does not fit). It also means two models “at Q4_K_M” can end up with quite different real bits per weight, which makes comparisons unfair.
How it works
The new optimizer (PR #15550) chooses a quantization type per tensor:
- It estimates each tensor’s quantization error by sampling rows, weighted by an importance matrix (imatrix).
- For every tensor it keeps only “Pareto-optimal” types, dropping types that add size without cutting error enough.
- It uses Lagrangian optimisation to spread the bit budget where it reduces error the most.
- With
--state-file, it saves its calculations so an interrupted run can resume, and later runs at different targets are fast.
The author reports that across 34 models and 238 tests, this approach matched or beat standard quantization quality (lower KL divergence) in 93% of cases. Treat that as the author’s evaluation, not a guarantee: the PR itself notes the optimised error is only a proxy for real model quality.
Step 1: create an imatrix with activation data
The optimizer needs an imatrix that contains activation statistics. The PR says older imatrix files without that data are refused, so generate a fresh one with the v1.1.0 tools and a representative calibration text file:
./build/bin/llama-imatrix \
-m models/my-model-f16.gguf \
-f calibration.txt \
-o imatrix.gguf
Step 2: quantize to a target
Target a file size (here 23.85 GiB to fill a 24 GB card while leaving a little room):
./build/bin/llama-quantize \
--target-size 23.85g \
--state-file \
--imatrix imatrix.gguf \
models/my-model-f16.gguf models/my-model-23.85g.gguf
Or target an average bits per weight, which is handy for fair comparisons between models:
./build/bin/llama-quantize \
--target-bpw 4.5 \
--state-file \
--imatrix imatrix.gguf \
models/my-model-f16.gguf models/my-model-4.5bpw.gguf
Useful options from the quantize README:
--state-filewithout a name uses<model name>-<hash>.bpw_state. Progress survives Ctrl-C or SIGTERM, so re-running the same command resumes.--target-exclude IQ2_XXS,IQ2_XS,IQ2_Sstops the optimizer choosing specific types (no checkpoint is written while this is active).- Tensors you pin with
--tensor-type,--token-embedding-typeor--output-tensor-typekeep their types and count toward the budget. Quantization fails if the pinned tensors leave too little room for the rest.
Tips
- The first run is the slow one, because it computes errors for every tensor. Keep the state file and you can produce 3.5, 4.0 and 4.5 bpw variants quickly.
- Remember the KV cache and context also need VRAM. Do not target 100% of your GPU memory.
- Always check the result with your own evals or
llama-perplexitybefore switching production traffic.
Part 2: force a specific tool with named tool_choice
OpenAI’s API lets you set tool_choice to a particular function. Before v1.1.0, llama-server silently treated that as auto. PR #31564 implements it: llama-server passes the named function to the parser generator and sets tool_choice to required, so the model produces a single call to that function. The PR notes this currently covers the automatic parser and the Qwen3-Coder parser.
Start the server with a tool-capable model and its chat template:
./build/bin/llama-server -m models/qwen3-8b-q4_k_m.gguf --jinja --port 8080
Then force a call with any OpenAI-compatible client:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="not-needed")
tools = [
{"type": "function", "function": {
"name": "get_weather",
"description": "Current weather for a city",
"parameters": {"type": "object",
"properties": {"location": {"type": "string"}},
"required": ["location"]}}},
{"type": "function", "function": {
"name": "get_time",
"description": "Local time for a city",
"parameters": {"type": "object",
"properties": {"location": {"type": "string"}},
"required": ["location"]}}},
]
resp = client.chat.completions.create(
model="local",
messages=[{"role": "user", "content": "Tell me about Paris right now."}],
tools=tools,
tool_choice={"type": "function", "function": {"name": "get_weather"}},
)
call = resp.choices[0].message.tool_calls[0]
print(call.function.name, call.function.arguments) # get_weather {"location": "Paris"}
The PR’s tests deliberately told the model to call the other function, and the named choice still won in all 64 test runs across four models. That makes named tool_choice a reliable way to build deterministic pipeline steps, such as “always extract with save_invoice“, on local models.
Other changes worth knowing
- New models: Inkling 2 (text + vision), Inkling 2 DSpark and Inkling 2 Mini, Domyn Edge 4B, Zaya1 8B, MiniMax-M3.1, RAON-1-mini-preview and Hy4 flash, plus many audio/TTS models (Kokoro, Zonos3-Mini, tiny-voca, Kyutai Hibiki/Moshi and more).
- Speculative decoding: DFlash is split into separate draft methods:
draft-dflash,draft-dflash2,draft-dsparkanddraft-lilicorr. - Token-aware chat parsing: special tokens are matched as tokens rather than text, which reduces parsing errors with tool calls and reasoning blocks.
- Server: slot scheduling was refactored, cached prompts are restored more reliably, HTTP connections are reused after streamed responses, and
GET /models/ssewas added in single-model mode. - Llama Chat UI: the web UI moved to SvelteKit 3 with a reported 63% cut in first-load JavaScript, voice messages, grouped agent traces, and the ability to run apart from the server via
npx @ggml-org/llama-chat. - ggml updated to v1.1.1.
For C/C++ API users: llama_batch is deprecated
The old llama_batch API is deprecated in favour of llama_batch_ext and llama_process (#32306). Existing code still compiles, but plan the migration now. The PR says a migration guide is coming with a follow-up pull request. If you use bindings (Python, Go, Rust), watch for binding releases that move to the new API.
Takeaway
llama.cpp v1.1.0 makes local inference more precise in two ways: models can be quantized to exactly the size your hardware allows, and servers can force a specific tool call just like OpenAI’s API. If you self-host models, regenerate an imatrix, try --target-size for your GPU, and switch any “please call this function” prompting hacks to named tool_choice.
Sources: llama.cpp v1.1.0 release notes · PR #15550 – target bpw/size quantization · PR #31564 – named tool choice · llama-quantize README
