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

Alternative Huggingface BERT models not recognized #111

Closed
serenalotreck opened this issue Apr 27, 2023 · 1 comment
Closed

Alternative Huggingface BERT models not recognized #111

serenalotreck opened this issue Apr 27, 2023 · 1 comment

Comments

@serenalotreck
Copy link
Contributor

serenalotreck commented Apr 27, 2023

Hi again!

I'm trying to train some models from scratch using different BERT embeddings. I've taken all of the model identifiers from https://huggingface.co/models, but when I run bash scripts/train.sh my_config, I get the following error:

OSError: Can't load config for 'alvaroalon2/biobert_chemical_ner'. Make sure that:

- 'alvaroalon2/biobert_chemical_ner' is a correct model identifier listed on 'https://huggingface.co/models'

- or 'alvaroalon2/biobert_chemical_ner' is the correct path to a directory containing a config.json file

This happens for all the models that I chose, including models from different users.

Have you run into this/do you have any idea what the issue might be? I took a look at the documentation for allennlp train, but I didn't see anything immediately informative.

EDIT: I also tried instantiating a tokenizer using these models with the huggingface API, and that works fine.

Thanks!
Serena

@serenalotreck
Copy link
Contributor Author

Closing this because I believe this was due to torch not being compiled with CUDA capabilities; I ran into this same error when using Huggingface directly and it was solved once I ran

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

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

No branches or pull requests

1 participant