Powered by OpenAIRE graph
Found an issue? Give us feedback
ZENODOarrow_drop_down
ZENODO
Preprint . 2026
License: CC BY
Data sources: Datacite
ZENODO
Preprint . 2026
License: CC BY
Data sources: Datacite
addClaim

CPU-Offloaded KV Cache: Enabling Long-Context Inference on Consumer GPUs

Authors: Gaveta, Andrew;

CPU-Offloaded KV Cache: Enabling Long-Context Inference on Consumer GPUs

Abstract

We present a simple yet effective method for running large language model inference with long contexts on consumer-grade GPUs with limited VRAM. Our approach offloads the Key-Value (KV) cache from GPU VRAM to CPU RAM after each token generation step, bringing it back to GPU only when needed. We demonstrate that this technique reduces peak VRAM usage by up to 60% on a GTX 960 (4GB VRAM) while maintaining full output quality, enabling contexts of 3500+ tokens on hardware that would otherwise fail with Out-of-Memory errors. The overhead in generation speed is approximately 12-23%, which we argue is an acceptable trade-off for dramatically expanded hardware accessibility. We further validate the approach on Mistral-7B running on a Tesla T4 (14.56GB VRAM), demonstrating that peak VRAM consumption exceeds physical memory limits at 2048+ token contexts — only possible due to active CPU offloading.

  • BIP!
    Impact byBIP!
    selected citations
    These citations are derived from selected sources.
    This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    0
    popularity
    This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
    Average
    influence
    This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
    Average
    impulse
    This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
    Average
Powered by OpenAIRE graph
Found an issue? Give us feedback
selected citations
These citations are derived from selected sources.
This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Citations provided by BIP!
popularity
This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network.
BIP!Popularity provided by BIP!
influence
This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically).
BIP!Influence provided by BIP!
impulse
This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network.
BIP!Impulse provided by BIP!
0
Average
Average
Average
Upload OA version
Are you the author of this publication? Upload your Open Access version to Zenodo!
It’s fast and easy, just two clicks!