Skip to content

fix(tokenizer): Fix MLukeTokenizer AttributeError post-v5 refactor - #44362

Merged
Rocketknight1 merged 2 commits into
huggingface:mainfrom
harshaljanjani:fix/mluke-tokenizer-v5-attr
Mar 2, 2026
Merged

Rocketknight1 merged 2 commits into
huggingface:mainfrom
harshaljanjani:fix/mluke-tokenizer-v5-attr

Conversation

@harshaljanjani

Copy link
Copy Markdown
Contributor

What does this PR do?

The following failing Dia use case was identified and fixed in this PR:

→ MIGRATION_GUIDE_V5.md states that v5 renamed additional_special_tokens to extra_special_tokens internally as part of the tokenizer refactor; but tokenization_mluke.py (amongst other instances) still references self.additional_special_tokens_ids, which is the only remaining call site under the old name that needs fixing :)
→ For more details on reproducing the bug and the output screenshots, please visit the linked issue!

Fixes #44361.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you fix any necessary existing tests?

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: mluke

@harshaljanjani
harshaljanjani marked this pull request as ready for review February 28, 2026 20:09
@Rocketknight1

Copy link
Copy Markdown
Member

Yeah, this looks like it was just missed in the migration. Thank you!

@Rocketknight1
Rocketknight1 enabled auto-merge (squash) March 2, 2026 14:42
@Rocketknight1
Rocketknight1 merged commit 7c4c937 into huggingface:main Mar 2, 2026
17 checks passed
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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

Successfully merging this pull request may close these issues.

[BUG] MLukeTokenizer fails with AttributeError on tasks

3 participants