7
stars
9,057
commits
C++
primary language
Sep 5, 2026
updated
AI-written implementation of EDEN quantized KV cache.
Two new quantization types for the key-value cache:
| Type | Bits | Enum | Block Size | Description |
|---|---|---|---|---|
eden4 | 4 | GGML_TYPE_EDEN4 | 32 | Lloyd-Max codebook (16 levels) + EDEN-biased optimal scale |
eden3 | 3 | GGML_TYPE_EDEN3 | 32 | Lloyd-Max codebook (8 levels) + EDEN-biased optimal scale |
llama-server \
--cache-type-v eden4 \ # quantize value cache
--cache-type-k q8_0 \ # K cache recommended as F16 or q8_0
-fa on \ # flash attention required for GPU
...
For K cache with EDEN:
--cache-type-k eden3 --cache-type-v eden3
Note: CUDA converts to F16 internally for flash attention.
| Backend | Target devices | get_rows | set_rows | vec_dot | Flash Attention |
|---|---|---|---|---|---|
| CPU | All | Yes | Yes | Yes | Yes |
| CUDA | Nvidia GPU | Yes | Yes | Yes | Yes |
| HIP | AMD GPU | Yes | Yes | Yes | Yes |
| Vulkan | GPU | Yes | Yes | Yes | Yes |
| Metal | Apple Silicon | No | No | No | No |
| BLAS | All | No | No | No | No |
| SYCL | Intel GPU | No | No | No | No |
| OpenCL | Adreno GPU | No | No | No | No |
| MUSA | Moore Threads GPU | No | No | No | No |
| OpenVINO | Intel CPU/GPU/NPU | No | No | No | No |
| CANN | Ascend NPU | No | No | No | No |
| WebGPU | All | No | No | No | No |
| RPC | All | No | No | No | No |
| ZenDNN | AMD CPU | No | No | No | No |
| BLIS | All | No | No | No | No |
| IBM zDNN | IBM Z & LinuxONE | No | No | No | No |
| Hexagon | Snapdragon | No | No | No | No |
| VirtGPU | VirtGPU API | No | No | No | No |
Note: vec_dot on CUDA uses __dp4a for eden4 (table lookup + int8 dp4a) and direct float dequant for eden3.
MMQ and FATTN direct paths are not yet implemented for EDEN types on CUDA (fall back to generic paths).
OpenCL, SYCL, and Metal backends lack EDEN type support entirely - CUDA is the primary GPU target.
EDEN achieves the same perplexity as Turboquant with ~80% less code:
| Quantization | PPL (gemma-4-E2B-it-qat-UD-Q4_K_XL) | Relative code size |
|---|---|---|
eden4 | 1.8049 | ~1x |
turbo4 | 1.8062 | ~5x |
Both methods target 4-bit KV cache quantization. EDEN uses a simple Lloyd-Max codebook with a closed-form optimal scale, while Turboquant employs a more complex iterative optimization.
LLM inference in C/C++
ggml / ops / maintainer PRs / dev stats / lib llama API / llama-server REST API
A few options to get llama.cpp installed on your machine:
Once installed:
# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
|
|
|
The main goal of llama.cpp is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on
a wide range of hardware - locally and in the cloud.
The llama.cpp project is build on top of the ggml library.
| Backend | Target devices |
|---|---|
| BLAS | All |
| BLIS | All |
| CANN | Ascend NPU |
| CUDA | Nvidia GPU |
| HIP | AMD GPU |
| Hexagon | Snapdragon |
| IBM zDNN | IBM Z & LinuxONE |
| MUSA | Moore Threads GPU |
| Metal | Apple Silicon |
| OpenCL | Adreno GPU |
| OpenVINO [In Progress] | Intel CPUs, GPUs, and NPUs |
| RPC | All |
| SYCL | Intel GPU |
| VirtGPU | VirtGPU APIR |
| Vulkan | GPU |
| WebGPU | All |
| ZenDNN | AMD CPU |
llama.cpp repo and merge PRs into the master branchllama-server - MIT license(top 30 of 446)
C++
56.1%
C
15.9%
Python
7.2%
Cuda
5.4%
TypeScript
4.2%
Svelte
2.2%
HTML
2.1%
Metal
1.5%
Jinja
1.2%
7
stars
9,057
commits
C++
primary language
Sep 5, 2026
updated
AI-written implementation of EDEN quantized KV cache.
Two new quantization types for the key-value cache:
| Type | Bits | Enum | Block Size | Description |
|---|---|---|---|---|
eden4 | 4 | GGML_TYPE_EDEN4 | 32 | Lloyd-Max codebook (16 levels) + EDEN-biased optimal scale |
eden3 | 3 | GGML_TYPE_EDEN3 | 32 | Lloyd-Max codebook (8 levels) + EDEN-biased optimal scale |
llama-server \
--cache-type-v eden4 \ # quantize value cache
--cache-type-k q8_0 \ # K cache recommended as F16 or q8_0
-fa on \ # flash attention required for GPU
...
For K cache with EDEN:
--cache-type-k eden3 --cache-type-v eden3
Note: CUDA converts to F16 internally for flash attention.
| Backend | Target devices | get_rows | set_rows | vec_dot | Flash Attention |
|---|---|---|---|---|---|
| CPU | All | Yes | Yes | Yes | Yes |
| CUDA | Nvidia GPU | Yes | Yes | Yes | Yes |
| HIP | AMD GPU | Yes | Yes | Yes | Yes |
| Vulkan | GPU | Yes | Yes | Yes | Yes |
| Metal | Apple Silicon | No | No | No | No |
| BLAS | All | No | No | No | No |
| SYCL | Intel GPU | No | No | No | No |
| OpenCL | Adreno GPU | No | No | No | No |
| MUSA | Moore Threads GPU | No | No | No | No |
| OpenVINO | Intel CPU/GPU/NPU | No | No | No | No |
| CANN | Ascend NPU | No | No | No | No |
| WebGPU | All | No | No | No | No |
| RPC | All | No | No | No | No |
| ZenDNN | AMD CPU | No | No | No | No |
| BLIS | All | No | No | No | No |
| IBM zDNN | IBM Z & LinuxONE | No | No | No | No |
| Hexagon | Snapdragon | No | No | No | No |
| VirtGPU | VirtGPU API | No | No | No | No |
Note: vec_dot on CUDA uses __dp4a for eden4 (table lookup + int8 dp4a) and direct float dequant for eden3.
MMQ and FATTN direct paths are not yet implemented for EDEN types on CUDA (fall back to generic paths).
OpenCL, SYCL, and Metal backends lack EDEN type support entirely - CUDA is the primary GPU target.
EDEN achieves the same perplexity as Turboquant with ~80% less code:
| Quantization | PPL (gemma-4-E2B-it-qat-UD-Q4_K_XL) | Relative code size |
|---|---|---|
eden4 | 1.8049 | ~1x |
turbo4 | 1.8062 | ~5x |
Both methods target 4-bit KV cache quantization. EDEN uses a simple Lloyd-Max codebook with a closed-form optimal scale, while Turboquant employs a more complex iterative optimization.
LLM inference in C/C++
ggml / ops / maintainer PRs / dev stats / lib llama API / llama-server REST API
A few options to get llama.cpp installed on your machine:
Once installed:
# Download and run a model directly from Hugging Face
llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
# Launch OpenAI-compatible API server
llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
|
|
|
The main goal of llama.cpp is to enable LLM (and VLM) inference with minimal setup and state-of-the-art performance on
a wide range of hardware - locally and in the cloud.
The llama.cpp project is build on top of the ggml library.
| Backend | Target devices |
|---|---|
| BLAS | All |
| BLIS | All |
| CANN | Ascend NPU |
| CUDA | Nvidia GPU |
| HIP | AMD GPU |
| Hexagon | Snapdragon |
| IBM zDNN | IBM Z & LinuxONE |
| MUSA | Moore Threads GPU |
| Metal | Apple Silicon |
| OpenCL | Adreno GPU |
| OpenVINO [In Progress] | Intel CPUs, GPUs, and NPUs |
| RPC | All |
| SYCL | Intel GPU |
| VirtGPU | VirtGPU APIR |
| Vulkan | GPU |
| WebGPU | All |
| ZenDNN | AMD CPU |
llama.cpp repo and merge PRs into the master branchllama-server - MIT license(top 30 of 446)
C++
56.1%
C
15.9%
Python
7.2%
Cuda
5.4%
TypeScript
4.2%
Svelte
2.2%
HTML
2.1%
Metal
1.5%
Jinja
1.2%