qwen2_5_vl_text¶
qwen2_5_vl_text
¶
Qwen2.5-VL, text (Qwen2_5_VLTextModel, model_type qwen2_5_vl_text).
The language model inside Qwen2_5_VLForConditionalGeneration (model_type
qwen2_5_vl): Qwen2's block under multimodal rotary embeddings (M-RoPE),
folded into one cos/sin pair before any block runs and applied inside
the attention before the shared interface, so the base Attention holds, as on
qwen2_vl_text. Every checkpoint loads as the wrapper
(task="image-text-to-text"), whose text stack sits at model.language_model.
The wrapper's Qwen ViT model.visual is vision (a QwenVision: packed,
[1, patches, vision_hidden_size], and in window order: the tower permutes the
patches into attention windows at entry and restores the order after the
merger, so the blocks' values and projector.output are in window order while
vision.image_features, read at the tower's output, is in the scatter's).
RENAME
module-attribute
¶
RENAME = {'model.language_model.embed_tokens': 'embed_tokens', 'model.language_model.layers': 'layers', 'model.language_model.norm': 'norm', 'model.visual': 'vision', 'model.visual.merger': 'projector', 'blocks': 'layers', 'attn': 'self_attn', 'norm1': 'input_layernorm', 'norm2': 'post_attention_layernorm', 'attn.proj': 'attn.o_proj'}
ENVOYS
module-attribute
¶
ENVOYS = {Qwen2_5_VLModel: ImageScatter, Qwen2_5_VLDecoderLayer: Layer, Qwen2_5_VLAttention: Attention, Qwen2MLP: Mlp, Qwen2_5_VisionTransformerPretrainedModel: QwenVision, Qwen2_5_VLVisionBlock: VisionLayer, Qwen2_5_VLVisionAttention: QwenVisionAttention, Qwen2_5_VLMLP: VisionMlp}