MCPcopy Create free account

hub / github.com/JieShibo/MoLE / types & classes

Types & classes358 in github.com/JieShibo/MoLE

↓ 42 callersClassModuleSpec
This is a Module Specification dataclass. Specification defines the location of the module (to import dynamically) or the imported module its
pretrain/megatron/core/transformer/spec_utils.py:11
↓ 25 callersClassCheckpointingException
Base checkpointing related exception
pretrain/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
pretrain/megatron/legacy/data/autoaugment.py:113
↓ 11 callersClassMLPSubmodules
pretrain/megatron/core/transformer/mlp.py:26
↓ 9 callersClassSelfAttentionSubmodules
pretrain/megatron/core/transformer/attention.py:33
↓ 9 callersClassTransformerLayerSubmodules
pretrain/megatron/core/transformer/transformer_layer.py:21
↓ 7 callersClassTransformerBlockSubmodules
pretrain/megatron/core/transformer/transformer_block.py:64
↓ 6 callersClassCrossAttentionSubmodules
pretrain/megatron/core/transformer/attention.py:42
↓ 6 callersClassTransformerBlock
Transformer class.
pretrain/megatron/core/transformer/transformer_block.py:91
↓ 5 callersClassFusedScaleMaskSoftmax
fused operation: scaling + mask + softmax Args: input_in_fp16: flag to indicate if input in fp16 data format. input_in_bf16:
pretrain/megatron/legacy/model/fused_softmax.py:102
↓ 5 callersClassShardedObject
Represents a mapping between a local object and a global object. Global object is assumed to consist of many local objects distributed betwee
pretrain/megatron/core/dist_checkpointing/mapping.py:229
↓ 4 callersClassBlock
pretrain/megatron/legacy/model/vision/mit_backbone.py:125
↓ 4 callersClassClassificationTransform
pretrain/megatron/legacy/data/vit_dataset.py:50
↓ 4 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
pretrain/megatron/legacy/model/transformer.py:59
↓ 4 callersClassIndexedDataset
The low-level interface dataset class Args: path_prefix (str): The index (.idx) and data (.bin) prefix multimodal (bool, optiona
pretrain/megatron/core/datasets/indexed_dataset.py:334
↓ 4 callersClassMLP
Linear Embedding
pretrain/megatron/legacy/model/vision/inpainting.py:70
↓ 4 callersClassMoleRMSNorm
modeling_mole.py:54
↓ 4 callersClassOverlapPatchEmbed
Image to Patch Embedding
pretrain/megatron/legacy/model/vision/mit_backbone.py:165
↓ 4 callersClassParallelTransformer
Transformer class.
pretrain/megatron/legacy/model/transformer.py:1379
↓ 4 callersClassRange
A range represents a start and end points for indexing a shard from a full tensor.
pretrain/megatron/core/optimizer/distrib_optimizer.py:24
↓ 4 callersClassRotaryEmbedding
Rotary Embedding for language model. Args: kv_channels (int): Projection weights dimension in multi-head attention. Obtained from transfo
pretrain/megatron/core/models/common/embeddings/rotary_pos_embedding.py:48
↓ 4 callersClassVitBackbone
Vision Transformer Model.
pretrain/megatron/legacy/model/vision/vit_backbone.py:130
↓ 3 callersClassDenseModel
modeling_dense.py:709
↓ 3 callersClassDenseRMSNorm
modeling_dense.py:54
↓ 3 callersClassForwardStep
Forward step function with all the communications. We use a class here to hide the inference parameters from the outside caller.
pretrain/megatron/inference/text_generation/forward_step.py:16
↓ 3 callersClassGPTToTextDataset
Dataset to convert GPT tokens to text. Args: gpt_dataset (MultiSplitGPTDataset): GPT dataset, which outputs GPT token samples. gp
pretrain/megatron/core/datasets/retro/utils.py:75
↓ 3 callersClassGaussianBlur
Apply Gaussian Blur to the PIL image.
pretrain/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
pretrain/megatron/legacy/data/image_folder.py:262
↓ 3 callersClassLanguageModelEmbedding
Language model embeddings. Args: config (TransformerConfig): config object with all necessary configs for TransformerBlock vocab_
pretrain/megatron/core/models/common/embeddings/language_model_embedding.py:13
↓ 3 callersClassMoeModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MoeDecoderLayer`] Args: config: MoeConfig
modeling_moe.py:729
↓ 3 callersClassMoeRMSNorm
modeling_moe.py:54
↓ 3 callersClassMoleModel
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`MoleDecoderLayer`] Args: config: MoleConfig
modeling_mole.py:721
↓ 3 callersClassMoleModel
modeling_mole_rep.py:720
↓ 3 callersClassMoleRMSNorm
modeling_mole_rep.py:54
↓ 3 callersClassPretrainedBertModel
BERT-based encoder for queries or contexts used for learned information retrieval.
pretrain/megatron/legacy/model/biencoder_model.py:245
↓ 2 callersClassCheckpointingConfig
Documents backends used in the checkpoint. Checkpoint config keeps track of formats used for storing the sharded tensors (sharded_backend) a
pretrain/megatron/core/dist_checkpointing/core.py:20
↓ 2 callersClassDINOHead
pretrain/megatron/legacy/model/vision/dino.py:82
↓ 2 callersClassGroupedMLP
An efficient implementation of the Experts layer using CUTLASS GroupedGEMM. This class is designed to execute multiple experts in parallel, t
pretrain/megatron/core/transformer/moe/experts.py:26
↓ 2 callersClassICTDataset
Dataset containing sentences and their blocks for an inverse cloze task.
pretrain/megatron/legacy/data/ict_dataset.py:48
↓ 2 callersClassIREncoderBertModel
BERT-based encoder for queries or blocks used for learned information retrieval.
pretrain/megatron/legacy/model/realm_model.py:147
↓ 2 callersClassIdentityLayer
pretrain/megatron/legacy/mpu/tests/commons.py:12
↓ 2 callersClassIdentityLayer2D
pretrain/megatron/legacy/mpu/tests/test_layers.py:163
↓ 2 callersClassIdentityLayer3D
pretrain/megatron/legacy/mpu/tests/test_layers.py:305
↓ 2 callersClassImageNetPolicy
Definition of an ImageNetPolicy. Implements a fixed AutoAugment data augmentation policy targeted at ImageNet training by randomly applying a
pretrain/megatron/legacy/data/autoaugment.py:49
↓ 2 callersClassInpaintingTransform
pretrain/megatron/legacy/data/vit_dataset.py:79
↓ 2 callersClassLocalNonpersitentObject
Object that should not be stored in a checkpoint, but restored locally. Wrapping any object inside the state dict with LocalNonpersitentObject
pretrain/megatron/core/dist_checkpointing/mapping.py:212
↓ 2 callersClassMegatronPretrainingSampler
pretrain/megatron/legacy/data/data_samplers.py:54
↓ 2 callersClassMoleMLP
modeling_mole.py:165
↓ 2 callersClassMultiCropWrapper
Perform forward pass separately on each resolution input. The inputs corresponding to a single resolution are clubbed and single forward
pretrain/megatron/legacy/model/vision/dino.py:118
↓ 2 callersClassOpenRetreivalDataStore
Serializable data structure for holding data for blocks -- embeddings and necessary metadata for Retriever
pretrain/megatron/legacy/data/realm_index.py:17
↓ 2 callersClassParallelAttention
Parallel self-attention layer abstract class. Self-attention layer takes input with size [s, b, h] and returns output of the same size.
pretrain/megatron/legacy/model/transformer.py:496
↓ 2 callersClassParallelMLP
MLP. MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform nonlinear transformation, and project the s
pretrain/megatron/legacy/model/transformer.py:81
↓ 2 callersClassRandomSeedDataset
pretrain/megatron/legacy/data/data_samplers.py:103
↓ 2 callersClassShardedTensor
Represents a mapping between a local tensor and a global tensor. Global tensor is assumed to consist of many local tensors distributed betwee
pretrain/megatron/core/dist_checkpointing/mapping.py:38
↓ 2 callersClassShardedTensorFactory
Allows to apply transformations to tensors before/after serialization. The essence of those transformations is that they can be applied to o
pretrain/megatron/core/dist_checkpointing/mapping.py:265
↓ 2 callersClassTENorm
A conditional wrapper to initialize an instance of Transformer-Engine's `LayerNorm` or `RMSNorm` based on input
pretrain/megatron/core/transformer/custom_layers/transformer_engine.py:45
↓ 2 callersClass_BertWordPieceTokenizer
Original BERT wordpiece tokenizer.
pretrain/megatron/training/tokenizer/tokenizer.py:186
↓ 2 callersClass_IndexReader
Object class to read the index (.idx) file Args: idx_path (str): The path to the index file multimodal (bool): Whether the datas
pretrain/megatron/core/datasets/indexed_dataset.py:213
↓ 2 callersClassmit_b5_avg
pretrain/megatron/legacy/model/vision/mit_backbone.py:409
↓ 1 callersClassAttention
pretrain/megatron/legacy/model/vision/mit_backbone.py:56
↓ 1 callersClassAttnMaskType
pretrain/megatron/core/transformer/enums.py:23
↓ 1 callersClassBasicLayer
A basic Swin Transformer layer for one stage. Args: dim (int): Number of input channels. input_resolution (tuple[int]): Input resu
pretrain/megatron/legacy/model/vision/esvit_swin_backbone.py:387
↓ 1 callersClassBasicLayer
A basic Swin Transformer layer for one stage. Args: dim (int): Number of input channels. input_resolution (tuple[int]): Input re
pretrain/megatron/legacy/model/vision/swin_backbone.py:352
↓ 1 callersClassBasicTokenizer
Runs basic tokenization (punctuation splitting, lower casing, etc.).
pretrain/megatron/training/tokenizer/bert_tokenization.py:217
↓ 1 callersClassBeamHypotheses
pretrain/megatron/inference/text_generation/beam_utils.py:19
↓ 1 callersClassBertLMHead
Masked LM head for Bert Args: config: TransformerConfig object mpu_vocab_size: model parallel size of vocabulary. paralle
pretrain/megatron/legacy/model/bert_model.py:46
↓ 1 callersClassBertLMHead
Masked LM head for Bert. Args: hidden_size: hidden size config (TransformerConfig): TransformerConfig object
pretrain/megatron/core/models/bert/bert_lm_head.py:10
↓ 1 callersClassBiEncoderModel
Bert-based module for Biencoder model.
pretrain/megatron/legacy/model/biencoder_model.py:64
↓ 1 callersClassBlendedMegatronDatasetBuilder
Builder class for the BlendedDataset and MegatronDataset classes Args: cls (Type[MegatronDataset]): The class to instantiate, must inheri
pretrain/megatron/core/datasets/blended_megatron_dataset_builder.py:27
↓ 1 callersClassBlockSampleData
A struct for fully describing a fixed-size block of data as used in REALM :param start_idx: for first sentence of the block :param end_idx: f
pretrain/megatron/legacy/data/realm_dataset_utils.py:75
↓ 1 callersClassBlockSampleData
A struct for fully describing a fixed-size block of data as used in REALM :param start_idx: for first sentence of the block :param end_idx: f
pretrain/megatron/legacy/data/biencoder_dataset_utils.py:85
↓ 1 callersClassBlockSamplesMapping
pretrain/megatron/legacy/data/realm_dataset_utils.py:96
↓ 1 callersClassBlockSamplesMapping
pretrain/megatron/legacy/data/biencoder_dataset_utils.py:106
↓ 1 callersClassBucket
Bucket to keep track of a subset of the model's gradients. Provides functionality to register when params in the bucket have grads ready to b
pretrain/megatron/core/distributed/param_and_grad_buffer.py:33
↓ 1 callersClassCLIPViTModel
CLIP ViT vision model. Args: transformer_config (TransformerConfig): Transformer config transformer_layer_spec (ModuleSpec): Spec
pretrain/megatron/core/models/vision/clip_vit_model.py:17
↓ 1 callersClassChainedOptimizer
ChainedOptimizer is designed for a collection of optimizers. These optimizers are responsible for different parts of multiple models for
pretrain/megatron/core/optimizer/optimizer.py:694
↓ 1 callersClassConstantGradScaler
Constant grad scaler (loss scale is never adjusted regardless of NaNs seen in gradients).
pretrain/megatron/core/optimizer/grad_scaler.py:38
↓ 1 callersClassConstantNumMicroBatches
pretrain/megatron/training/microbatches.py:59
↓ 1 callersClassCoreAttention
pretrain/megatron/legacy/model/transformer.py:299
↓ 1 callersClassCrossAttention
Cross-attention layer class Cross-attention layer takes input with size [s, b, h] and context with size [s, b, h] and returns output of the s
pretrain/megatron/core/transformer/attention.py:515
↓ 1 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`.
pretrain/megatron/core/tensor_parallel/random.py:75
↓ 1 callersClassCustomHandler
Custom handler to filter out logging from code outside of Megatron Core, and dump to stdout.
pretrain/megatron/training/log_handler.py:9
↓ 1 callersClassDBDataset
Dataset for iterating chunks. Args: db_path (str): Path of HDF5-format chunk database. indexed_datasets (List[IndexedDataset]
pretrain/megatron/core/datasets/retro/db/dataset.py:18
↓ 1 callersClassDINOLoss
pretrain/megatron/legacy/model/vision/dino.py:23
↓ 1 callersClassDWConv
pretrain/megatron/legacy/model/vision/mit_backbone.py:344
↓ 1 callersClassDenseDecoderLayer
modeling_dense.py:605
↓ 1 callersClassDenseDynamicNTKScalingRotaryEmbedding
modeling_dense.py:134
↓ 1 callersClassDenseLinearScalingRotaryEmbedding
modeling_dense.py:126
↓ 1 callersClassDenseMLP
modeling_dense.py:165
↓ 1 callersClassDenseRotaryEmbedding
modeling_dense.py:71
↓ 1 callersClassDinoTransform
pretrain/megatron/legacy/data/vit_dataset.py:148
↓ 1 callersClassDistributedOptimizer
pretrain/megatron/core/optimizer/distrib_optimizer.py:45
↓ 1 callersClassDummyTimer
pretrain/megatron/core/timers.py:33
↓ 1 callersClassDynamicGradScaler
Grad scaler with dynamic scale that gets adjusted during training. Reduces loss scale by `backoff_factor` if `hysteresis` number of NaNs are
pretrain/megatron/core/optimizer/grad_scaler.py:53
↓ 1 callersClassEmbedding
Language model embeddings. Args: hidden_size: hidden size vocab_size: vocabulary size max_sequence_length: maximum size o
pretrain/megatron/legacy/model/language_model.py:120
↓ 1 callersClassFP32Optimizer
Float32 optimizer. Args: optimizer (torch.optim.Optimizer): base optimizer such as Adam or SGD. config (OptimizerConfig): configu
pretrain/megatron/core/optimizer/optimizer.py:606
↓ 1 callersClassFileSystemWriterAsync
Async-enabled implementation of FileSystemWriter using file IO. This class doesn't spawn the async process itself, relies on the external as
pretrain/megatron/core/dist_checkpointing/strategies/filesystem_async.py:26
↓ 1 callersClassFlashSelfAttention
Implement the scaled dot product attention with softmax. Arguments --------- softmax_scale: The temperature to use for the softmax att
pretrain/megatron/legacy/model/transformer.py:434
↓ 1 callersClassFloat16Module
pretrain/megatron/legacy/model/module.py:164
↓ 1 callersClassFloat16OptimizerWithFloat16Params
Float16 optimizer for fp16 and bf16 data types. Args: optimizer (torch.optim.Optimizer): base optimizer such as Adam or SGD. conf
pretrain/megatron/core/optimizer/optimizer.py:376
next →1–100 of 358, ranked by callers