Learning to Shard: RL for Co-optimizing the Parallelism Degrees and Per-operator Sharding Dimensions in Distributed LLM Inference

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Yin, Ruokai, Mishra, Sattwik Deb, Zuo, Xuan, Tann, Hokchhay, Shah, Preyas, Guha, Apala
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914014347395072
author Yin, Ruokai
Mishra, Sattwik Deb
Zuo, Xuan
Tann, Hokchhay
Shah, Preyas
Guha, Apala
author_facet Yin, Ruokai
Mishra, Sattwik Deb
Zuo, Xuan
Tann, Hokchhay
Shah, Preyas
Guha, Apala
contents Distributed LLM inference requires careful coordination of parallelization strategies across hundreds to thousands of NPUs to meet production SLOs. Current systems like Megatron-LM rely on static heuristics that separately configure parallelism degrees and per-operator sharding dimensions, leaving significant performance on the table as models scale and hardware topologies diversify. We introduce Learn to Shard, to our knowledge, the first RL-based approach to co-optimize both coarse-grained parallelism degrees and fine-grained per-operator sharding dimensions for distributed LLM inference. Our method employs an attention-based policy over an elite history that learns from high-performing strategies to efficiently navigate the vast combinatorial search space. Evaluated on H100 clusters with MoE models up to 1.6T parameters, Learn to Shard achieves up to 3.5x throughput improvement over metaheuristic baselines and 1.06x over Megatron heuristics.
format Preprint
id arxiv_https___arxiv_org_abs_2509_00217
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Learning to Shard: RL for Co-optimizing the Parallelism Degrees and Per-operator Sharding Dimensions in Distributed LLM Inference
Yin, Ruokai
Mishra, Sattwik Deb
Zuo, Xuan
Tann, Hokchhay
Shah, Preyas
Guha, Apala
Machine Learning
Distributed, Parallel, and Cluster Computing
Distributed LLM inference requires careful coordination of parallelization strategies across hundreds to thousands of NPUs to meet production SLOs. Current systems like Megatron-LM rely on static heuristics that separately configure parallelism degrees and per-operator sharding dimensions, leaving significant performance on the table as models scale and hardware topologies diversify. We introduce Learn to Shard, to our knowledge, the first RL-based approach to co-optimize both coarse-grained parallelism degrees and fine-grained per-operator sharding dimensions for distributed LLM inference. Our method employs an attention-based policy over an elite history that learns from high-performing strategies to efficiently navigate the vast combinatorial search space. Evaluated on H100 clusters with MoE models up to 1.6T parameters, Learn to Shard achieves up to 3.5x throughput improvement over metaheuristic baselines and 1.06x over Megatron heuristics.
title Learning to Shard: RL for Co-optimizing the Parallelism Degrees and Per-operator Sharding Dimensions in Distributed LLM Inference
topic Machine Learning
Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2509.00217