[Model] Automatic conversion of TokenClassification model#30666
[Model] Automatic conversion of TokenClassification model#30666DarkLight1337 merged 2 commits intovllm-project:mainfrom
Conversation
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
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.
…ct#30666) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
…ct#30666) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: Joachim Studnia <joachim@mistral.ai>
…ct#30666) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
…ct#30666) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: Ubuntu <mjtaheri68@gmail.com>
…ct#30666) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: dsuhinin <suhinin.dmitriy@gmail.com>
…ct#30666) Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
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
supported_models.mdandexamplesfor a new model.