]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
1.5 bit quantization (#5453)
authorKawrakow <redacted>
Sun, 18 Feb 2024 16:16:55 +0000 (18:16 +0200)
committerGitHub <redacted>
Sun, 18 Feb 2024 16:16:55 +0000 (18:16 +0200)
commitbd2d4e393b2b7d2a1b2e201058e26017c9728ead
tree5c51109459cf1a25fc92fdb11d420895e16785ac
parentc8e0d7efeb7634ecc2e9832e879ab9fca4510e71
1.5 bit quantization (#5453)

* iq1_s: WIP basics

* iq1_s: CUDA is working

* iq1_s: scalar CPU dot product

* iq1_s: WIP AVX2 dot product - something is not right

* Fix tests

* Fix shadow warnings

* Fix after merge with latest master

* iq1_s: AVX2 finally works

* iq1_s: ARM_NEON dot product. Works, but not very fast

* iq1_s: better grid

* iq1_s: use IQ2_XXS for attn_output

At a cost of 0.04 extra bpw this gives a big improvement in PPL.

* iq1_s: Metal basics

Dequantize works, but not dot product

* iq1_s: Metal works, but quite slow

As usual, Apple Silicon does not like the code I write.

* iq1_s: Tests

* iq1_s: slightly faster dot product

---------

Co-authored-by: Iwan Kawrakow <redacted>
12 files changed:
examples/quantize/quantize.cpp
ggml-backend.c
ggml-cuda.cu
ggml-metal.m
ggml-metal.metal
ggml-quants.c
ggml-quants.h
ggml.c
ggml.h
llama.cpp
llama.h
tests/test-backend-ops.cpp