Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dev.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
85bced0ae6ab46f61a0fd774074a3273daf6ae02
cf081d5df0b34b665d214ff936f27489d7396876
4 changes: 2 additions & 2 deletions src/megatron/bridge/models/gemma/gemma4_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ def __init__(self, config, **kwargs):
torch.ones(config.hidden_size, dtype=config.params_dtype),
)

def routing(self, logits, padding_mask=None):
def routing(self, logits, padding_mask=None, input_ids=None):
"""Apply standard routing, then renormalize and scale by per_expert_scale."""
routing_probs, routing_map = super().routing(logits, padding_mask=padding_mask)
routing_probs, routing_map = super().routing(logits, padding_mask=padding_mask, input_ids=input_ids)
# routing_probs: [num_tokens, num_experts] sparse — non-zero at selected experts
# routing_map: [num_tokens, num_experts] boolean mask
#
Expand Down
Loading