Skip to content

CUDA: use MMQ for MoE on V100 - #32504

Merged
IMbackK merged 1 commit into
ggml-org:masterfrom
JohannesGaessler:cuda-v100-moe-mmq
Nov 18, 2026
Merged

IMbackK merged 1 commit into
ggml-org:masterfrom
JohannesGaessler:cuda-v100-moe-mmq

Conversation

@JohannesGaessler

Copy link
Copy Markdown
Contributor

While working on something else I noticed that on V100s in particular the performance of quantized MoE models is bad. As it turns out the kernel selection logic does not properly account for NVIDIA GPUs with FP16 tensor cores but without int8 tensor cores. So as a consequence MoE models were using the much slower dequant + cuBLAS path that requires synchronization with host code. This PR makes v100s use MMQ for quantized MoE models even though this uses __dp4a.

GPU Model Microbatch size Test t/s master t/s a32d56f Speedup
V100-PCIE-32GB granitemoe 3B.A800M Q4_0 64 pp4096 1021.11 3017.12 2.95
V100-PCIE-32GB granitemoe 3B.A800M Q4_0 128 pp4096 1558.51 4393.21 2.82
V100-PCIE-32GB granitemoe 3B.A800M Q4_0 256 pp4096 2297.79 5847.09 2.54
V100-PCIE-32GB granitemoe 3B.A800M Q4_0 512 pp4096 3128.99 6732.83 2.15
V100-PCIE-32GB granitemoe 3B.A800M Q4_0 1024 pp4096 4062.88 8131.91 2.00
V100-PCIE-32GB granitemoe 3B.A800M Q4_0 2048 pp4096 4933.03 9025.37 1.83

Requirements

@JohannesGaessler
JohannesGaessler requested a review from a team as a code owner November 17, 2026 22:40
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning CUDA Related to the CUDA backend labels Nov 17, 2026
@IMbackK
IMbackK merged commit 398f00d into ggml-org:master Nov 18, 2026
18 of 19 checks passed
Annieren pushed a commit to Annieren/llama.cpp-upstream that referenced this pull request Nov 23, 2026
Nindaleth pushed a commit to Nindaleth/llama.cpp that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA Related to the CUDA backend ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants