We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c4c8a0 commit b0edb38Copy full SHA for b0edb38
modelopt/torch/speculative/plugins/megatron_eagle.py
@@ -945,7 +945,8 @@ def _eagle_forward(
945
)
946
947
# Update inference_context.sequence_len_offset after each call of eagle_module
948
- inference_context.sequence_len_offset += eagle_inputs["input_ids"].shape[1]
+ if inference_context is not None:
949
+ inference_context.sequence_len_offset += eagle_inputs["input_ids"].shape[1]
950
951
if hasattr(self.eagle_module, "eagle_output_layer"):
952
eagle_logits, _ = self.eagle_module.eagle_output_layer(eagle_hidden_states)
0 commit comments