vllm.model_executor.models.colqwen3
¶
ColQwen3 late interaction model for multi-modal retrieval and reranking.
ColQwen3 extends Qwen3-VL with a ColBERT-style late interaction head, producing per-token embeddings for both text and image inputs. It uses MaxSim scoring for retrieval/reranking tasks.
This model supports the "token_embed" pooling task and is designed for multi-vector retrieval of documents containing both text and images.
Reference: https://arxiv.org/abs/2407.01449 (ColPali) Based on: Qwen3-VL backbone with custom text projection
Target models: - TomoroAI/tomoro-colqwen3-embed-8b - OpenSearch-AI/Ops-Colqwen3-4B - nvidia/nemotron-colembed-vl-4b-v2
Classes:
-
ColQwen3Model–ColQwen3 late interaction model for multi-modal retrieval/reranking.
-
ColQwen3ProcessingInfo–Processing info for ColQwen3 models.
ColQwen3Model
¶
Bases: Qwen3VLForConditionalGeneration, SupportsLateInteraction
ColQwen3 late interaction model for multi-modal retrieval/reranking.
This model extends Qwen3VLForConditionalGeneration with a ColBERT-style linear projection layer for per-token embeddings. It supports: - "token_embed" task: Per-token embeddings for late interaction scoring
The model produces L2-normalized per-token embeddings by: 1. Running the Qwen3-VL backbone (vision + language) to get hidden states 2. Projecting hidden states through a linear layer (hidden_size -> embed_dim) 3. L2-normalizing the projected embeddings
ColBERT-style MaxSim scoring is computed externally, either client-side or via the late interaction scoring path in ServingScores.
Attributes:
-
custom_text_proj–Linear projection from hidden_size to embed_dim
Methods:
-
forward–Run forward pass producing per-token embeddings.
-
load_weights–Load weights with special handling for ColQwen3 projection layer.
_is_proj_weight(name)
¶
Check if a weight name belongs to the projection layer.
forward(input_ids, positions, intermediate_tensors=None, inputs_embeds=None, **kwargs)
¶
Run forward pass producing per-token embeddings.
load_weights(weights)
¶
Load weights with special handling for ColQwen3 projection layer.
ColQwen3ProcessingInfo
¶
Bases: Qwen3VLProcessingInfo
Processing info for ColQwen3 models.
ColQwen3 models (TomoroAI, OpenSearch-AI, etc.) use custom HuggingFace configs (e.g. ColQwen3Config, OpsColQwen3Config) that are not instances of Qwen3VLConfig. We override get_hf_config() and get_hf_processor() to skip the strict type check, similar to OpenCUAProcessingInfo.
_supports_video
property
¶
Check if the HF processor supports video inputs.