Llama-3.1-8B-Instruct-BellowsKV-Flash-Turbo
generation speedup and cache compression
2 min read
This model consists of delta weights for optimizing Meta's Llama-3.1-8B-Instruct language model. The main purpose of the development is a dramatic reduction in memory for the KV cache (memory for storing context state) and a multiple-fold speedup in text generation when working with long contexts on powerful hardware. The Turbo version is trained via distillation (knowledge transfer) to maximize the accuracy retention of the base model. The new release will be useful for developers and researchers who need to efficiently run inference on large texts using Hopper architecture GPUs.
Key features
- A 13.4x reduction in the KV cache compared to the original dense model.
- Decoding speedup of up to 4.6x in throughput on NVIDIA H100 GPUs.
- High accuracy: on the LongBench benchmark, the model retains about 95.3% of the original quality.
- Use of a special format via FlashMLA kernels and an exact attention window.
What you can do
- Run model inference with a long context of up to 32K tokens in the vLLM ecosystem.
- Integrate delta weights into standard generation scripts via the Transformers library.
- Benchmark decoding speed and memory consumption on Hopper hardware.
Example
Activating the BellowsKV-Flash cache in Python code:
import torch, bellowskv.flash
from transformers import AutoModelForCausalLM, AutoTokenizer
name = "meta-llama/Llama-3.1-8B-Instruct"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(name, dtype=torch.bfloat16).cuda()
bellowskv.flash.enable(model, "morriszjm/Llama-3.1-8B-Instruct-BellowsKV-Flash-Turbo")
# model.generate(...) использует кэш BellowsKV-Flash
Read more
Details• Accuracy on LongBench (32K): 95.3% of the base model (average across 11 tasks).
• Hardware requirements: Hopper architecture GPU (H100 / H200), NVIDIA GPU with CUDA support.
• vLLM limitations: prefix caching, speculative generation, and KV connectors are not supported.
• License: distributed under the Llama 3.1 Community License.










Comments