Skip to content

[Model] Automatic conversion of TokenClassification model#30666

Merged
DarkLight1337 merged 2 commits intovllm-project:mainfrom
noooop:token_classify
Dec 15, 2025
Merged

[Model] Automatic conversion of TokenClassification model#30666
DarkLight1337 merged 2 commits intovllm-project:mainfrom
noooop:token_classify

Conversation

@noooop
Copy link
Copy Markdown
Collaborator

@noooop noooop commented Dec 15, 2025

Purpose

fix #30107

Test Plan

tests/models/registry.py
tests/models/language/pooling/test_token_classification.py

Test Result

pass


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: wang.yuqi <yuqi.wang@daocloud.io>
@chatgpt-codex-connector
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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 introduces automatic conversion for TokenClassification models. This is achieved by adding a mapping for the ForTokenClassification model architecture suffix to treat it as a pooling/classification task, and enhancing the ModelForSequenceClassification adapter to dynamically handle score.bias from model checkpoints. A new test case for a Qwen3-based token classification model is also added to verify the changes. The implementation appears correct and is a good enhancement for robust model conversion. I have not found any issues of high or critical severity.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) December 15, 2025 05:57
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Dec 15, 2025
@DarkLight1337 DarkLight1337 merged commit 4429d93 into vllm-project:main Dec 15, 2025
56 checks passed
@noooop noooop deleted the token_classify branch December 15, 2025 08:15
Lucaskabela pushed a commit to Lucaskabela/vllm that referenced this pull request Dec 15, 2025
joa-stdn pushed a commit to joa-stdn/vllm that referenced this pull request Dec 15, 2025
…ct#30666)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Joachim Studnia <joachim@mistral.ai>
teddygood pushed a commit to teddygood/vllm that referenced this pull request Dec 16, 2025
Majid-Taheri pushed a commit to Majid-Taheri/vllm that referenced this pull request Dec 23, 2025
…ct#30666)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: Ubuntu <mjtaheri68@gmail.com>
dsuhinin pushed a commit to dsuhinin/vllm that referenced this pull request Jan 21, 2026
…ct#30666)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
ItzDEXX pushed a commit to ItzDEXX/vllm that referenced this pull request Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Model Support: Qwen3 Token Classification

2 participants