MCPcopy Create free account

hub / github.com/JinjieNi/MegaDLMs / types & classes

Types & classes650 in github.com/JinjieNi/MegaDLMs

↓ 87 callersClassModuleSpec
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 callersClassTransformerConfig
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 callersClassTempNamedDir
TemporaryDirectory with a fully named directory. Empties the dir if not empty.
tests/unit_tests/dist_checkpointing/__init__.py:28
↓ 48 callersClassCheckpointingException
Base checkpointing related exception
megatron/core/dist_checkpointing/core.py:13
↓ 25 callersClassSubPolicy
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 callersClassTransformerLayerSubmodules
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 callersClass_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 callersClassBlendedMegatronDatasetBuilder
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 callersClassMLPSubmodules
megatron/core/transformer/mlp.py:25
↓ 19 callersClassSelfAttentionSubmodules
Configuration class for specifying the submodules of a self-attention.
megatron/core/transformer/attention.py:47
↓ 17 callersClassGPTModel
GPT-2 Language model.
megatron/legacy/model/gpt_model.py:43
↓ 16 callersClassIndexedDataset
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 callersClassBlendedMegatronDatasetConfig
Configuration object for Megatron Core datasets
megatron/core/datasets/blended_megatron_dataset_config.py:16
↓ 13 callersClassMoELayer
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 callersClassSamplingParams
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 callersClassTransformerBlock
Transformer class.
megatron/core/transformer/transformer_block.py:185
↓ 13 callersClassTransformerBlockSubmodules
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 callersClassSection
A docstring section.
tools/retro/config_utils.py:236
↓ 11 callersClassOptimizerParamScheduler
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 callersClassShardedObject
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 callersClassGPTPipeline
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 callersClassRotaryEmbedding
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 callersClassFloat16Module
megatron/legacy/model/module.py:163
↓ 8 callersClassFullyParallelLoadStrategyWrapper
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 callersClassRerunDataIterator
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 callersClassTEDelayedScaling
Wrapper for the Transformer-Engine's `DelayedScaling` layer.
megatron/core/extensions/transformer_engine.py:1104
↓ 7 callersClassCounter
A simple counter class This class is responsible for assigning request ids to incoming requests
megatron/core/inference/utils.py:2
↓ 7 callersClassFullyParallelSaveStrategyWrapper
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 callersClassCrossAttentionSubmodules
Configuration class for specifying the submodules of a cross-attention.
megatron/core/transformer/attention.py:59
↓ 6 callersClassExportConfig
Base configuration for Megatron Core Export These parameters control the export setting for trtllm
megatron/core/export/export_config.py:7
↓ 6 callersClassFusedScaleMaskSoftmax
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 callersClassInferenceWrapperConfig
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 callersClassLanguageModelEmbedding
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 callersClassLocalNonpersistentObject
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 callersClassMoEModelTestContainer
tests/unit_tests/transformer/moe/test_token_dispatcher.py:17
↓ 6 callersClassShardedTensorFactory
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 callersClassARRMSNorm
tools/weights_conversion/hf_configs/gptneox_1.7b_ar/modeling_ar.py:230
↓ 5 callersClassAuxlossTestContainer
tests/unit_tests/transformer/moe/test_aux_loss.py:12
↓ 5 callersClassBertModel
Bert Language model.
megatron/legacy/model/bert_model.py:127
↓ 5 callersClassDLMRMSNorm
tools/weights_conversion/hf_configs/gptneox_1.7b_dlm/modeling_dlm.py:239
↓ 5 callersClassDLMRMSNorm
tools/weights_conversion/hf_configs/gpt2_1b_dlm/modeling_dlm.py:239
↓ 5 callersClassGPTDatasetConfig
Configuration object for Megatron Core GPT datasets
megatron/core/datasets/gpt_dataset.py:35
↓ 5 callersClassLLaVAModel
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 callersClassMLASelfAttentionSubmodules
Submodules for the MLA self-attention layer.
megatron/core/transformer/multi_latent_attention.py:23
↓ 5 callersClassOptimizerConfig
Configuration for optimizer.
megatron/core/optimizer/optimizer_config.py:10
↓ 5 callersClassPromptConfig
Config options for different prompt formats.
megatron/training/tokenizer/multimodal_tokenizer.py:44
↓ 5 callersClassSequentialMLP
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 callersClassVitBackbone
Vision Transformer Model.
megatron/legacy/model/vision/vit_backbone.py:130
↓ 5 callersClass_NullTokenizer
megatron/training/tokenizer/tokenizer.py:774
↓ 4 callersClassAsyncCallsQueue
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 callersClassBlock
megatron/legacy/model/vision/mit_backbone.py:125
↓ 4 callersClassClassificationTransform
megatron/legacy/data/vit_dataset.py:50
↓ 4 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
megatron/legacy/model/transformer.py:75
↓ 4 callersClassInferenceParams
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 callersClassMLP
Linear Embedding
megatron/legacy/model/vision/inpainting.py:70
↓ 4 callersClassMLP
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 callersClassMLP
Linear Embedding
tasks/vision/segmentation/seg_heads.py:55
↓ 4 callersClassModelParallelConfig
Base configuration for Megatron Core The initialization function has an argument for each parameter.
megatron/core/model_parallel_config.py:10
↓ 4 callersClassOverlapPatchEmbed
Image to Patch Embedding
megatron/legacy/model/vision/mit_backbone.py:165
↓ 4 callersClassParallelTransformer
Transformer class.
megatron/legacy/model/transformer.py:1370
↓ 4 callersClassRange
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 callersClassStragglerDetector
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 callersClassDistributedDataParallelConfig
Configuration for DistributedDataParallel.
megatron/core/distributed/distributed_data_parallel_config.py:8
↓ 3 callersClassEncoder
tools/preprocess_data.py:48
↓ 3 callersClassGPTInferenceWrapper
Inference wrapper for GPT model
megatron/core/inference/model_inference_wrappers/gpt/gpt_inference_wrapper.py:16
↓ 3 callersClassGPTToTextDataset
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 callersClassGaussianBlur
Apply Gaussian Blur to the PIL image.
megatron/legacy/data/vit_dataset.py:15
↓ 3 callersClassImageFolder
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 callersClassInferenceRequest
Class for one inference request Containing relevant data for an inference request
megatron/core/inference/inference_request.py:22
↓ 3 callersClassMambaMixer
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 callersClassMegatronServer
megatron/inference/text_generation_server.py:223
↓ 3 callersClassMockLoadStrategy
tests/unit_tests/dist_checkpointing/test_fully_parallel.py:44
↓ 3 callersClassMultimodalProjector
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 callersClassMultimodalTokenizer
Multimodal Tokenizer.
megatron/training/tokenizer/multimodal_tokenizer.py:60
↓ 3 callersClassOpenRetreivalDataStore
Serializable data structure for holding data for blocks -- embeddings and necessary metadata for Retriever
megatron/legacy/data/realm_index.py:18
↓ 3 callersClassPackedSeqParams
parameters to TEDotProductAttention and fused rope kernels for the `thd` (packed) sequence format
megatron/core/packed_seq_params.py:8
↓ 3 callersClassParseError
Base class for all parsing related errors.
tools/retro/config_utils.py:32
↓ 3 callersClassPretrainedBertModel
BERT-based encoder for queries or contexts used for learned information retrieval.
megatron/legacy/model/biencoder_model.py:246
↓ 3 callersClassRaceDataset
tasks/race/data.py:19
↓ 3 callersClassRankGenerator
A class for generating rank groups for different modes of parallelism.
megatron/core/parallel_state.py:288
↓ 3 callersClassS3Config
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 callersClassShardedTensor
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 callersClassT5Model
T5 Language model.
megatron/legacy/model/t5_model.py:64
↓ 3 callersClassTEDotProductAttention
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 callersClassTRTLLMHelper
TRTLLM Helper class to convert export and build TRTLLM model.
megatron/core/export/trtllm/trtllm_helper.py:31
↓ 3 callersClassTorchDistSaveShardedStrategy
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 callersClass_BertWordPieceTokenizer
Original BERT wordpiece tokenizer.
megatron/training/tokenizer/tokenizer.py:180
↓ 3 callersClass_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 callersClassCLIPViTModel
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 callersClassCaller
Class capturing the code and rank calling a function.
megatron/core/rerun_state_machine.py:43
↓ 2 callersClassChainedOptimizer
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 callersClassCheckpointingConfig
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 callersClassCityscapes
`Cityscapes <http://www.cityscapes-dataset.com/>`_ Dataset. Args: root (string): Root directory of dataset where directory ``leftImg8bit``
tasks/vision/segmentation/cityscapes.py:47
↓ 2 callersClassColumnParallelLinear
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 callersClassCtx
tests/unit_tests/tensor_parallel/test_mappings.py:112
↓ 2 callersClassCudaRNGStatesTracker
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 callersClassCustomHandler
Custom handler to filter out logging from code outside of Megatron Core, and dump to stdout.
megatron/training/log_handler.py:9
↓ 2 callersClassDINOHead
megatron/legacy/model/vision/dino.py:82
↓ 2 callersClassDistributedTRTLLMModelWeightsConverter
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 callersClassDocstringMeta
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