Replaced get_max_length with get_max_cache_shape
Browse filesget_max_length has been deprecated, and get_max_cache_shape should be used instead
- modeling_hymba.py +1 -1
modeling_hymba.py
CHANGED
@@ -2573,7 +2573,7 @@ class HymbaForCausalLM(HymbaPreTrainedModel):
|
|
2573 |
if isinstance(past_key_values, Cache):
|
2574 |
cache_length = past_key_values.get_seq_length()
|
2575 |
past_length = past_key_values.seen_tokens
|
2576 |
-
max_cache_length = past_key_values.
|
2577 |
|
2578 |
past_length = cache_length
|
2579 |
|
|
|
2573 |
if isinstance(past_key_values, Cache):
|
2574 |
cache_length = past_key_values.get_seq_length()
|
2575 |
past_length = past_key_values.seen_tokens
|
2576 |
+
max_cache_length = past_key_values.get_max_cache_shape()
|
2577 |
|
2578 |
past_length = cache_length
|
2579 |
|