xrip 85ff4657cb cuda: tune the mmvq/mmq crossover for Turing
Turing had no entry in ggml_cuda_should_use_mmvq and fell through to the
generic ne11 <= 8, while Ada, Blackwell, DGX Spark and Orin all have measured
switch points. MMQ overtakes MMVQ far earlier than n=8 on SM75.

Measured on a CMP 50HX (cc 7.5, CUDA 13.3) with test-backend-ops perf, medians
of 4 reps after a discarded warmup, forcing each path via an instrumentation
build. MMQ speedup over MMVQ at n=8:

  q2_K 2.57x   q3_K 2.13x   q4_K 1.96x   iq4_xs 1.93x   q5_K 1.79x   q6_K 1.74x

End to end on Qwen3.5-9B-UD-Q4_K_XL, llama-bench, medians of 3 interleaved
rounds at -r 20:

  pp1 -0.2%   pp2 0.0%   pp3 0.0%   pp4 +3.2%   pp5 +12.1%   pp8 +47.6%

q6_K is deliberately 3 rather than the 2 the synthetic sweep suggested. That
sweep had a single shape for q6_K and MMQ won it by only 1.02x, the weakest
margin measured. With the threshold at 2 the model regressed 2% at pp3,
reproducibly across three rounds: its 24 q6_K tensors were the only ones
switching path at that batch size. The synthetic margin did not survive on the
model's real q6_K shapes, so mmvq keeps n=3 for that type.

q4_K was measured across five m/k shapes; at n=3 mmvq wins 1.19x/1.09x/1.08x on
three and loses 1.01x on two, geometric mean 1.065 in mmvq's favour. At n=4 mmq
wins on all five.

The n=512 cases act as a control: above MMVQ_MAX_BATCH_SIZE neither mode can
select mmvq, and both measure within 1.00x-1.01x of each other.

Only the measured types are listed; everything else keeps the default. q2_K and
q3_K rest on a single shape each and are not present in the model used for the
end-to-end check, so they are less well evidenced than the rest.
2026-09-21 20:53:22 +03:00
2026-09-21 20:46:09 +03:00
2026-09-21 20:46:09 +03:00
2026-06-12 15:53:26 +02:00
2026-02-02 08:38:55 +02:00
2026-09-09 15:56:27 +02:00

llama.cpp

llama

Quick start

A few options to get llama.cpp installed on your machine:

Once installed:

# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF

# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
VLM session with `llama cli` VLM session with llama cli Built-in web UI against `llama serve` running Qwen 3.6 Built-in web UI against llama serve

Description

The main goal of llama.cpp is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on a wide range of hardware - locally and in the cloud.

  • Plain C/C++ implementation without any dependencies
  • Apple silicon is a first-class citizen - optimized via ARM NEON, Accelerate and Metal frameworks
  • AVX, AVX2, AVX512 and AMX support for x86 architectures
  • RVV, ZVFH, ZFH, ZICBOP and ZIHINTPAUSE support for RISC-V architectures
  • 1.5-bit, 2-bit, 3-bit, 4-bit, 5-bit, 6-bit, and 8-bit integer quantization for faster inference and reduced memory use
  • Custom CUDA kernels for running LLMs on NVIDIA GPUs (support for AMD GPUs via HIP and Moore Threads GPUs via MUSA)
  • Vulkan and SYCL backend support
  • CPU+GPU hybrid inference to partially accelerate models larger than the total VRAM capacity

The llama.cpp project is build on top of the ggml library.

Supported backends

Backend Target devices
BLAS All
BLIS All
CANN Ascend NPU
CUDA Nvidia GPU
HIP AMD GPU
Hexagon Snapdragon
IBM zDNN IBM Z & LinuxONE
MUSA Moore Threads GPU
Metal Apple Silicon
OpenCL Adreno GPU
OpenVINO [In Progress] Intel CPUs, GPUs, and NPUs
RPC All
SYCL Intel GPU
VirtGPU VirtGPU APIR
Vulkan GPU
WebGPU All
ZenDNN AMD CPU

Documentation

Tools

Development

Contributing

  • Contributors can open PRs
  • Collaborators will be invited based on contributions
  • Maintainers can push to branches in the llama.cpp repo and merge PRs into the master branch
  • Any help with managing issues, PRs and projects is very appreciated!
  • Read the CONTRIBUTING.md for more information

Acknowledgements

  • yhirose/cpp-httplib - Single-header HTTP server, used by llama-server - MIT license
  • nothings/stb - Single-header image format decoder, used by multimodal subsystem - Public domain
  • nlohmann/json - Single-header JSON library, used by various tools/examples - MIT License
  • mackron/miniaudio - Single-header audio format decoder, used by multimodal subsystem - Public domain
  • sheredom/subprocess.h - Single-header process launching solution for C and C++ - Public domain
S
Description
llama.cpp fork with AVX1, NUMA, SM75 Turing, and FastMTP optimizations
Readme MIT
364 MiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 55.8%
C 16.3%
Python 7.5%
Cuda 5.1%
TypeScript 4.3%
Other 10.8%