[Model Runner V2] batch-sharded sample (#50465)

Signed-off-by: Giancarlo Delfin <gdelfin@inferact.ai>
This commit is contained in:
Giancarlo Delfin
2026-08-24 15:49:57 -07:00
committed by GitHub
parent 0d7d5ed0b2
commit d154d90d6c
19 changed files with 1781 additions and 22 deletions
+7
View File
@@ -164,6 +164,13 @@ class ParallelConfig:
"""Whether the deployed model is MoE (if known)."""
enable_expert_parallel: bool = False
"""Use expert parallelism instead of tensor parallelism for MoE layers."""
enable_batch_sharded_sampling: bool | None = None
"""Use sharded sampling across tensor parallel ranks. Each rank samples
a slice of the batch instead of every rank sampling all of it. Currently
defaults to False if not set. Enabling it explicitly raises when the config
cannot support it (`tensor_parallel_size` must be > 1, `max_num_seqs` at
least `tensor_parallel_size`, and `max_logprobs` non-negative). Models opt in
by implementing `compute_logits_local`."""
enable_ep_weight_filter: bool = False
"""Skip non-local expert weights during model loading when expert
parallelism is active. Each rank only reads its own expert shard from