ImportError: cannot import name 'ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST' from 'transformers.models.roberta.modeling_roberta'
Hello Hugging Face Community,
I’m encountering an error while working with the following models: monotransquest-da-multilingual
, monotransquest-da-en_any
, and monotransquest-da-any_en
from TransQuest.
Here’s the full error message:
ImportError: cannot import name 'ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST' from 'transformers.models.roberta.modeling_roberta'
The transformers library I am using doesn't have the ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST constant in the expected location. This could be due to an Outdated or incompatible transformers library. Can you help to fix this issue?
Steps Taken:
- I’ve already tried upgrading/downgrading the
transformers
library.
Here’s my setup:
- Environment: Google Colab Pro+
- Python version: 3.10
- GPU: A100 GPU
- Library versions:
- transformers: 4.44.2
- torch: 2.4.0+cu121
- I installed TransQuest using !git clone https://github.com/TharinduDR/TransQuest.git
Hello,
I fell into the same issue, and I found that the last version of transformers that contains ROBERTA_PRETRAINED_MODEL_ARCHIVE_LIST is 4.40.2 for now, and it works for me.
You can try with this version.