-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
AttributeError: 'BertModel' object has no attribute 'attn_implementation' #30965
Comments
Hi @pinnareet, thanks for raising this issue! From the linked colab, it looks the error is coming from the bertopic library and the model implementation there. I'd suggest opening an issue in the repo |
@amyeroberts, same problem here with only using Transformers (4.41.0)
I'm using Bert with Torch version 2.2.1 |
@aymenkrifa Could you share how the model is created and your running env (The running environment: run |
Also had this issue when tried to load model using Not sure if downgrading |
@b5y Thanks for sharing! It seems this might be a compatibility issue then between transformers and sentence transformers cc @tomaarsen |
@amyeroberts I don't think there is any compability issue here. The error itself came from UPDATE: it was fine for more than 1 month, just came out recently on Wednesday. |
@b5y Could you share a code snippet which reproduces this and full error traceback? |
We see the same issue with
|
@GeorgWa Could you share a reproducible code snippet? From the traceback, it looks like a non-transformers config file is being used (we don't have a |
Yes, will do |
Sorry for the confusion, it looks like adding I would expect Thank you!
|
@GeorgWa It's assumed the config passed to the transformers model is a child of PretrainedConfig. When this config is created (either directly or through AutoModel calls) then the private attribute |
I got the same error when working in Databricks for model serving, the code works well locally, but when create a endpoint, I got this error:
The same code I deployed a few weeks ago, it worked fine. I tried to downgrade transformers version, it did not work. any tips? Thanks! |
Hi @liqi6811, could you a reproducible code snippet? In particular, one which can run locally but fails when deploying on databricks? |
@amyeroberts I worked it out by specifying transformers and sentence-transformers version when log model.
|
@liqi6811 Thanks for clarifying cc @tomaarsen re sentence-transformers <-> transformers compatibility |
Experiencing the same issue with transformers==4.40.2 and sentence_transformers==3.0.1. Anyone figure out a workaround? EDIT: Looks like upgrading to transformers==4.41.2 solved the issue for me. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
I solved on my end when I downgrade transformers from
|
Hi, I'm still having this issue without using SentenceTransformer. Would love to re-activate it. Thanks |
System Info
Google Colaboratory
transformers
version: 4.41.0Who can help?
No response
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
https://colab.research.google.com/drive/1ncTM6lk6ZOfnwSFr_jaXL2zwwvWA-JRj?usp=sharing
Expected behavior
It is not supposed to have an error.
The text was updated successfully, but these errors were encountered: