← Technology, Science & Infrastructure ▣ Distilled locally

Introducing TPU Sync: Fast KV cache and weight transfer for inference and RL on TPU

By Weiren Yu
November 9, 2026  ·  Google Cloud Blog ↗

As frontier AI evolves from stateless single-turn prompts to million-token agents, disaggregated serving, and continuous reinforcement learning (RL), the primary bottleneck in AI infrastructure has shifted from raw compute to orchestrating live model state — both the contextual state held in massive key-value (KV) caches during inference and the parameter state updated and broadcast from trainers to rollout samplers during RL. Whenever this state is trapped inside a single chip's memory or stalled on network transfers, AI accelerators sit idle.

We designed TPU Sync from first principles to serve as the model-state layer across TPU clusters — built on the architectural insight that accelerator High Bandwidth Memory (HBM), host DRAM, shared storage, and the data center network (DCN) should operate as a single, co-designed memory hierarchy. An open-source, native C++ library, TPU Sync moves TPU-tiled tensors directly across this hierarchy with asynchronous DMA transfers that overlap data movement with active computation.

For inference, it decouples TPU compute from network backpressure and turns host DRAM, local SSDs, and Google Cloud Managed Lustre into an automated, multi-tier KV cache; and for RL, it exposes low-level DMA and DCN primitives that higher-level RL frameworks can use to stream updated weights from trainers to samplers. By accessing device buffers in place rather than copying or locking them, TPU Sync consistently slashes KV transfer latency by over 90% and reduces Time to First Token (TTFT) by an average of 90% for heavyweight open-weight MoE models (235B–480B parameters) in prefix-caching and disaggregated-serving workloads, compared to running without TPU Sync.

Across this shared model-state layer, TPU Sync integrates directly into existing infrastructure stacks across PyTorch (via TorchTPU) and JAX — serving as the TPU KV cache connector for vLLM, SGLang, and llm-d disaggregated serving, while providing low-level transfer primitives for Pathways and multi-controller JAX (McJAX) RL pipelines.

Understanding TPU Sync: The kitchen analogy

To understand TPU Sync’s impact, imagine a high-end restaurant kitchen. Think of the TPU as an incredibly fast executive chef working on a tiny countertop (the chip's HBM). When preparing a massive feast, the chef needs lots of ingredients (the KV cache), which quickly clutter the counter.

Crucially, the runners swap trays in and out while the chef keeps cooking (asynchronous, non-blocking transfers).

Key use cases for TPU Sync

TPU Sync improves system throughput and latency in workloads requiring deep context, high concurrency, multi-turn reasoning and RL rollouts:

Breaking through the memory wall with TPU Sync

At its core, TPU Sync establishes a high-performance data transfer path between TPU HBM and host RAM, as well as across TPU hosts via the DCN. It achieves this through four key architectural advantages:

TPU Sync exposes a low-level data transfer API, making it easier for developers to integrate high-speed TPU data transfer into higher-level frameworks.

Higher-level architecture

Built on top of its core transport and resharding primitives, TPU Sync provides a modular orchestration stack for distributed cache management:

1-architecture

Figure 1. TPU Sync operates as the model-state layer on TPU, unifying TPU HBM (Tier 1), pinned host DRAM (Tier 2), shared storage (Tier 3), and multi-host DCN under a single layout-preserving DMA data plane.

Solving disaggregated serving and prefix caching

Let us take a closer look at how TPU Sync helps with some of the use cases we listed in the earlier section. By treating host pinned memory as a substantial, high-speed Tier 2 cache, TPU Sync reduces the fragmentation and memory limits of standard HBM setups.

Prefill/Decode (P/D) disaggregated serving

In state-of-the-art serving topologies, prefill (compute-bound) and decode (memory-bound) phases are isolated on separate node pools. To prevent latency bubbles, TPU Sync bridges this gap with a highly optimized, three-step pipeline:

  1. Direct-DMA offloading: Once a prefill node processes an initial prompt, TPU Sync immediately moves the resulting KV blocks into pinned host RAM via its asynchronous D2H DMA path.

  2. Host-to-host streaming: The TPU Sync controller then orchestrates a high-bandwidth Host-to-Host (H2H) transfer, streaming the context directly to the assigned decode node.

  3. Overlapped ingestion: As blocks arrive in the decode node's host RAM, TPU Sync triggers an asynchronous H2D transfer directly into TPU HBM. This happens concurrently with active decoding computation, substantially minimizing TTFT.

Host-powered prefix caching

For highly concurrent systems sharing large system prompts or running multi-turn agentic loops, TPU HBM is not large enough to hold multiple active cache blocks. TPU Sync extends the prefix cache out of HBM (Tier 1) into substantial, distributed host RAM pools (Tier 2). Because TPU Sync transfers are asynchronous, it overlaps the PCIe DMA loading of the next required prefix from host RAM with the compute of the current request — minimizing TPU idle time between requests.

For workloads that exceed even host DRAM capacity, TPU Sync also includes an experimental POSIX storage backend (Tier 3+) that asynchronously spills older KV blocks to local SSDs or shared Google Cloud Managed Lustre storage — pairing with llm-d prefix-affinity routing on GKE so replicas can recall cached prefixes across tiers without recomputing prompts.

Sample performance results

P/D disaggregated inference result highlights: 

2-pd performance

Prefix caching result highlights: 

3-prefix performance

Please see the note1 below on the testing configuration. 

Ecosystem adoption and partnerships

TPU Sync serves as the open, composable memory substrate across our PyTorch-on-TPU and Kubernetes serving ecosystem, built in close collaboration with key open-source maintainers and infrastructure partners:

Get started 

TPU Sync is available today as open source with Python wheels for both PyTorch (tpu-sync-torch) and JAX (tpu-sync-jax), and is integrated with vLLM-TorchTPU, SGLang-TorchTPU, and llm-d on GKE. Visit the GitHub repository to explore the architecture docs, C++ and Python APIs, and deployment guides.

We are committed to working with the open-source community to advance the model-state layer on TPU — supporting new frontier architectures, expanded storage tiering, and longer-horizon agentic and RL workloads. For more up-to-date performance results, please see our ongoing efforts on public benchmarks (InferenceX).


1. Performance results are based on internal testing conducted in July 2026 on TPU v7x (2x2x1 topology), configured with PCIe Gen5 (x16) per TPU chip and one or two 200 Gbps NICs enabled per host, running tpu-inference v0.24.0 (using JAX 0.10.2 and libtpu 0.0.42.1). Metrics presented represent average and median performance improvements observed under controlled laboratory conditions. Actual real-world performance, cache hit rates, and latency reductions will vary based on system configuration, network bandwidth, concurrent traffic, and specific user workload patterns.

Originally published by Google Cloud Blog ↗ · rebuilt here from its own full-text RSS feed · all rights remain with the publisher, please read and support them there.