Skip to content

Conversation

@DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Nov 29, 2025

Purpose

  • Add pad_token_id to TokenizerLike interface to be used in Score API.
  • Use HF defaults for __call__, encode, decode and convert_ids_to_tokens; apply them to MistralTokenizer as well. cc @patrickvonplaten
  • Pass more arguments to from_pretrained to be in line with TokenizerRegistry.get_tokenizer.
  • Move get_cached_tokenizer to vllm.tokenizers.hf (with back-compatibility)
  • Try to run tokenizer tests on CPU.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 added the ready ONLY add when PR is ready to merge/full CI is needed label Nov 29, 2025
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.

@mergify
Copy link

mergify bot commented Nov 29, 2025

Documentation preview: https://vllm--29730.org.readthedocs.build/en/29730/

@mergify mergify bot added documentation Improvements or additions to documentation ci/build frontend v1 labels Nov 29, 2025
@DarkLight1337 DarkLight1337 requested a review from njhill November 29, 2025 15:00
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the tokenizer handling by updating the TokenizerLike interface, moving get_cached_tokenizer, and introducing HfTokenizer. The changes improve code structure and align tokenizer behavior with Hugging Face conventions. I've found a few issues related to type correctness in the protocol and a missing parameter in the MistralTokenizer implementation that should be addressed.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337 DarkLight1337 merged commit 2afcec4 into vllm-project:main Nov 30, 2025
49 checks passed
@DarkLight1337 DarkLight1337 deleted the cached-tokenizer branch November 30, 2025 06:59
kitaekatt pushed a commit to kitaekatt/vllm that referenced this pull request Dec 1, 2025
…r` (vllm-project#29730)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
amd-hhashemi pushed a commit to amd-hhashemi/vllm that referenced this pull request Dec 2, 2025
…r` (vllm-project#29730)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation frontend ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants