Transformers v5 compatibility

#14
by hmellor HF Staff - opened
  • HybridCache has been replaced with StaticCache
  • HybridCache has been removed in Transformers v5
  • The import is unused anyway

Please consider updating any other models you have which use this deprecated import

Thanks for this change and suggestion @hmellor , the unused imports including HybridCache have been removed in #15 . I'm closing this PR since it now cannot be merged due to conflicts.

Also note that this change alone to remove unused imports did not get the model to work correctly in transformers 5.0.0. (It did run without error 5.0.0 following this change, However the resulting embeddings are incorrect, this is also the case for transformers versions 4.48 and above too.)

I've made some changes in #16 that will extend support for this model from only 4.47.1 (noted in README currently) to support all versions from 4.44 and above (including the new 5.0.0 release)

nvidia-oliver-holworthy changed pull request status to closed

Thanks for the detailed explanation!

I made a similar PR on https://huggingface.co/nvidia/llama-nemotron-rerank-1b-v2/discussions/10 which removes this bad import too. It sounds like it might not be sufficient though

Sign up or log in to comment