Menu

1 / 13

Hugging Face on TPU: Transformers v5, MoE Kernels and Diffusers

DEV Community: pytorch·Omotayo Aina·5 days ago
#CU0pec9k
#devtopytorch#devto#dev#torchtpusprint#model
Long article (6717 words) — no AI summary yet.
Reading 0:00
15s threshold

device_map="tpu" gets you running. StaticCache, a Kernels Hub MoE kernel and TensorParallelConfig get you fast, and this post shows why each one changes the numbers.

Series: A five-part, hands-on series for PyTorch engineers moving real workloads onto Cloud TPU v6e (Trillium) and v7x (Ironwood) with TorchTPU. Part 1 builds the mental model (execution modes, memory, profiling, kernels). Part 2 runs Hugging Face Transformers v5 and Diffusers natively. Part 3 serves models in production with vLLM-TorchTPU, SGLang-TorchTPU and llm-d. Part 4 trains and post-trains at pod scale with TorchTitan, Ray and GRPO. Part 5 hands the whole workflow to the TPU Agent Suite.

This is Part 2. Previous: Part 1: TorchTPU Performance: Execution Modes, XProf and Pallas Kernels .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.