-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://huggingface.co/hf-internal-testing tiny random models need to be converted to safetensors #37296
Comments
Hi! I will update those repositories in transformers/tests/deepspeed/test_model_zoo.py so they have safetensors files. |
I updated 22 repositories in For example: https://huggingface.co/hf-internal-testing/tiny-random-t5-v1.1/tree/main Those repositories contained files with old format that I couldn't detect what their architecture were, and I only load them with |
Thank you very much, @ydshieh - that's great! besides deepspeed tests I'd imagine many other transformers tests are impacted by this as well |
Yeah True. At some point, I made a script to create tiny model for pipeline testing in a more systematic way , and most of them contain safetensors https://huggingface.co/hf-internal-testing/tiny-random-Gemma3ForConditionalGeneration/tree/main Some earlier ones don't have safetensor, like https://huggingface.co/hf-internal-testing/tiny-random-BertModel/tree/main I will find the time to update the scripts, push safetensors, and use them to replace (at least some) tests that are still using the legacy repository that are not really maintained by me. |
Thanks a lot, @ydshieh! |
The problem is that many transformers CI tests rely on these tiny models and they are mostly
pytorch_model.bin
format, e.g. see: https://huggingface.co/hf-internal-testing/tiny-random-T5Model/tree/mainBut
modeling_utils
has massively changed recently and uses a different code pass forsafetensor
model files - and most modern models use that.Which means transformers CI isn't testing the code properly.
For example a recent Deepspeed integration was broken because the tests use https://huggingface.co/patrickvonplaten/t5-tiny-random/tree/main but the code was doing something different for
pytorch_model.bin
files and thus a massive breakage introduced in #36963 was missed. I looked at replacing it with https://huggingface.co/patrickvonplaten/t5-tiny-random/tree/main but it has the same issue - doesn't have a .safetensor file.You can see why the massive testing model update is needed if we want the tests to actually test:
transformers/tests/deepspeed/test_model_zoo.py
Lines 56 to 90 in 0ef339f
cc: @ydshieh, @LysandreJik
The text was updated successfully, but these errors were encountered: