ik_llama_opt/ggml/src
Kawrakow 007d2a56b3 IQ4_K: SOTA 4-bit quantization (#6)
* iq4_k: basics

* quantize/dequantize works
* CUDA dequantize works and one can run PPL calcs. I get
  PPL = 6.5258 for LlaMA-3.1-8B, which is 1.77% above fp16.
  In comparison, q4_K_S (same size) is 2.88% above fp16.
* TG on CUDA does not work. Johannes has changed the way i-quant dot
  products are done, so need to sort out what he had in mind
* iqk_mul_mat is not implemented.

* iq4_k: TG now works on CUDA

* iq4_k: AVX512 implementation

For LLaMA-3.1-8B we get PP-512 = 182.6 t/s, TG-128 = 13.6 t/s,
so almost the same as q4_K_S.

* iq4_k: AVX2 implementation

For LLaMA-3.1-8B we get PP-512 = 203.1 t/s, TG-128 = 12.9 t/s
on the Ryzen-5975X.

* iq4_k: NEON implementation

For LLaMA-3.1-8B we get PP-512 = 60.7 t/s, TG-128 = 25.0 t/s
on the M2-Max. TG is on par with q4_K_S, PP is ~10% slower.

* iq4_k: Metal implementation

For LLaMA-3.1-8B we get PP-512 = 445 t/s, TG-128 = 46.3 t/s
on a 30-core M2-Max GPU. This is to be compared with (currently)
PP-512 = 460 t/s, TG-128 = 51 t/s for q4_K_S.

* iq4_k: scalar dot product

---------

Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
2024-07-28 12:11:59 +02:00
..
ggml-cann Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-cuda IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
ggml-sycl Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
iqk IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
kompute@4565194ed7 Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
kompute-shaders Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
llamafile Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
vulkan-shaders Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
CMakeLists.txt Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-aarch64.c Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-aarch64.h Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-alloc.c Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-backend-impl.h Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-backend.c Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-blas.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-cann.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-common.h IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
ggml-cuda.cu IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
ggml-impl.h Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-kompute.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-metal.m IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
ggml-metal.metal IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
ggml-quants.c IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00
ggml-quants.h Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-rpc.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-sycl.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml-vulkan.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
ggml.c IQ4_K: SOTA 4-bit quantization (#6) 2024-07-28 12:11:59 +02:00