Optimization#
Explore techniques for maximizing performance, including model customization, sharding strategies, Pallas kernels, and benchmarking.
๐ ๏ธ Customizing Model Configs
Optimize and customize your LLM model configurations for higher performance (MFU) on TPUs.
๐ฅ Sharding Strategies
Choose efficient sharding strategies (FSDP, TP, EP, PP) using Roofline Analysis and understand arithmetic intensity.
โก Pallas Kernels
Optimize with Pallas kernels for fine-grained control.
๐ Benchmarking & Tuning
Guide to setting up benchmarks, performing performance tuning, and analyzing metrics.
๐ FSDP Weight Prefetching
Overlap the FSDP all-gather of the next layerโs weights with the current layerโs compute.
๐ Shard Mode: explicit vs auto
Measured HLO and xprof comparison of shard_mode: explicit against shard_mode: auto on the onboarded models.