Closed sleepingcat4 closed 1 week ago
I added a note on readme as well
Thanks a lot for the PR! We've also just now noticed some errors with colab, see #3. To my understanding,
numpy < 2.x
. This raises an issue when importing transformers. Uninstalling tensorflow fixes the issue.Regarding your PR, this repository uses poetry for dependency management. We also don't want to add tensorflow as a dependency, as we are not using it. kvpress==0.0.1 package installs numpy==2.1.3
, I don't think downgrading to numpy==2.1.0
would fix the colab issues observed above.
I'm currently working on a colab-specific notebook PR that fixes those issues, it should be ready this week. So stay tuned!
@maxjeblick umm, I didn't get the error from KVPress tho. the error was from transformers library itself. the line quoted earlier was depending on tensorflow's August release and the October version is breaking it.
KVPress does not need to change numpy's np.bool to bool but that's different from the error I received.
also without the latest version of transformers, KVPress won't even work since Metallama classes aren't available in them.
so, I'm not sure how it can be a Colab specific issue rather it's a transformers issue.
@sleepingcat4 we just merged a #6 which adds colab notebook examples. It uninstalls tensorflow, install kvpress and ask the user to restart the notebook if needed. Hopefully the issue will be fixed soon by colab team. Thanks for your contribution !
I tried installing the library and running some experiments on Google colab. Unfortunately, it was breaking due to recent tensorflow changes and numpy changes. HF did not account them before pushing latest transformers version and older is not compatible with this library since meta-llama class failed error happens with them.
A fast-patch for this will be downgrading tensorflow and numpy versions slightly. It's not a KVPress specific error as it is happening due to transformers library. Particularly for this line:
I have added a requirements.txt file in the main-dir so that others don't face this error. I will also open an issue on HF as well.
Collab I experimented with: https://colab.research.google.com/drive/1482Nc7IfE-s5sl7dBjEbWfOjz59QFA1l?usp=sharing