Llama-3.1-8B-SlimKV-r4

A SlimKV variant of Llama-3.1-8B-Instruct with 4ร— feature-wise compression of beacon KV representations, corresponding to SlimKV-f4 in the paper.

Part of the SlimKV collection.

Compression settings

SlimKV jointly compresses the token dimension and the feature dimension of the KV cache. The r2/r4/r8 suffixes in these repository names specify feature-wise compression of beacon KV representations, corresponding to SlimKV-f2/f4/f8 in the paper.

Repository suffix Paper variant Feature-wise compression
r2 SlimKV-f2 2ร—
r4 SlimKV-f4 4ร—
r8 SlimKV-f8 8ร—

Token-wise compression is configured separately through the beacon interval. In the paper's tnfm notation, n is the token-wise compression factor and m is the feature-wise compression factor. The nominal total compression factor is token-wise factor ร— feature-wise factor. Examples include:

Total compression Token-feature settings
8ร— t4f2 or t2f4
16ร— t8f2, t4f4, or t2f8
32ร— t16f2, t8f4, or t4f8

Each model fixes its feature factor; the token factor is configurable through the Beacon interval. The product describes compressed historical Beacon memory; full-dimensional raw-token tails and sinks affect the realized cache-memory reduction.

Layer-specific latent ranks are allocated adaptively under a global feature budget (Section 3.3). SlimKV applies low-rank compression to the beacon branch and performs reconstruction-free latent-space attention over beacon memory during decoding.

Files and usage

Model weights, configuration, and tokenizer files are included in this repository. Use the corresponding SlimKV inference implementation to load the custom model components. Loading with an unmodified Transformers implementation has not been verified.

License and attribution

Built with Llama.

This SlimKV variant contains modified Llama 3.1 model weights and remains subject to the Llama 3.1 Community License and Acceptable Use Policy. The upstream Llama materials are not licensed under Apache 2.0. See NOTICE for the required upstream attribution.

Paper

SlimKV: Joint Token-Feature KV Cache Compression with Reconstruction-Free Beacon Attention. See Sections 3.3 and 5.1 and Table 2 for compression definitions.

Downloads last month
139
Safetensors
Model size
9B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Zihant0513/SlimKV-Llama3.1-8B-r4

Finetuned
(3,274)
this model

Collection including Zihant0513/SlimKV-Llama3.1-8B-r4

Paper for Zihant0513/SlimKV-Llama3.1-8B-r4