Skip to content

Commit b0edb38

Browse files
committed
debug
Signed-off-by: Ye Yu <[email protected]>
1 parent 5c4c8a0 commit b0edb38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modelopt/torch/speculative/plugins/megatron_eagle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,8 @@ def _eagle_forward(
945945
)
946946

947947
# Update inference_context.sequence_len_offset after each call of eagle_module
948-
inference_context.sequence_len_offset += eagle_inputs["input_ids"].shape[1]
948+
if inference_context is not None:
949+
inference_context.sequence_len_offset += eagle_inputs["input_ids"].shape[1]
949950

950951
if hasattr(self.eagle_module, "eagle_output_layer"):
951952
eagle_logits, _ = self.eagle_module.eagle_output_layer(eagle_hidden_states)

0 commit comments

Comments
 (0)