-
Notifications
You must be signed in to change notification settings - Fork 55
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
Error when initializing from the transformers pipeline #25
Comments
I have the same issue when calling the tokenizer. It seems like the AutoTokenizer is reading the path to the tokenizer as empty. THis problem persists even when I download the model. |
Thank you for raising the issue. Unfortunately, I was not able to reproduce the error with >>> from transformers import pipeline
>>> sentiment_analyzer = pipeline(
... "sentiment-analysis", model="cl-tohoku/bert-base-japanese", tokenizer="cl-tohoku/bert-base-japanese")
Downloading: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 445M/445M [00:40<00:00, 11.1MB/s]
Some weights of the model checkpoint at cl-tohoku/bert-base-japanese were not used when initializing BertForSequenceClassification: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias']
- This IS expected if you are initializing BertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of BertForSequenceClassification were not initialized from the model checkpoint at cl-tohoku/bert-base-japanese and are newly initialized: ['classifier.weight', 'classifier.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
>>> Is your installed $ rm -r ~/.cache/huggingface/transformers Thank you. |
Hello thank you for your reply. I did update my package to version 4.3.3 and cleared the cache but I am still getting the same error:
|
Yes! I followed your suggestion, but I still get the same error. |
Is your installed |
Hello, thank you for your help! The tokenizer package was up to date (0.10.1). the the |
Now I'm able to reproduce the error. It seems that the error is raised if I will make a PR to the
Thanks! |
Hello,
I get an error when trying to initialize models that rely on your tokenizer from the transformers package's pipeline. Here is code that yields the error as well as the traceback.
The text was updated successfully, but these errors were encountered: