Skip to main content
Ctrl+K
Megatron Core - Home Megatron Core - Home

Megatron Core

Megatron Core - Home Megatron Core - Home

Megatron Core

Table of Contents

User Guide

  • User Guide

API Guide

  • API Guide
    • models package
      • models.gpt package
      • models.t5 package
      • models.bert package
    • tensor_parallel package
    • context_parallel package
    • pipeline_parallel package
    • MCore Custom Fully Sharded Data Parallel (FSDP)
    • fusions package
    • transformer package
    • Mixture of Experts package
    • dist_checkpointing package
      • dist_checkpointing.strategies package
    • Distributed Optimizer
    • distributed package
    • datasets package
    • Multi-Latent Attention
    • Microbatches Calculator
    • Optimizer Parameters Scheduler
    • Optimizer CPU offload package
    • Multi-Token Prediction (MTP)
    • New Tokenizer System
  • API Guide
  • models package

models package#

This package contains most of the popular LLMs . Currently we have support for GPT, Bert, T5 and Retro . This is an ever growing list so keep an eye out.

Subpackages#

  • models.gpt package
    • Submodules
    • models.gpt.gpt_model module
      • GPTModel
        • build_schedule_plan()
        • forward()
        • set_input_tensor()
        • sharded_state_dict()
        • shared_embedding_or_output_weight()
    • Module contents
  • models.t5 package
    • Submodules
    • models.t5.t5_model module
      • T5LMHead
        • forward()
      • T5Model
        • forward()
        • set_input_tensor()
        • sharded_state_dict()
        • shared_embedding_or_output_weight()
      • t5_extended_attention_mask()
      • t5_position_ids()
    • Module contents
  • models.bert package
    • Submodules
    • models.bert.bert_model module
      • BertModel
        • bert_extended_attention_mask()
        • bert_position_ids()
        • forward()
        • set_input_tensor()
      • get_te_version()
    • Module contents

Module contents#

previous

API Guide

next

models.gpt package

On this page
  • Subpackages
  • Module contents
NVIDIA NVIDIA
Privacy Policy | Manage My Privacy | Do Not Sell or Share My Data | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2022-2025, NVIDIA Corporation.

Last updated on Sep 25, 2025.