Accelerating LLM Inference with Prompt Caching for Open‑Source Models on Databricks

· Source: Databricks · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cloud Computing & IT Infrastructure · Depth: Intermediate, quick

Summary

Databricks has extended its built-in prompt caching capability to open-source large language models (LLMs) hosted on its Foundation Model APIs, including GPT-OSS 20B and 120B, Gemma 3 12B, and Llama 3.1 8B and 3.3 70B. This feature, previously available for proprietary models like GPT, Gemini, and Claude, automatically reuses identical prompt prefixes to eliminate redundant compute cycles during LLM inference. The implementation is implicit, requiring no customer configuration, and ensures prompt caches are isolated, volatile, and never persisted for security. Initial rollout on GPT-OSS models demonstrated significant real-world gains, including a 2.5x increase in per-replica input-token throughput and a 3x reduction in P50 latency, even with a relatively low 30% cache hit ratio. This enhancement aims to lower latency, increase throughput, and reduce costs for various workloads.

Key takeaway

For MLOps Engineers deploying open-source LLMs on Databricks, this automatic prompt caching feature offers substantial performance and cost benefits without requiring any configuration. Your inference pipelines for real-time chat, batch processing, or AI agents will see improved throughput and reduced latency. Consider deploying your next OSS model with Databricks' Foundation Model APIs to leverage these built-in optimizations and observe performance metrics climb.

Key insights

Prompt caching for LLMs significantly reduces inference latency and increases throughput by reusing identical prompt prefixes.

Principles

Method

Databricks' system automatically reuses KV caches for identical prompts, skipping the prefill stage on cache hits to improve performance.

In practice

Topics

Best for: AI Architect, CTO, VP of Engineering/Data, AI Engineer, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Databricks.