NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Tangram: Accelerating Serverless LLM Loading through GPU Memory Reuse and Affinity

Wenbin Zhu, Zhaoyan Shen, Zili Shao, Hongjun Dai, Feng ChenarXiv 2025 · DOI

Abstract

Tangram is a novel system designed to slash cold-start latency in serverless LLM deployments by intelligently reusing GPU memory. By dynamically allocating KV cache and sharing model parameters at the tensor level across different models, it reduces redundant data transfers over PCIe, achieving up to 6.2x faster model loading and cutting Time-To-First-Token (TTFT) by up to 55%.

The Cold-Start Bottleneck in Serverless LLMs

Serverless LLMs offer a cost-effective, "pay-as-you-go" model for AI inference by multiplexing expensive GPUs across multiple users and models. However, this architecture suffers from a severe "cold-start" problem. When a new model is requested, the system must initialize the environment and transfer massive model weights from CPU memory (or disk) to the GPU over the PCIe bus.

The four phases of a serverless LLM cold start, highlighting the significant latency contributed by the Load and Init phases.

As shown in Figure 1, the cold-start process consists of four primary phases: Init, Load, Profile, and Prefill. As models grow larger, the Load phase scales linearly with parameter count, becoming a massive bottleneck. Current inference engines exacerbate this by pre-allocating the maximum possible GPU memory for the KV cache, wasting gigabytes of VRAM that could otherwise be used to cache inactive model weights.

Methodology: Shifting to Shared-Memory Architecture

Tangram shifts the paradigm from an exclusive, single-model architecture to a shared-memory, multi-model approach through three core mechanisms:

  • Tensor-Level Model Reuse: Instead of evicting an entire model, Tangram keeps frequently used tensors in a Unified Memory Pool on the GPU. Managing memory at the tensor level preserves contiguous access for GPU kernels while allowing fine-grained caching.
  • On-Demand KV Cache Allocation (ODKV): Tangram allocates KV cache blocks dynamically during inference based on actual sequence lengths. This reclaims "stranded" VRAM, which is immediately repurposed to store reusable model tensors.
  • Smart Memory Management: To prevent fragmentation, Tangram treats tensor allocation as a Multi-Choice Multi-Dimensional Knapsack Problem (MCMDKP), using a two-stage heuristic to optimize packing with minimal data movement.
  • GPU Affinity-Aware Scheduling: The controller routes incoming requests to the GPU that already holds the most weights for that specific model, minimizing PCIe transfer times in multi-GPU clusters.

Key Results and Evaluation

Tangram was evaluated using realistic serverless traces (Azure) and popular open-source LLMs (1.3B to 20B parameters). The results demonstrate significant improvements over state-of-the-art baselines like SLLM.

Performance comparison showing (a) TTFT reduction across different optimization levels and (b) the impact of model size on TTFT.

As illustrated in Figure 2, Tangram achieves 1.8x to 6.2x faster model loading and reduces overall TTFT by 23% to 55% during cold starts. Notably, the system maintains high efficiency as model size increases. The overhead of dynamic KV cache allocation is minimal, resulting in a decoding throughput loss of less than 3.2%. In distributed environments, the affinity-aware scheduler further reduces tail latency by up to 54% compared to random selection.

Conclusion

Tangram demonstrates that reclaiming over-provisioned KV cache space and managing memory at the tensor level are critical for efficient serverless LLM inference. By enabling fine-grained on-GPU caching and memory-aware scheduling, Tangram effectively mitigates the cold-start penalty, paving the way for more responsive and cost-effective large-scale AI deployments.

Summary updated

BibTeX
@misc{zhu2025tangram,
  author = {Wenbin Zhu and Zhaoyan Shen and Zili Shao and Hongjun Dai and Feng Chen},
  title = {{Tangram: Accelerating Serverless LLM Loading through GPU Memory Reuse and Affinity}},
  year = {2025},
  eprint = {2512.01357},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.01357},
}
Figure