bridge.models.qwen_vl.qwen35_vl_config#

Builder-backed model config for Qwen3.5 and Qwen3.6 vision-language models.

The language half is the Qwen3.5 hybrid Gated DeltaNet + Gated Attention decoder, configured with the same Hybrid positions as the text bridges’ Qwen35HybridModelConfig. The vision-language settings live on the outer config; Qwen35VLModelBuilder combines the decoder with the Qwen3-VL vision encoder.

Module Contents#

Classes#

Qwen35VLTransformerConfig

Qwen3.5-VL fields not represented by MCore’s base config.

Qwen35VLModelConfig

Builder config for Qwen3.5 and Qwen3.6 vision-language models, dense and MoE.

Data#

API#

bridge.models.qwen_vl.qwen35_vl_config._QWEN_VISUAL_ENCODER_KEY#

‘qwen_visual’

bridge.models.qwen_vl.qwen35_vl_config._IMAGES_MODALITY_KEY#

‘images’

class bridge.models.qwen_vl.qwen35_vl_config.Qwen35VLTransformerConfig#

Bases: megatron.bridge.models.transformer_config.TransformerConfig

Qwen3.5-VL fields not represented by MCore’s base config.

Qwen3VLModel and its Qwen3VLSelfAttention layers read them from the language transformer config they are built with.

apply_rotary_pos_emb_in_fp32: bool#

False

spatial_merge_size: int#

2

vision_dp_when_cp: bool#

False

class bridge.models.qwen_vl.qwen35_vl_config.Qwen35VLModelConfig#

Bases: megatron.bridge.models.qwen.modeling_qwen35.model_config.Qwen35HybridModelConfig

Builder config for Qwen3.5 and Qwen3.6 vision-language models, dense and MoE.

vision_config holds the Hugging Face vision config, as on the providers. The token IDs, vision geometry and vision-encoder execution settings are the provider fields of the same names. Language layer counts and pipeline layouts use Hybrid positions: two positions per HF block, with stage boundaries between complete mixer/feed-forward pairs.

builder: ClassVar[str]#

‘megatron.bridge.models.qwen_vl.qwen35_vl_builder.Qwen35VLModelBuilder’

transformer_config_class: ClassVar[type[megatron.bridge.models.transformer_config.TransformerConfig]]#

None

modality_keys: ClassVar[dict[str, str]]#

None

position_embedding_type: Literal[learned_absolute, rope, mrope, yarn, none]#

‘mrope’

scatter_embedding_sequence_parallel: bool#

False

transformer_layer_spec: Any#

None

vision_config: Any#

None

Hugging Face Qwen3_5VisionConfig or Qwen3_5MoeVisionConfig.

image_token_id: int#

248056

video_token_id: int#

248057

vision_start_token_id: int#

248053

vision_end_token_id: int#

248054

bos_token_id: int | None#

None

eos_token_id: int | None#

None

temporal_patch_size: int#

2

patch_size: int#

16

language_max_sequence_length: int#

2048

freeze_language_model: bool#

False

freeze_vision_model: bool#

False

freeze_vision_projection: bool#

False

use_hf_vision_model: bool#

False

vision_recompute_granularity: Literal[inherit, full, selective] | None#

‘inherit’

vision_recompute_method: Literal[uniform, block] | None#

None

vision_recompute_num_layers: int | None#

None

vision_recompute_modules: list[str] | None#

None

vision_cuda_graph_impl: str#

‘none’

vision_cuda_graph_scope: list[str]#

‘field(…)’

max_vision_cuda_graph_seq_length: int | None#

None

property special_token_ids: dict[str, int]#

Return modality token IDs.

finalize() → None#

Compute the loss per token under context parallelism, as Qwen3-VL requires, then validate.

bridge.models.qwen_vl.qwen35_vl_config.__all__#

[‘Qwen35VLModelConfig’, ‘Qwen35VLTransformerConfig’]