Trying demo.py with hpt-edge-1-5 model I get the following error:
File "/opt/anaconda/envs/kosmos/lib/python3.11/site-packages/transformers/generation/utils.py", line 1322, in _get_initial_cache_position
past_length = model_kwargs["past_key_values"][0][0].shape[2]
TypeError: 'NoneType' object is not subscriptable
With some debugging it appears to be caused by "use_cache" being True in the huggingface function mentioned in the error even though it's False in the model config. The model seems to run correctly if I force it to False (by overwriting the function).
Trying demo.py with hpt-edge-1-5 model I get the following error:
File "/opt/anaconda/envs/kosmos/lib/python3.11/site-packages/transformers/generation/utils.py", line 1322, in _get_initial_cache_position past_length = model_kwargs["past_key_values"][0][0].shape[2]