vllm.model_executor.models.colqwen3_5 ¶
ColQwen3.5 late interaction model for multi-modal retrieval and reranking.
ColQwen3.5 extends Qwen3.5 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.5 backbone with custom text projection
Target models: - athrael-soju/colqwen3.5-4.5B-v3
ColQwen3_5Model ¶
Bases: Qwen3_5ForConditionalGeneration, SupportsLateInteraction
ColQwen3.5 late interaction model for multi-modal retrieval/reranking.
This model extends Qwen3_5ForConditionalGeneration 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 per-token embeddings by: 1. Running the Qwen3.5 backbone (vision + language) to get hidden states 2. Projecting hidden states through a linear layer (hidden_size -> embed_dim) 3. L2 normalization is handled by the pooler via PoolerNormalize
Attributes:
| Name | Type | Description |
|---|---|---|
custom_text_proj | Linear projection from hidden_size to embed_dim |
Source code in vllm/model_executor/models/colqwen3_5.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | |
_is_proj_weight ¶
Check if a weight name belongs to the projection layer.
forward ¶
forward(
input_ids: Tensor | None,
positions: Tensor,
intermediate_tensors=None,
inputs_embeds: Tensor | None = None,
**kwargs: object,
) -> Tensor
Run forward pass producing per-token embeddings.
Source code in vllm/model_executor/models/colqwen3_5.py
load_weights ¶
Load weights with special handling for projection layer.
Source code in vllm/model_executor/models/colqwen3_5.py
ColQwen3_5ProcessingInfo ¶
Bases: Qwen3_5ProcessingInfo
Processing info for ColQwen3.5 models.
ColQwen3.5 models use custom HuggingFace processors (e.g. ColQwen3_5Processor) that are incompatible with vLLM's Qwen3VLMultiModalProcessor. We override get_hf_config() and get_hf_processor() to skip the strict type check and force the standard Qwen3VLProcessor.