> ## Content Index
> Fetch the complete content index at: https://www.stirup.si/llms.txt
> Use this file to discover other available public pages before exploring further.

# Optimizing 0.6B Dense Models on TPU v7 with vLLM and Cross-Stack Co-Design
- URL: https://www.stirup.si/optimizing-0-6b-dense-models-on-tpu-v7-with-vllm-and-cross-stack-co-de-8ccdea5b/
- Published: 2026-11-17T03:14:08.000Z
- Updated: 2026-11-17T03:14:08.000Z
- Description: Optimizing 0.6B dense models on TPU v7 involves co-designing across vLLM, Tunix, MaxText, and Pallas, achieving 183K tokens/s with specific configurations and reduced system overheads.
- Author: Satish Das
- Tags: Self-hosting, News, Stirup Research

## Optimization of 0.6B Dense Models on TPU v7

Optimizing 0.6B dense models on Google Cloud TPU v7 involves co-designing across the open-source TPU stack, including vLLM, Tunix, MaxText, and Pallas. According to [vLLM Engineering](https://vllm.ai/blog/2026-11-12-rl-small-dense-tpu-v7?ref=stirup.si), developers can achieve a 56-second (\~183K tokens/s) path using the merged tpu-recipes recipe and specific flags listed in Appendix B, without repeating prior bring-up work. A 0.6B dense student model distilled from stronger teachers can serve with lower latency and cost, enabling broader traffic coverage and more RL experiments per day, as noted in [vLLM Engineering](https://vllm.ai/blog/2026-11-12-rl-small-dense-tpu-v7?ref=stirup.si). In [vLLM Engineering](https://vllm.ai/blog/2026-11-12-rl-small-dense-tpu-v7?ref=stirup.si), the true-8K reference workload was executed on a 64-chip Google Cloud TPU v7 (4×4×4) slice using TP1×DP128 rollout parallelism, with 128 independent vLLM engines, each holding the full 0.6B model and all eight KV heads.

## Benchmarking and System Design for Generative Ranking

In the benchmarking and system design for generative ranking, researchers at Meta have developed an open, reproducible proxy using Qwen3-0.6B on public math reasoning prompts to simulate proprietary Ads ranking and generative recommendation systems. This approach mirrors the production systems' geometry, where a compact sub-billion-parameter dense policy generates long multi-step reasoning traces, reaching up to 8,192 tokens across thousands of concurrent candidates. Decode throughput, measured in tokens per second, counts only generated (completion) tokens and is aggregated over the entire 64-chip TPU v7 slice. The methodology and dataset are detailed in the benchmarking framework, ensuring transparency and enabling further research in optimizing dense models on TPU v7 using vLLM.

## Performance Bottlenecks and System Overheads

Performance bottlenecks in optimizing 0.6B dense models on TPU v7 via vLLM are not primarily tied to model FLOPs, but rather to system overheads. As noted, fixed overheads such as host dispatch, synchronization, and KV-cache lifecycle management become more significant when compared to larger models like frontier dense or MoE variants. Profiling data highlights that device execution on TPU v7 occurs in milliseconds per decode step, but end-to-end rollout time is dominated by host-device dispatch round trips, XLA compilation and runner overheads on the Flax NNX path, and Pallas kernel pipeline stalls over 24K-token contexts. These findings suggest that while computational efficiency is important, reducing coordination overheads and optimizing the host-side execution pipeline are critical for achieving high performance in this specific model and hardware configuration.

## Phase II Cross-Stack Decode Co-Design

Phase II of the cross-stack decode co-design focused on optimizing the inference pipeline for 0.6B dense models on TPU v7 using vLLM. This phase involved integrating changes across multiple layers, from MaxText and vLLM down to XLA and Pallas. By aligning execution paths through MaxText → Tunix → vLLM/tpu-inference (Runner & Scheduler) → Ragged Paged Attention (RPA v3)/Pallas → Pathways/XLA, the team achieved a significant increase in steady-state decode throughput. This optimization raised performance from approximately 30K tokens/s to 130.5K tokens/s, representing a 4.35x improvement. Additionally, full-step latency was reduced from 616 seconds to 299 seconds in controlled tests. The phase also addressed the challenge of compiling multi-step device decode loops across Flax NNX, vLLM, and XLA, highlighting the inefficiency of re-entering the Python host scheduler on every token for large models.

## Code and Configuration Improvements for TPU v7

In the section on code and configuration improvements for TPU v7, developers addressed several critical issues to enhance the performance of 0.6B dense models during inference. Fixes included repairing the `continue_decode` function on the flax\_nnx serving path, preventing the runtime from dropping XLA compile options (tpu-inference #3374), and eliminating mutable metadata state leaks across compiled linear layers (tpu-inference #3101). Additional improvements involved stopping the vLLM runner from over-padding steps past `max_num_batched_tokens` (tpu-inference #3466) and capping per-step request-ID trace serialization overhead at 2,048 concurrent rollouts (tpu-inference #3510).

Despite these improvements, the default heuristic for key-value (KV) cache management coupled the KV fetch block size and compute block size to a single monolithic value (\~16K tokens) ([vLLM Engineering](https://vllm.ai/blog/2026-11-12-rl-small-dense-tpu-v7?ref=stirup.si)). This approach involved a trade-off: checking every step introduced on-device sync overhead, while checking every 32 steps delayed returning to the vLLM host scheduler to evict finished sequences and free batch slots ([vLLM Engineering](https://vllm.ai/blog/2026-11-12-rl-small-dense-tpu-v7?ref=stirup.si)).

## Sources and reporting notes

- [vLLM Engineering](https://vllm.ai/blog/2026-11-12-rl-small-dense-tpu-v7?ref=stirup.si)

Based on published source material. No independent hands-on testing is claimed.