]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
IQ4_XS: a 4.25 bpw quantization (llama/5747)
authorKawrakow <redacted>
Tue, 27 Feb 2024 14:34:24 +0000 (16:34 +0200)
committerGeorgi Gerganov <redacted>
Wed, 28 Feb 2024 09:18:31 +0000 (11:18 +0200)
commita69ffd53882a071da2caf277a5d65e4bc57a89b3
treef6798799e86f86060f3c460d0c69ac359559591e
parent0f3af6bdd38d54d26a9cce7540a9bef9a7641f0d
IQ4_XS: a 4.25 bpw quantization (llama/5747)

* Try IQ4_NL with blocks of 64 - does not look good

* iq4_xs: go to super-blocks of 256 and 6-bit scales for blocks of 32

* iq4_xs: CUDA works - 133.2 t/s

* iq4_xs: AVX2 dot product

* iq4_xs: ARM_NEON dot product

* iq4_nl: Metal implementation

As usual, Metal / Apple Silicon don't like my quants.

* iq3_xs: minor fix

* iq4_xs: shrink by using IQ3_S for attn_k and attn_q

* iq4_xs: revert using IQ3_S for attn_k and attn_v

PPL vs size is good, but CPU performance suffers: on M2 Max
TG-128 drops to 21.7 t/s from 28.8, and on a Ryzen-7950X
to 14.5 t/s from 15.8 t/s. On CUDA we have 135 t/s when
using IQ3_S vs 133 t/s with pure IQ4_XS.

* Fix CI

* iq4_xs: Added forgotten check for 256 divisibility

---------

Co-authored-by: Iwan Kawrakow <redacted>
include/ggml/ggml.h
src/ggml-cuda.cu
src/ggml-metal.m
src/ggml-metal.metal
src/ggml-quants.c
src/ggml-quants.h
src/ggml.c
tests/test-backend-ops.cpp