error: DynamicCache' object has no attribute 'get_max_length'. Did you mean: 'get_seq_length'?

#5
by maltoseflower - opened

i use transformers==4.51.3

error:
File "/transformers_modules/openbmb/MiniCPM-2B-dpo-fp16/e9b63f4814c484097d88878dfde4769b2b784b87/modeling_minicpm.py", line 1249, in prepare_inputs_for_generation
max_cache_length = past_key_values.get_max_length()

DynamicCache' object has no attribute 'get_max_length'. Did you mean: 'get_seq_length'?

u guys can fix it?

Sign up or log in to comment