bridge.models.exaone.exaone45.exaone45_bridge#

Module Contents#

Classes#

Exaone45Bridge

Megatron Bridge for EXAONE 4.5 conditional generation.

API#

class bridge.models.exaone.exaone45.exaone45_bridge.Exaone45Bridge#

Bases: megatron.bridge.models.conversion.model_bridge.MegatronModelBridge

Megatron Bridge for EXAONE 4.5 conditional generation.

This bridge handles the conversion between HuggingFace Exaone4_5_ForConditionalGeneration and Megatron-Core Exaone45Model formats, including weight mappings and configuration translation for vision-language models.

The weight mappings are based on the yan-mbridge implementation which defines:

  • Vision model direct mappings

  • Vision attention layer mappings

  • Vision MLP layer mappings

  • Language model mappings

.. rubric:: Example

from megatron.bridge import AutoBridge bridge = AutoBridge.from_hf_pretrained(“LGAI-EXAONE/EXAONE-4.5-33B”) provider = bridge.to_megatron_provider()

provider_bridge(
hf_pretrained: megatron.bridge.models.hf_pretrained.causal_lm.PreTrainedCausalLM,
) megatron.bridge.models.exaone.exaone45.exaone45_provider.Exaone45ModelProvider#

Create a Exaone45ModelProvider from a HuggingFace pretrained model.

Parameters:

hf_pretrained – HuggingFace pretrained VLM model

Returns:

Exaone45ModelProvider configured with the HF model’s parameters

mapping_registry() megatron.bridge.models.conversion.mapping_registry.MegatronMappingRegistry#

Return MegatronMappingRegistry containing parameter mappings from Megatron to HF format.

The mappings are organized into:

  1. Simple 1:1 mappings for embeddings, layer norms, and output layers

  2. Vision model mappings (replicated without modification)

  3. QKV mappings that combine separate Q, K, V matrices

  4. Gated MLP mappings that combine gate and up projections

Returns:

MegatronMappingRegistry with all parameter mappings