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

Unable to load the tokenizer for the collapsed version #2

Open
Rishik00 opened this issue Jan 27, 2025 · 0 comments
Open

Unable to load the tokenizer for the collapsed version #2

Rishik00 opened this issue Jan 27, 2025 · 0 comments

Comments

@Rishik00
Copy link

Dear authors,

Thank you for open-sourcing such amazing work. I wanted to use the collapsed model for a task but am encountering the following error:

# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("cfilt/HiNER-collapsed-xlm-roberta-large")
model = AutoModelForTokenClassification.from_pretrained("cfilt/HiNER-collapsed-xlm-roberta-large")

Error:

OSError: Can't load tokenizer for 'cfilt/HiNER-collapsed-xlm-roberta-large'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'cfilt/HiNER-collapsed-xlm-roberta-large' is the correct path to a directory containing all relevant files for a XLMRobertaTokenizerFast tokenizer.

When I checked the files for the collapsed version and compared them with the original, the tokenizer.json and tokenizer_config.json files are missing in the former.

Are we supposed to load the tokenizer from the original model for the collapsed one? Please let me know at the earliest.
Thank you for your time!

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