transformer_lens.model_bridge.generalized_components.vision_encoder module¶
Shared helpers for vision encoder bridges.
- transformer_lens.model_bridge.generalized_components.vision_encoder.vision_attention_config(config: Any) Any¶
Return a config view carrying the vision tower’s attention dimensions.
AttentionBridgereshapes q/k/v/z hooks fromn_headsat fire time. A multimodal model’s top-level config describes the language model, so using it directly can reshape vision activations with the text tower’s head count.