Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
pingzhili committed Nov 24, 2024
1 parent 9e5e6e9 commit b75aa65
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions collect-deepseek-predictor-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def _custom_ffn_forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
for name, module in model.named_modules():
if type(module).__name__ == 'DeepSeekMoE':
block_ffn_input_output_pair[name] = []
module._original_forward = module.forward
module._module_name = name
module.forward = _custom_ffn_forward.__get__(module, type(module))

Expand Down

0 comments on commit b75aa65

Please sign in to comment.