Cannot import name 'MISTRAL_INPUTS_DOCSTRING' from 'transformers.models.mistral.modeling_mistral'

#43
by deleted - opened
deleted

I ran the code to use this model using Sentence Transformers :
model = SentenceTransformer("nvidia/NV-Embed-v2", trust_remote_code=True)

I encountered the error in the process - ImportError: cannot import name 'MISTRAL_INPUTS_DOCSTRING' from 'transformers.models.mistral.modeling_mistral'
I tried upgrading transformers and reinstalling sentence-transformers but to no avail. Please help me resolve this issue.

Same issue

Can anyone please help me with resolving this issue ?

same problem

pip reinstall transformer resolved this case.

@yixin Are you sure ? I feel that the dependencies listed in the model page are not up-to-date (versions are old). Maybe this is causing the above issue.

pip install transformers==4.49

It will fix it hopefully, for others as well.

Sign up or log in to comment