Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
4f882be4
Unverified
Commit
4f882be4
authored
Oct 27, 2025
by
Yu Jiaqi
Committed by
GitHub
Oct 27, 2025
Browse files
[Model] Siglip2 Model Support (#27566)
Signed-off-by:
piood
<
2477084691@qq.com
>
parent
92737542
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
+18
-6
docs/models/supported_models.md
docs/models/supported_models.md
+1
-1
tests/models/multimodal/pooling/test_siglip.py
tests/models/multimodal/pooling/test_siglip.py
+1
-1
vllm/model_executor/models/siglip.py
vllm/model_executor/models/siglip.py
+5
-3
vllm/transformers_utils/config.py
vllm/transformers_utils/config.py
+11
-1
No files found.
docs/models/supported_models.md
View file @
4f882be4
...
@@ -775,7 +775,7 @@ The following table lists those that are tested in vLLM.
...
@@ -775,7 +775,7 @@ The following table lists those that are tested in vLLM.
|
`CLIPModel`
| CLIP | T / I |
`openai/clip-vit-base-patch32`
,
`openai/clip-vit-large-patch14`
, etc. | | |
|
`CLIPModel`
| CLIP | T / I |
`openai/clip-vit-base-patch32`
,
`openai/clip-vit-large-patch14`
, etc. | | |
|
`LlavaNextForConditionalGeneration`
<sup>
C
</sup>
| LLaVA-NeXT-based | T / I |
`royokong/e5-v`
| | ✅︎ |
|
`LlavaNextForConditionalGeneration`
<sup>
C
</sup>
| LLaVA-NeXT-based | T / I |
`royokong/e5-v`
| | ✅︎ |
|
`Phi3VForCausalLM`
<sup>
C
</sup>
| Phi-3-Vision-based | T + I |
`TIGER-Lab/VLM2Vec-Full`
| | ✅︎ |
|
`Phi3VForCausalLM`
<sup>
C
</sup>
| Phi-3-Vision-based | T + I |
`TIGER-Lab/VLM2Vec-Full`
| | ✅︎ |
|
`SiglipModel`
| SigLIP | T / I |
`google/siglip-base-patch16-224`
| | |
|
`SiglipModel`
| SigLIP
, SigLIP2
| T / I |
`google/siglip-base-patch16-224`
,
`google/siglip2-base-patch16-224`
| | |
|
`*ForConditionalGeneration`
<sup>
C
</sup>
,
`*ForCausalLM`
<sup>
C
</sup>
, etc. | Generative models |
\*
| N/A |
\*
|
\*
|
|
`*ForConditionalGeneration`
<sup>
C
</sup>
,
`*ForCausalLM`
<sup>
C
</sup>
, etc. | Generative models |
\*
| N/A |
\*
|
\*
|
<sup>
C
</sup>
Automatically converted into an embedding model via
`--convert embed`
. (
[
details
](
./pooling_models.md#model-conversion
)
)
<sup>
C
</sup>
Automatically converted into an embedding model via
`--convert embed`
. (
[
details
](
./pooling_models.md#model-conversion
)
)
...
...
tests/models/multimodal/pooling/test_siglip.py
View file @
4f882be4
...
@@ -19,7 +19,7 @@ HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts(
...
@@ -19,7 +19,7 @@ HF_IMAGE_PROMPTS = IMAGE_ASSETS.prompts(
}
}
)
)
MODELS
=
[
"google/siglip-base-patch16-224"
]
MODELS
=
[
"google/siglip-base-patch16-224"
,
"google/siglip2-base-patch16-224"
]
def
_run_test
(
def
_run_test
(
...
...
vllm/model_executor/models/siglip.py
View file @
4f882be4
...
@@ -174,9 +174,11 @@ class SiglipMultiModalProcessor(BaseMultiModalProcessor[SiglipProcessingInfo]):
...
@@ -174,9 +174,11 @@ class SiglipMultiModalProcessor(BaseMultiModalProcessor[SiglipProcessingInfo]):
@
cached_property
@
cached_property
def
image_token_id
(
self
)
->
int
:
def
image_token_id
(
self
)
->
int
:
tokenizer
=
self
.
info
.
get_tokenizer
()
tokenizer
=
self
.
info
.
get_tokenizer
()
dummy_token_id
=
0
dummy_token_id
=
next
(
token_id
assert
dummy_token_id
not
in
tokenizer
.
all_special_ids
for
token_id
in
range
(
tokenizer
.
vocab_size
)
if
token_id
not
in
tokenizer
.
all_special_ids
)
return
dummy_token_id
return
dummy_token_id
...
...
vllm/transformers_utils/config.py
View file @
4f882be4
...
@@ -26,7 +26,10 @@ from huggingface_hub.utils import (
...
@@ -26,7 +26,10 @@ from huggingface_hub.utils import (
)
)
from
transformers
import
GenerationConfig
,
PretrainedConfig
from
transformers
import
GenerationConfig
,
PretrainedConfig
from
transformers.models.auto.image_processing_auto
import
get_image_processor_config
from
transformers.models.auto.image_processing_auto
import
get_image_processor_config
from
transformers.models.auto.modeling_auto
import
MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
from
transformers.models.auto.modeling_auto
import
(
MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
,
MODEL_MAPPING_NAMES
,
)
from
transformers.models.auto.tokenization_auto
import
get_tokenizer_config
from
transformers.models.auto.tokenization_auto
import
get_tokenizer_config
from
transformers.utils
import
CONFIG_NAME
as
HF_CONFIG_NAME
from
transformers.utils
import
CONFIG_NAME
as
HF_CONFIG_NAME
...
@@ -616,6 +619,13 @@ def get_config(
...
@@ -616,6 +619,13 @@ def get_config(
model_type
=
MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
[
config
.
model_type
]
model_type
=
MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
[
config
.
model_type
]
config
.
update
({
"architectures"
:
[
model_type
]})
config
.
update
({
"architectures"
:
[
model_type
]})
# Architecture mapping for models without explicit architectures field
if
not
config
.
architectures
:
if
config
.
model_type
not
in
MODEL_MAPPING_NAMES
:
raise
ValueError
(
f
"Cannot find architecture name for
{
config
.
model_type
}
"
)
model_type
=
MODEL_MAPPING_NAMES
[
config
.
model_type
]
config
.
update
({
"architectures"
:
[
model_type
]})
# ModelOpt 0.31.0 and after saves the quantization config in the model
# ModelOpt 0.31.0 and after saves the quantization config in the model
# config file.
# config file.
quantization_config
=
config_dict
.
get
(
"quantization_config"
,
None
)
quantization_config
=
config_dict
.
get
(
"quantization_config"
,
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment