Skip to content
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

Known Issue: Transformers 4.35+ Serialization Issues #786

Closed
hannanjgaws opened this issue Nov 9, 2023 · 3 comments
Closed

Known Issue: Transformers 4.35+ Serialization Issues #786

hannanjgaws opened this issue Nov 9, 2023 · 3 comments
Labels
transformers-neuronx transformers-neuronx decoder-only LLM inference

Comments

@hannanjgaws
Copy link
Contributor

In versions of transformers>=4.35 model.save_pretrained serializes models as safetensors instead of pytorch_model.bin files by default. This change breaks the PretrainedModel.from_pretrained and save_pretrained_split methods in transformers-neuronx, since they expect a pytorch_model.bin file.

This issue can be avoided by using an older transformers version:

pip install "transformers<4.35.0"

This limitation will be addressed in a future Neuron release.

@hannanjgaws hannanjgaws added the transformers-neuronx transformers-neuronx decoder-only LLM inference label Nov 9, 2023
@ernesttam
Copy link

Yes, I also bumped into this problem.

@dennj
Copy link

dennj commented Nov 27, 2023

Hello, I made a pull request for a CR to add support for safetensors in from_pretrained().
With this change I am able to use the last version of Huggingface transformers.

aws-neuron/transformers-neuronx#62

@mrnikwaws
Copy link
Contributor

Safe tensor loads are now fully supported in transformer_neuronx - closing. Please re-open if there are further issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transformers-neuronx transformers-neuronx decoder-only LLM inference
Projects
None yet
Development

No branches or pull requests

4 participants