For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Python class
EplbStatsMetadata
EplbStatsMetadata
class max.pipelines.lib.eplb_stats.EplbStatsMetadata(num_layers, num_moe_layers, moe_layer_indices, num_logical_experts, num_experts_per_token)
Bases: object
Static metadata describing the shape and semantics of a snapshot.
-
Parameters:
from_dict()
classmethod from_dict(data)
Constructs an instance from a dict produced by to_dict.
Tolerates legacy snapshots that only had num_moe_layers (which then
meant the row count): those map to num_layers with every row treated
as MoE.
-
Parameters:
-
Return type:
moe_layer_indices
Histogram row indices that correspond to MoE layers (row i == layer i).
num_experts_per_token
num_experts_per_token: int
Top-k experts selected per token.
num_layers
num_layers: int
Total transformer layers profiled. Equals the histogram row count.
num_logical_experts
num_logical_experts: int
Number of logical experts per layer.
num_moe_layers
num_moe_layers: int
Count of true MoE (routing) layers. Dense layers are all-zero rows.
to_dict()
to_dict()
Returns a JSON-safe dict representation.