MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / ep_experts

Method ep_experts

tensorrt_llm/mapping.py:364–369  ·  view source on GitHub ↗
(self, num_experts: int)

Source from the content-addressed store, hash-verified

362 return rem + (layer_idx - cutoff) // base
363
364 def ep_experts(self, num_experts: int) -> List[int]:
365 assert self.cp_size == 1
366 experts_per_rank = num_experts // self.moe_ep_size
367 experts_range = range(self.moe_ep_rank * experts_per_rank,
368 (self.moe_ep_rank + 1) * experts_per_rank)
369 return list(experts_range)
370
371 @classmethod
372 def from_dict(cls, mapping: dict):

Callers 9

__init__Method · 0.80
from_hugging_faceMethod · 0.80
convert_layerFunction · 0.80
convert_layerFunction · 0.80
from_hugging_faceMethod · 0.80
convert_layerFunction · 0.80
convert_hf_qwenFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected