IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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).

Mojo struct

Struct_moe_sigmoid_gemv_group_limited_router_packed

struct Struct_moe_sigmoid_gemv_group_limited_router_packed

Registers the moe.sigmoid.gemv.group.limited.router.packed graph op.

Fuses the router GEMV and sigmoid into the group-limited router, which also writes each token's ids, as the weight dtype, then its weights to one [tokens, 2 * top_k] row of packed.

Implemented traitsโ€‹

AnyType, Deinitable, Movable

Methodsโ€‹

executeโ€‹

static def execute[n_routed_experts: Int, n_experts_per_tok: Int, n_groups: Int, topk_group: Int, norm_weights: Bool](expert_indices: T, expert_weights: T, packed: T, hidden: T, gate_weight: T, expert_bias: T, routed_scaling_factor: Float32, context: DeviceContext)

Was this page helpful?