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

Cannot pickle TFAutomodels #618

Open
Killua7362 opened this issue Sep 9, 2023 · 1 comment
Open

Cannot pickle TFAutomodels #618

Killua7362 opened this issue Sep 9, 2023 · 1 comment

Comments

@Killua7362
Copy link

from transformers import TFAutoModel, AutoTokenizer   
checkpoint_name = "hf-internal-testing/tiny-random-MobileBertModel"
model = TFAutoModel.from_pretrained(checkpoint_name)

Above is the example code, it works with AutoModel from transformers. I cannot pickle TFAutoModel
Below is the error
Layer 'embeddings' expected 0 variables, but received 3 variables during loading. Expected: []

@mmckerns
Copy link
Member

I think this is an issue for transformers you may want to report it to huggingface with dill.detect.trace(True).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants