Update modeling_deepseek.py
#4
by
Daemontatox
- opened
- 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.
|
| 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
|