Skip to content

Commit

Permalink
fix: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
duterscmy committed Dec 12, 2024
1 parent 84dbe01 commit f371740
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cd-moe/modeling_deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def forward(
if past_key_value is not None:
# print(self.layer_idx)
cache_kwargs = {"sin": sin, "cos": cos} # Specific to RoPE models
cache_idx = self.layer_idx + 1 if self.layer_idx > 0 else 0
cache_idx = self.layer_idx if self.layer_idx > 0 else 0
key_states, value_states = past_key_value.update(
key_states, value_states, cache_idx, cache_kwargs)

Expand Down

0 comments on commit f371740

Please sign in to comment.