ik_llama_opt/gguf-py/gguf
Kawrakow f375799f17 Adding IQ2_KL (#602)
* Experiments for 2.6875 bpw quants

At least according to rmse, this is significantly better than
q2_K, while using only 1/16 more bits per weight.

* iq2_kl: basics

* iq2_kl: CUDA dequantize

* iq2_kl: small improvement in PPL

Also check the two neighbouring values for the block scale
and use the one that minimizes RMSE.

* iq2_kl: MMQ

Quite good: PP-512(L3-8B) = 8472 t/s.

* iq2_kl: MMVQ

We get PP-128(L3-8B) = 162 t/s.
Which means that this is not quite as good as it should be as
(almost) same bpq q2_K is at 170 t/s.

* iq2_kl: Zen4 GEMM/GEMV

Not particularly fast. I may need to think about rearranging the bits.

* iq2_kl: better Zen4

* iq2_kl: convert/repack to q8_k_r8 (AVX2)

* iq2_kl: AVX2 GEMM/GEMV

* iq2_kl: WIP NEON

The compiler started crashing!!!

* iq2_kl: NEON

Had to work around a compiler crash when using vzip2q_u8 using
vqtbl2q_u8.

* iq2_kl: convert/repack to q8_k_r8 (NEON)

* iq2_kl: Metal dequantize

* iq2_kl: Metal GEMV - pretty slow

* iq2_kl: Metal GEMV - slightly better (40 t/s -> 44.5 t/s)

* iq2_kl: Metal GEMV - slightly better (44.5 t/s -> 46.5 t/s)

* iq2_kl: Metal GEMV - slightly better (46.5 t/s -> 47.2 t/s)

* iq2_kl: slightly better Metal dequantize

PP-512 goes to 476 t/s up from 466 t/s.

* iq2_kl: slightly better Metal dequantize

PP-512 goes to 492 t/s up from 476 t/s.

* Add iq2_kl to constants.py

---------

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
2025-07-14 18:55:08 +02:00
..
__init__.py Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
constants.py Adding IQ2_KL (#602) 2025-07-14 18:55:08 +02:00
gguf.py gguf-py: Refactor and allow reading/modifying existing GGUF files (#3981) 2023-11-11 08:04:50 +03:00
gguf_reader.py Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
gguf_writer.py Deepseek V3 support added (#176) 2025-01-23 18:24:10 +02:00
lazy.py Merge mainline - Aug 12 2024 (#17) 2024-08-12 15:14:32 +02:00
metadata.py Merge mainline - Aug 12 2024 (#17) 2024-08-12 15:14:32 +02:00
py.typed convert : various script cleanups/fixes + merges and special token handling (#2842) 2023-08-30 11:25:50 +03:00
quants.py convert_hf_to_gguf.py : conversion from hf weights to Q6_0 (#483) 2025-06-03 09:30:30 +03:00
tensor_mapping.py Support for dots.llm1 models (#573) 2025-07-10 02:37:36 -05:00
utility.py Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
vocab.py Support for Llama-3-Nemotron models (#377) 2025-05-09 10:09:59 +03:00