]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
metal : add TQ2_0 support (#26980)
authorGeorgi Gerganov <redacted>
Thu, 13 Aug 2026 11:33:53 +0000 (14:33 +0300)
committerGitHub <redacted>
Thu, 13 Aug 2026 11:33:53 +0000 (14:33 +0300)
commit4a84b0ad108204f17f3232e26e5c802fb172b492
treeaa30840e3244c6c58b52bd4a86bce7a7fc48dc00
parentf65e568fd83712c92babbb096b57e572af0ec357
metal : add TQ2_0 support (#26980)

* metal: add TQ2_0 support

Add support for the GGML_TYPE_TQ2_0 (ternary, 2 bits per element) type in
the Metal backend.

Assisted-by: llama.cpp:DeepSeek-v4-Flash-0731
* cont : optimize mul_mv kernel

- float ops over integer ops
- precalculate sums
- hoist coef out of the inner loop
- contiguous y loads

llama.cpp:DeepSeek-v4-Flash-0731
ggml/src/ggml-metal/ggml-metal-device.cpp
ggml/src/ggml-metal/ggml-metal-device.m
ggml/src/ggml-metal/ggml-metal-impl.h
ggml/src/ggml-metal/ggml-metal.metal
tests/test-backend-ops.cpp