Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JinjieNi/MegaDLMs
/ types & classes
Types & classes
650 in github.com/JinjieNi/MegaDLMs
⨍
Functions
4,219
◇
Types & classes
650
↳
Endpoints
8
↓ 87 callers
Class
ModuleSpec
This is a Module Specification dataclass. Specification defines the location of the module (to import dynamically) or the imported module its
megatron/core/transformer/spec_utils.py:9
↓ 72 callers
Class
TransformerConfig
Configuration object for megatron-core transformers. The initialization function has an argument for each parameter, including those in Model
megatron/core/transformer/transformer_config.py:15
↓ 62 callers
Class
TempNamedDir
TemporaryDirectory with a fully named directory. Empties the dir if not empty.
tests/unit_tests/dist_checkpointing/__init__.py:28
↓ 48 callers
Class
CheckpointingException
Base checkpointing related exception
megatron/core/dist_checkpointing/core.py:13
↓ 25 callers
Class
SubPolicy
Definition of a SubPolicy. A SubPolicy consists of two augmentation operations, each of those parametrized as operation, probability, magnitu
megatron/legacy/data/autoaugment.py:114
↓ 25 callers
Class
TransformerLayerSubmodules
Configuration class for specifying the submodules of a transformer layer. This class defines the structure and default implementations for v
megatron/core/transformer/transformer_layer.py:21
↓ 25 callers
Class
_ValueWithRank
This is an internal class, not for use outside this module Attributes: _rank (int): rank for the value _value (float) : the value
megatron/core/utils.py:644
↓ 23 callers
Class
BlendedMegatronDatasetBuilder
Builder class for the BlendedDataset and MegatronDataset classes Args: cls (Type[MegatronDataset]): The class to instantiate, must inheri
megatron/core/datasets/blended_megatron_dataset_builder.py:29
↓ 22 callers
Class
MLPSubmodules
megatron/core/transformer/mlp.py:25
↓ 19 callers
Class
SelfAttentionSubmodules
Configuration class for specifying the submodules of a self-attention.
megatron/core/transformer/attention.py:47
↓ 17 callers
Class
GPTModel
GPT-2 Language model.
megatron/legacy/model/gpt_model.py:43
↓ 16 callers
Class
IndexedDataset
The low-level interface dataset class Args: path_prefix (str): The index (.idx) and data (.bin) prefix multimodal (bool): Whethe
megatron/core/datasets/indexed_dataset.py:506
↓ 15 callers
Class
BlendedMegatronDatasetConfig
Configuration object for Megatron Core datasets
megatron/core/datasets/blended_megatron_dataset_config.py:16
↓ 13 callers
Class
MoELayer
Mixture of experts Layer **currently only supports no token dropping**. Args: BaseMoELayer (MegatronModule): Base class for MoE layers
megatron/core/transformer/moe/moe_layer.py:73
↓ 13 callers
Class
SamplingParams
Inference parameters sent along with the prompts. This class contains request-level attributes that control the sampling techniques used when
megatron/core/inference/sampling_params.py:6
↓ 13 callers
Class
TransformerBlock
Transformer class.
megatron/core/transformer/transformer_block.py:185
↓ 13 callers
Class
TransformerBlockSubmodules
Dataclass for specifying the submodules of a transformer block. This class defines the structure for configuring the layers and normalizatio
megatron/core/transformer/transformer_block.py:128
↓ 12 callers
Class
Section
A docstring section.
tools/retro/config_utils.py:236
↓ 11 callers
Class
OptimizerParamScheduler
Anneals learning rate and weight decay Args: optimizer (MegatronOptimizer): the optimizer to be used init_lr (float): initial lea
megatron/core/optimizer_param_scheduler.py:14
↓ 11 callers
Class
ShardedObject
Represents a mapping between a local object and a global object. Global object is assumed to consist of many local objects distributed betwee
megatron/core/dist_checkpointing/mapping.py:524
↓ 10 callers
Class
GPTPipeline
GPT-specific pipeline customizations. Args: src (Union[ModelMeta, Tuple]): Model meta for loading. dst (Union[ModelMeta, Tuple]):
tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:532
↓ 9 callers
Class
RotaryEmbedding
Rotary Embedding for language model. Args: kv_channels (int): Projection weights dimension in multi-head attention. Obtained
megatron/core/models/common/embeddings/rotary_pos_embedding.py:35
↓ 8 callers
Class
Float16Module
megatron/legacy/model/module.py:163
↓ 8 callers
Class
FullyParallelLoadStrategyWrapper
Wraps arbitrary load strategy and distributes the load during `load`. See `load` method docs for details. Args: strategy (LoadSharde
megatron/core/dist_checkpointing/strategies/fully_parallel.py:129
↓ 8 callers
Class
RerunDataIterator
A wrapper class for data iterators that adds replay capability. Args: iterable: data iterator that needs the replay capability. m
megatron/core/rerun_state_machine.py:815
↓ 8 callers
Class
TEDelayedScaling
Wrapper for the Transformer-Engine's `DelayedScaling` layer.
megatron/core/extensions/transformer_engine.py:1104
↓ 7 callers
Class
Counter
A simple counter class This class is responsible for assigning request ids to incoming requests
megatron/core/inference/utils.py:2
↓ 7 callers
Class
FullyParallelSaveStrategyWrapper
Wraps arbitrary strategy and distributes the save during `save`. The save distribution happens without any *data* communication. Only the *me
megatron/core/dist_checkpointing/strategies/fully_parallel.py:38
↓ 6 callers
Class
CrossAttentionSubmodules
Configuration class for specifying the submodules of a cross-attention.
megatron/core/transformer/attention.py:59
↓ 6 callers
Class
ExportConfig
Base configuration for Megatron Core Export These parameters control the export setting for trtllm
megatron/core/export/export_config.py:7
↓ 6 callers
Class
FusedScaleMaskSoftmax
fused operation: scaling + mask + softmax Args: input_in_fp16: flag to indicate if input in fp16 data format. input_in_bf16:
megatron/legacy/model/fused_softmax.py:120
↓ 6 callers
Class
InferenceWrapperConfig
Config for the model inference wrapper NOTE : All the arguments here are obtained from arguments.py file
megatron/core/inference/model_inference_wrappers/inference_wrapper_config.py:8
↓ 6 callers
Class
LanguageModelEmbedding
Language model embeddings. Args: config (TransformerConfig): config object with all necessary configs for TransformerBlock vocab_
megatron/core/models/common/embeddings/language_model_embedding.py:13
↓ 6 callers
Class
LocalNonpersistentObject
Object that should not be stored in a checkpoint, but restored locally. Wrapping any object inside the state dict with LocalNonpersistentObject
megatron/core/dist_checkpointing/mapping.py:502
↓ 6 callers
Class
MoEModelTestContainer
tests/unit_tests/transformer/moe/test_token_dispatcher.py:17
↓ 6 callers
Class
ShardedTensorFactory
Allows to apply transformations to tensors before/after serialization. The essence of those transformations is that they can be applied to op
megatron/core/dist_checkpointing/mapping.py:602
↓ 5 callers
Class
ARRMSNorm
tools/weights_conversion/hf_configs/gptneox_1.7b_ar/modeling_ar.py:230
↓ 5 callers
Class
AuxlossTestContainer
tests/unit_tests/transformer/moe/test_aux_loss.py:12
↓ 5 callers
Class
BertModel
Bert Language model.
megatron/legacy/model/bert_model.py:127
↓ 5 callers
Class
DLMRMSNorm
tools/weights_conversion/hf_configs/gptneox_1.7b_dlm/modeling_dlm.py:239
↓ 5 callers
Class
DLMRMSNorm
tools/weights_conversion/hf_configs/gpt2_1b_dlm/modeling_dlm.py:239
↓ 5 callers
Class
GPTDatasetConfig
Configuration object for Megatron Core GPT datasets
megatron/core/datasets/gpt_dataset.py:35
↓ 5 callers
Class
LLaVAModel
LLaVA multi-modal model. Args: language_transformer_config (TransformerConfig): Transformer config for the language model. langua
megatron/core/models/multimodal/llava_model.py:43
↓ 5 callers
Class
MLASelfAttentionSubmodules
Submodules for the MLA self-attention layer.
megatron/core/transformer/multi_latent_attention.py:23
↓ 5 callers
Class
OptimizerConfig
Configuration for optimizer.
megatron/core/optimizer/optimizer_config.py:10
↓ 5 callers
Class
PromptConfig
Config options for different prompt formats.
megatron/training/tokenizer/multimodal_tokenizer.py:44
↓ 5 callers
Class
SequentialMLP
An implementation of the Experts layer using a sequence of MLP layers. This class executes each expert sequentially.
megatron/core/transformer/moe/experts.py:745
↓ 5 callers
Class
VitBackbone
Vision Transformer Model.
megatron/legacy/model/vision/vit_backbone.py:130
↓ 5 callers
Class
_NullTokenizer
megatron/training/tokenizer/tokenizer.py:774
↓ 4 callers
Class
AsyncCallsQueue
Manages a queue of async calls. Allows adding a new async call with `schedule_async_request` and finalizing active calls with `maybe_finalize
megatron/core/dist_checkpointing/strategies/async_utils.py:159
↓ 4 callers
Class
Block
megatron/legacy/model/vision/mit_backbone.py:125
↓ 4 callers
Class
ClassificationTransform
megatron/legacy/data/vit_dataset.py:50
↓ 4 callers
Class
DropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
megatron/legacy/model/transformer.py:75
↓ 4 callers
Class
InferenceParams
Inference parameters that are passed to the main model in order to efficienly calculate and store the context during inference.
megatron/core/inference_params.py:2
↓ 4 callers
Class
MLP
Linear Embedding
megatron/legacy/model/vision/inpainting.py:70
↓ 4 callers
Class
MLP
MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform nonlinear transformation, and project the state
megatron/core/transformer/mlp.py:30
↓ 4 callers
Class
MLP
Linear Embedding
tasks/vision/segmentation/seg_heads.py:55
↓ 4 callers
Class
ModelParallelConfig
Base configuration for Megatron Core The initialization function has an argument for each parameter.
megatron/core/model_parallel_config.py:10
↓ 4 callers
Class
OverlapPatchEmbed
Image to Patch Embedding
megatron/legacy/model/vision/mit_backbone.py:165
↓ 4 callers
Class
ParallelTransformer
Transformer class.
megatron/legacy/model/transformer.py:1370
↓ 4 callers
Class
Range
A range represents a start and end points for indexing a shard from a full tensor. Args: start (int): Start index. end (
megatron/core/optimizer/distrib_optimizer.py:57
↓ 4 callers
Class
StragglerDetector
Singleton Class implementing per rank Straggler Detector It use cuda events to time operation of choice using the start and stop methods whic
megatron/core/utils.py:746
↓ 3 callers
Class
DistributedDataParallelConfig
Configuration for DistributedDataParallel.
megatron/core/distributed/distributed_data_parallel_config.py:8
↓ 3 callers
Class
Encoder
tools/preprocess_data.py:48
↓ 3 callers
Class
GPTInferenceWrapper
Inference wrapper for GPT model
megatron/core/inference/model_inference_wrappers/gpt/gpt_inference_wrapper.py:16
↓ 3 callers
Class
GPTToTextDataset
Dataset to convert GPT tokens to text. Args: gpt_dataset (MultiSplitGPTDataset): GPT dataset, which outputs GPT token samples. gp
megatron/core/datasets/retro/utils.py:75
↓ 3 callers
Class
GaussianBlur
Apply Gaussian Blur to the PIL image.
megatron/legacy/data/vit_dataset.py:15
↓ 3 callers
Class
ImageFolder
A generic data loader where the images are arranged in this way: :: root/dog/xxx.png root/dog/xxy.png root/dog/[...]/xxz.png
megatron/legacy/data/image_folder.py:262
↓ 3 callers
Class
InferenceRequest
Class for one inference request Containing relevant data for an inference request
megatron/core/inference/inference_request.py:22
↓ 3 callers
Class
MambaMixer
Args: config: The config of the model. submodules: Contains the module specs for the input and output linear layers. d_mo
megatron/core/ssm/mamba_mixer.py:77
↓ 3 callers
Class
MegatronServer
megatron/inference/text_generation_server.py:223
↓ 3 callers
Class
MockLoadStrategy
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:44
↓ 3 callers
Class
MultimodalProjector
MultimodalProjector will take the encoded input with input_size hidden state and project it into the hidden size of the language model for mu
megatron/core/models/vision/multimodal_projector.py:9
↓ 3 callers
Class
MultimodalTokenizer
Multimodal Tokenizer.
megatron/training/tokenizer/multimodal_tokenizer.py:60
↓ 3 callers
Class
OpenRetreivalDataStore
Serializable data structure for holding data for blocks -- embeddings and necessary metadata for Retriever
megatron/legacy/data/realm_index.py:18
↓ 3 callers
Class
PackedSeqParams
parameters to TEDotProductAttention and fused rope kernels for the `thd` (packed) sequence format
megatron/core/packed_seq_params.py:8
↓ 3 callers
Class
ParseError
Base class for all parsing related errors.
tools/retro/config_utils.py:32
↓ 3 callers
Class
PretrainedBertModel
BERT-based encoder for queries or contexts used for learned information retrieval.
megatron/legacy/model/biencoder_model.py:246
↓ 3 callers
Class
RaceDataset
tasks/race/data.py:19
↓ 3 callers
Class
RankGenerator
A class for generating rank groups for different modes of parallelism.
megatron/core/parallel_state.py:288
↓ 3 callers
Class
S3Config
Config when the data (.bin) file and the index (.idx) file are in S3 TODO: These parameters are few and can be consolidated with parameters speci
megatron/core/datasets/utils_s3.py:16
↓ 3 callers
Class
ShardedTensor
Represents a mapping between a local tensor and a global tensor. Global tensor is assumed to consist of many local tensors distributed betwee
megatron/core/dist_checkpointing/mapping.py:50
↓ 3 callers
Class
T5Model
T5 Language model.
megatron/legacy/model/t5_model.py:64
↓ 3 callers
Class
TEDotProductAttention
Wrapper for the Transformer-Engine's `DotProductAttention` layer that also has "flash attention" enabled. Note that if Megatron's parall
megatron/core/extensions/transformer_engine.py:546
↓ 3 callers
Class
TRTLLMHelper
TRTLLM Helper class to convert export and build TRTLLM model.
megatron/core/export/trtllm/trtllm_helper.py:31
↓ 3 callers
Class
TorchDistSaveShardedStrategy
Async save strategy for the PyT Distributed format. The idea is to translate MCore ShardedTensors into PyT ShardedTensors and use the async-a
megatron/core/dist_checkpointing/strategies/torch.py:585
↓ 3 callers
Class
_BertWordPieceTokenizer
Original BERT wordpiece tokenizer.
megatron/training/tokenizer/tokenizer.py:180
↓ 3 callers
Class
_ParamAndGradBucketGroup
Put multiple buckets into a group so that their communications can be aggregated together. Provides functionality to register when params in
megatron/core/distributed/param_and_grad_buffer.py:89
↓ 2 callers
Class
CLIPViTModel
CLIP ViT vision model. Args: transformer_config (TransformerConfig): Transformer config. transformer_layer_spec (ModuleSpec): Spe
megatron/core/models/vision/clip_vit_model.py:25
↓ 2 callers
Class
Caller
Class capturing the code and rank calling a function.
megatron/core/rerun_state_machine.py:43
↓ 2 callers
Class
ChainedOptimizer
ChainedOptimizer is designed for a collection of optimizers. These optimizers are responsible for different parts of multiple models for a tr
megatron/core/optimizer/optimizer.py:930
↓ 2 callers
Class
CheckpointingConfig
Documents backends used in the checkpoint. Checkpoint config keeps track of formats used for storing the sharded tensors (sharded_backend) an
megatron/core/dist_checkpointing/core.py:20
↓ 2 callers
Class
Cityscapes
`Cityscapes <http://www.cityscapes-dataset.com/>`_ Dataset. Args: root (string): Root directory of dataset where directory ``leftImg8bit``
tasks/vision/segmentation/cityscapes.py:47
↓ 2 callers
Class
ColumnParallelLinear
Linear layer with column parallelism. The linear layer is defined as Y = XA + b. A is parallelized along its second dimension as A = [A_1, ..
megatron/core/tensor_parallel/layers.py:675
↓ 2 callers
Class
Ctx
tests/unit_tests/tensor_parallel/test_mappings.py:112
↓ 2 callers
Class
CudaRNGStatesTracker
Tracker for the cuda RNG states. Using the `add` method, a cuda rng state is initialized based on the input `seed` and is assigned to `name`.
megatron/core/tensor_parallel/random.py:82
↓ 2 callers
Class
CustomHandler
Custom handler to filter out logging from code outside of Megatron Core, and dump to stdout.
megatron/training/log_handler.py:9
↓ 2 callers
Class
DINOHead
megatron/legacy/model/vision/dino.py:82
↓ 2 callers
Class
DistributedTRTLLMModelWeightsConverter
The TRTLLM Converter class used for GPU (on device) conversion This class is used to convert models sharded and on gpus. (It assumes that the mod
megatron/core/export/trtllm/trtllm_weights_converter/distributed_trtllm_model_weights_converter.py:24
↓ 2 callers
Class
DocstringMeta
Docstring meta information. Symbolizes lines in form of :param arg: description :raises ValueError: if something happens
tools/retro/config_utils.py:54
next →
1–100 of 650, ranked by callers