vllm.model_executor.models.lfm3_vl
¶
Inference-only LFM3-VL model: images and videos in, text out.
Classes:
-
Lfm3VlMultiModalProjector–Merges each block of
spatial_merge_size**2vision tokens, normalized -
Lfm3VlVisionAttention–Bidirectional grouped-query attention over the patches of one frame, with
-
Lfm3VlVisionConv2d–Gated depthwise 2D convolution over the patch grid of each frame.
-
Lfm3VlVisionModel–The LFM3-VL vision encoder: gated convolution and bidirectional attention
Lfm3VlMultiModalProjector
¶
Bases: Module
Merges each block of spatial_merge_size**2 vision tokens, normalized
before the merge, into one language token.
Source code in vllm/model_executor/models/lfm3_vl.py
Lfm3VlVisionAttention
¶
Bases: Module
Bidirectional grouped-query attention over the patches of one frame, with RMSNorm on the query and key heads and axial 2D RoPE.
Source code in vllm/model_executor/models/lfm3_vl.py
Lfm3VlVisionConv2d
¶
Bases: Module
Gated depthwise 2D convolution over the patch grid of each frame.
Source code in vllm/model_executor/models/lfm3_vl.py
Lfm3VlVisionModel
¶
Bases: Module
The LFM3-VL vision encoder: gated convolution and bidirectional attention layers over the patches of each image or video frame, embedded by a linear patchifier.
Methods:
-
position_embeddings–Cos and sin of every patch's (row, column), in merge-block order.
Source code in vllm/model_executor/models/lfm3_vl.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | |
position_embeddings(grid_thw)
¶
Cos and sin of every patch's (row, column), in merge-block order.