mirror of
https://github.com/deepseek-ai/ESFT
synced 2025-06-26 18:15:50 +00:00
streamline code; add intermediate saving support for ep
This commit is contained in:
@@ -1721,7 +1721,7 @@ class DeepseekV2ForCausalLM(DeepseekV2PreTrainedModel):
|
||||
if isinstance(past_key_values, Cache):
|
||||
cache_length = past_key_values.get_seq_length()
|
||||
past_length = past_key_values.seen_tokens
|
||||
max_cache_length = past_key_values.get_max_length()
|
||||
max_cache_length = past_key_values.get_max_cache_shape()
|
||||
else:
|
||||
cache_length = past_length = past_key_values[0][0].shape[2]
|
||||
max_cache_length = None
|
||||
|
||||
Reference in New Issue
Block a user