transformer_lens.model_bridge.supported_architectures.emu3 module

Emu3 architecture adapter.

BAAI’s Emu3 (Emu3ForConditionalGeneration, native in transformers): unified next-token prediction over text AND image tokens — images are VQ-VAE-quantized into the shared vocabulary, so one Llama-shaped decoder (at model.text_model) generates both modalities. The VQ tokenizer (model.vqmodel) is not mapped: it has no forward (encode/decode only) and images become ordinary tokens before the decoder runs — reach it via bridge.original_model.

class transformer_lens.model_bridge.supported_architectures.emu3.Emu3ArchitectureAdapter(cfg: Any)

Bases: LlamaArchitectureAdapter

Architecture adapter for Emu3ForConditionalGeneration models.