Skip to content

Correct import for transformers internals#540

Merged
sjmonson merged 3 commits intomainfrom
fix/transformers_5_support
Jan 22, 2026
Merged

Correct import for transformers internals#540
sjmonson merged 3 commits intomainfrom
fix/transformers_5_support

Conversation

@sjmonson
Copy link
Collaborator

Summary

Some imports from the transformers library use private/deprecated module names which cause import errors on the upcoming transformers 5.0.0.

Test Plan

Install transformers>=5.0.0rc1 and attempt to run GuideLLM (any command that will trigger full package import).

Related Issues


  • "I certify that all code in this PR is my own, except as noted below."

Use of AI

  • Includes AI-assisted code completion
  • Includes code generated by an AI application
  • Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes ## WRITTEN BY AI ##)

Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
@sjmonson sjmonson added this to the v0.5.3 milestone Jan 22, 2026
## Summary

Adds a library required to load Mistral models to the `openai` extras
group. Also renames the group to `tokenizers` to be more generic.

## Related Issues

<!--
Link any relevant issues that this PR addresses.
-->
- Resolves #539 

---

- [x] "I certify that all code in this PR is my own, except as noted
below."

## Use of AI

- [ ] Includes AI-assisted code completion
- [ ] Includes code generated by an AI application
- [ ] Includes AI-generated tests (NOTE: AI written tests should have a
docstring that includes `## WRITTEN BY AI ##`)
@sjmonson
Copy link
Collaborator Author

sjmonson commented Jan 22, 2026

Sorry I accidentally merged #541 into this PR instead of main.

Copy link
Collaborator

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally. I didn't notice any problems related to this PR, and I can confirm that it fixes the import problem.

@sjmonson sjmonson merged commit 5a61f70 into main Jan 22, 2026
16 checks passed
@sjmonson sjmonson deleted the fix/transformers_5_support branch January 22, 2026 18:25
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.

ModuleNotFoundError: No module named 'transformers.tokenization_utils'

2 participants