bridge.models.ernie.modeling_ernie55#

ERNIE 5.5 modules built on Megatron-Core.

  • D layer: latent MQA + DSA with window and sink (latent_mqa_attention, latent_mqa_core).

  • H layer: Megatron-Core’s DSv4 hybrid attention at compress ratio 128 with the ERNIE output gate, VHA head mix, plain RoPE or YaRN and sink seeding (hca_attention).

  • MoE layer: Megatron-Core’s MoELayer with the split-feature router and fp32 latent projections (moe).

  • Context parallelism: D layers run zigzag inside the contiguous DSv4 stack (context_parallel).

  • Hyper-connections with fp32 decoder streams: the eager fp32 mapping and mixing (hyper_connection), downcasting pre-norms (norm) and the fp32 decoder stack (hybrid_stack). norm also holds the reference implementation’s RMSNorm arithmetic, behind ernie_reference_rmsnorm.

  • Multimax output head with its own gradient-norm group (output_layer).

  • The reference implementation’s Triton kernels for SiTU-GLU, multimax and the context-parallel local RoPE (fused_ops), dispatched behind ernie_fused_ops (fused_dispatch).

  • SD-MTP, the MTP body sharing the last decoder layers’ parameters (mtp), and the per-row MTP loss (mtp_loss).

  • The model, which applies all of the above after Megatron-Core builds it (model).

FlashMLA and the cuDNN DSA kernels are imported lazily by Megatron-Core, and Triton by fused_ops on its first kernel launch, so importing this package needs none of them.

Submodules#

Package Contents#

Data#

API#

bridge.models.ernie.modeling_ernie55.__all__#

[‘ERNIE55_ATTN_SINK_INIT_STD’, ‘ERNIE55_HCA_COMPRESS_RATIO’, ‘ERNIE55_HCA_ROPE_TYPES’, ‘INDEXER_SCOR…