transformer_lens.model_bridge.supported_architectures.llava_onevision module¶
LLava-OneVision architecture adapter.
Same module hierarchy as base LLava; SigLIP encoder and Qwen2 backbone are handled dynamically by the base adapter and HuggingFace’s forward().
- class transformer_lens.model_bridge.supported_architectures.llava_onevision.LlavaOnevisionArchitectureAdapter(cfg: Any)¶
Bases:
LlavaArchitectureAdapterArchitecture adapter for LLaVA-OneVision models.
- prepare_model(hf_model: Any) None¶
Fix weight tying when text_config and top-level config disagree.
Some checkpoints have tie_word_embeddings=True in text_config but False at the top level, leaving lm_head randomly initialized.