Again the similar error

#1
by raxtemur - opened
  File "/home/jovyan/.cache/huggingface/modules/transformers_modules/Lexius/Phi-3.5-vision-instruct/88fa59eca4f9b856a9d9ef58b14b32d2d80b0973/modeling_phi3_v.py", line 1417, in forward
    past_key_values_length = past_key_values.get_usable_length(seq_length)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DynamicCache' object has no attribute 'get_usable_length'. Did you mean: 'get_seq_length'?
  File "/home/jovyan/.cache/huggingface/modules/transformers_modules/Lexius/Phi-3.5-vision-instruct/88fa59eca4f9b856a9d9ef58b14b32d2d80b0973/modeling_phi3_v.py", line 786, in forward
    kv_seq_len += past_key_value.get_usable_length(kv_seq_len, self.layer_idx)
  File "/home/jovyan/.cache/huggingface/modules/transformers_modules/Lexius/Phi-3.5-vision-instruct/88fa59eca4f9b856a9d9ef58b14b32d2d80b0973/modeling_phi3_v.py", line 1660, in prepare_inputs_for_generation
    past_length = past_key_values.seen_tokens
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DynamicCache' object has no attribute 'seen_tokens'
Owner

Sorry for the delay, I somehow didn't get any notification about this issue...

These are different errors. The original error was DynamicCache' object has no attribute 'get_max_length'

The new errors are:

  • AttributeError: 'DynamicCache' object has no attribute 'get_usable_length'. Did you mean: 'get_seq_length'?
  • AttributeError: 'DynamicCache' object has no attribute 'seen_tokens'

I'll fix it... thanks for reporting.

have these new errors like 'seen_tokens' been fixed?

Sign up or log in to comment