Efficient LLM Inference with Activation Checkpointing and Hybrid Caching

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Lee, Sanghyeon, Kim, Hongbeen, Hwang, Soojin, Heo, Guseul, Noh, Minwoo, Huh, Jaehyuk
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911414978871296
author Lee, Sanghyeon
Kim, Hongbeen
Hwang, Soojin
Heo, Guseul
Noh, Minwoo
Huh, Jaehyuk
author_facet Lee, Sanghyeon
Kim, Hongbeen
Hwang, Soojin
Heo, Guseul
Noh, Minwoo
Huh, Jaehyuk
contents Recent large language models (LLMs) with enormous model sizes use many GPUs to meet memory capacity requirements incurring substantial costs for token generation. To provide cost-effective LLM inference with relaxed latency constraints, extensive research has focused on expanding GPU memory by leveraging the host memory. However, LLM inference engines that utilize the host memory often face underutilization of GPU compute units, as a considerable portion of inference time is spent in loading the model onto the GPU via host-GPU interconnect. To tackle these challenges of the host memory offloading for LLM, we introduce HybridServe, an LLM inference system with activation checkpointing based on activation caching. The activation cache stores activation checkpoints generated during intermediate inference stages, allowing the fast recomputation of KV cache while model parameters are transferred to GPU from host memory. Unlike conventional methods that recompute the KV cache from scratch using token IDs, the activation cache allows bypassing projection and FFN operations. To balance between the activation recomputation and parameter loading overhead, this study proposes a KV-activation hybrid caching scheme which finds the best ratio of the key-value and activation caches to adjust the recomputation time. Our system achieves 2.19x throughput improvement over the state-of-the-art prior work for offloading both model weights and KV cache.
format Preprint
id arxiv_https___arxiv_org_abs_2501_01792
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Efficient LLM Inference with Activation Checkpointing and Hybrid Caching
Lee, Sanghyeon
Kim, Hongbeen
Hwang, Soojin
Heo, Guseul
Noh, Minwoo
Huh, Jaehyuk
Distributed, Parallel, and Cluster Computing
Recent large language models (LLMs) with enormous model sizes use many GPUs to meet memory capacity requirements incurring substantial costs for token generation. To provide cost-effective LLM inference with relaxed latency constraints, extensive research has focused on expanding GPU memory by leveraging the host memory. However, LLM inference engines that utilize the host memory often face underutilization of GPU compute units, as a considerable portion of inference time is spent in loading the model onto the GPU via host-GPU interconnect. To tackle these challenges of the host memory offloading for LLM, we introduce HybridServe, an LLM inference system with activation checkpointing based on activation caching. The activation cache stores activation checkpoints generated during intermediate inference stages, allowing the fast recomputation of KV cache while model parameters are transferred to GPU from host memory. Unlike conventional methods that recompute the KV cache from scratch using token IDs, the activation cache allows bypassing projection and FFN operations. To balance between the activation recomputation and parameter loading overhead, this study proposes a KV-activation hybrid caching scheme which finds the best ratio of the key-value and activation caches to adjust the recomputation time. Our system achieves 2.19x throughput improvement over the state-of-the-art prior work for offloading both model weights and KV cache.
title Efficient LLM Inference with Activation Checkpointing and Hybrid Caching
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2501.01792