Daemontatox commited on
Commit
54267c0
·
verified ·
1 Parent(s): 9558325

Update modeling_deepseek.py

Browse files
Files changed (1) hide show
  1. modeling_deepseek.py +1 -1
modeling_deepseek.py CHANGED
@@ -1653,7 +1653,7 @@ class DeepseekV3ForCausalLM(DeepseekV3PreTrainedModel):
1653
  if isinstance(past_key_values, Cache):
1654
  cache_length = past_key_values.get_seq_length()
1655
  past_length = past_key_values.seen_tokens
1656
- max_cache_length = past_key_values.get_max_length()
1657
  else:
1658
  cache_length = past_length = past_key_values[0][0].shape[2]
1659
  max_cache_length = None
 
1653
  if isinstance(past_key_values, Cache):
1654
  cache_length = past_key_values.get_seq_length()
1655
  past_length = past_key_values.seen_tokens
1656
+ max_cache_length = past_key_values.get_seq_length()
1657
  else:
1658
  cache_length = past_length = past_key_values[0][0].shape[2]
1659
  max_cache_length = None