Since `transformers` v4.56.0` the dictionary `ALL_STATIC_CACHE_IMPLEMENTATIONS` replaced `NEED_SETUP_CACHE_CLASSES_MAPPING`
#9
by
blewis-hir
- opened
This should fix using the model with new transformers versions
blewis-hir
changed pull request title from
Since `transformers` v4.56.0` the dictionary `ALL_STATIC_CACHE_IMPLEMENTATIONS` replaced the existing dictionary
to Since `transformers` v4.56.0` the dictionary `ALL_STATIC_CACHE_IMPLEMENTATIONS` replaced `NEED_SETUP_CACHE_CLASSES_MAPPING`
Hmm is this really enough? I had to change a few lines in variable_cache.py too for the latest transformers. https://huggingface.co/nvidia/Llama-3_3-Nemotron-Super-49B-v1_5/discussions/12
I checked your code and it has a few syntax errors/typos and ALL_STATIC_CACHE_IMPLEMENTATIONS is a tuple of str so there is no way this could work:
https://github.com/huggingface/transformers/blob/v4.57.3/src/transformers/generation/configuration_utils.py#L46