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

Recent update: configuration_eurobert.py not found - #36983

Closed
4 tasks
panwpalo opened this issue Mar 26, 2025 · 1 comment
Closed
4 tasks

Recent update: configuration_eurobert.py not found - #36983

panwpalo opened this issue Mar 26, 2025 · 1 comment
Labels

Comments

@panwpalo
Copy link

panwpalo commented Mar 26, 2025

System Info

It looks like the author introduced a new bug with the new update to Huggingface. (Updates was added 3 hours prior to this post)

the recent update to the Hugging
Could not locate the configuration_eurobert.py inside

file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "python3.11/site-packages/transformers/utils/hub.py", line 517, in cached_files
raise EnvironmentError(
OSError: EuroBERT/EuroBERT-610m does not appear to have a file named ..processing_utils.py. Checkout 'https://huggingface.co/EuroBERT/EuroBERT-610m/tree/main'for available files.

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "EuroBERT/EuroBERT-210m"

tokenizer = AutoTokenizer.from_pretrained(model_id, local_only=True)
model = AutoModelForMaskedLM.from_pretrained(model_id, local_only=True)

text = "The capital of France is <|mask|>."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)

To get predictions for the mask:

masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
predicted_token_id = outputs.logits[0, masked_index].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)
print("Predicted token:", predicted_token)

Predicted token: Paris

Expected behavior

Loading the model.

@panwpalo panwpalo added the bug label Mar 26, 2025
@Rocketknight1
Copy link
Member

Hi @panwpalo, the code for EuroBERT is contained in the EuroBERT repo, not in transformers! I checked and they merged a fix about 4 hours ago that should hopefully resolve this problem.

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

No branches or pull requests

2 participants