Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DevSinghSachan/art
/ types & classes
Types & classes
88 in github.com/DevSinghSachan/art
⨍
Functions
712
◇
Types & classes
88
↓ 5 callers
Class
OpenRetreivalDataStore
Serializable data structure for holding data for blocks -- embeddings and necessary metadata for ART
megatron/data/art_index.py:16
↓ 4 callers
Class
IndexBuilder
megatron/indexer.py:81
↓ 4 callers
Class
OpenRetrievalEvaluator
tasks/dense_retriever/supervised_training/evaluation/evaluate.py:19
↓ 3 callers
Class
DistributedBatchSampler
Similar to normal implementation of distributed sampler, except implementation is at the batch sampler level, instead of just the sampler leve
megatron/data/samplers.py:78
↓ 2 callers
Class
DistributedBruteForceIndex
megatron/data/art_index.py:200
↓ 2 callers
Class
DynamicLossScaler
Class that manages dynamic loss scaling. It is recommended to use :class:`DynamicLossScaler` indirectly, by supplying ``dynamic_loss_scale
megatron/fp16/loss_scaler.py:76
↓ 2 callers
Class
IndexedDataset
Loader for IndexedDataset
megatron/data/indexed_dataset.py:127
↓ 2 callers
Class
ParallelAttention
Parallel self-attention layer abstract class. Self-attention layer takes input with size [b, s, h] and returns output of the same size.
megatron/model/transformer.py:111
↓ 2 callers
Class
ParallelTransformer
Transformer class.
megatron/model/transformer.py:566
↓ 2 callers
Class
PretrainedBertModel
megatron/model/dualencoder_model.py:148
↓ 2 callers
Class
Tokens
A class to represent a list of tokenized text.
tasks/dense_retriever/supervised_training/evaluation/tokenizers.py:21
↓ 2 callers
Class
_BertWordPieceTokenizer
Original BERT wordpiece tokenizer.
megatron/tokenizer/tokenizer.py:135
↓ 1 callers
Class
ARTModel
megatron/model/art_model.py:19
↓ 1 callers
Class
AnnealingLR
Anneals the learning rate.
megatron/learning_rates.py:23
↓ 1 callers
Class
BasicTokenizer
Runs basic tokenization (punctuation splitting, lower casing, etc.).
megatron/tokenizer/bert_tokenization.py:217
↓ 1 callers
Class
BertLMHead
Masked LM head for Bert Arguments: mpu_vocab_size: model parallel size of vocabulary. hidden_size: hidden size init_metho
megatron/model/bert_model.py:61
↓ 1 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/mpu/random.py:127
↓ 1 callers
Class
CustomDataLoader
megatron/indexer.py:17
↓ 1 callers
Class
CustomDataLoader
tasks/dense_retriever/supervised_training/train_dense_retriever.py:30
↓ 1 callers
Class
CustomDataLoader
tasks/dense_retriever/supervised_training/evaluation/data.py:34
↓ 1 callers
Class
CustomDataLoader
tasks/dense_retriever/zero_shot_training/train.py:22
↓ 1 callers
Class
DualEncoderModel
megatron/model/dualencoder_model.py:28
↓ 1 callers
Class
Embedding
Language model embeddings. Arguments: hidden_size: hidden size vocab_size: vocabulary size max_sequence_length: maximum s
megatron/model/language_model.py:98
↓ 1 callers
Class
Encoder
tools/create_evidence_indexed_dataset_t0.py:22
↓ 1 callers
Class
Encoder
tools/create_evidence_indexed_dataset.py:33
↓ 1 callers
Class
EvidenceDatasetPreTokenized
megatron/data/pretokenized_evidence.py:28
↓ 1 callers
Class
FP16_Module
megatron/fp16/fp16.py:68
↓ 1 callers
Class
FP16_Optimizer
:class:`FP16_Optimizer` is designed to wrap an existing PyTorch optimizer, and manage static or dynamic loss scaling and master weights in a
megatron/fp16/fp16.py:90
↓ 1 callers
Class
FaissMIPSIndex
Wrapper object for a BlockData which similarity search via FAISS under the hood
megatron/data/art_index.py:103
↓ 1 callers
Class
FusedScaleMaskSoftmax
fused operation: scaling + mask + softmax Arguments: input_in_fp16: flag to indicate if input in fp16 data format.
megatron/model/fused_softmax.py:74
↓ 1 callers
Class
IdentitySplitter
tools/create_evidence_indexed_dataset_t0.py:18
↓ 1 callers
Class
IdentitySplitter
tools/create_evidence_indexed_dataset.py:29
↓ 1 callers
Class
IndexedCachedDataset
megatron/data/indexed_dataset.py:211
↓ 1 callers
Class
IndexedDatasetBuilder
megatron/data/indexed_dataset.py:264
↓ 1 callers
Class
LossScaler
Class that manages a static loss scale. This class is intended to interact with :class:`FP16_Optimizer`, and should not be directly manipu
megatron/fp16/loss_scaler.py:33
↓ 1 callers
Class
MMapIndexedDataset
megatron/data/indexed_dataset.py:335
↓ 1 callers
Class
MMapIndexedDatasetBuilder
megatron/data/indexed_dataset.py:539
↓ 1 callers
Class
MemoryBuffer
Contiguous memory buffer. Allocate a contiguous memory of type `dtype` and size `numel`. It is used to reduce memory fragmentation. Usage
megatron/memory.py:37
↓ 1 callers
Class
OpenRetrievalEvidenceDataset
Open Retrieval Evidence dataset class.
megatron/data/orqa_wiki_dataset.py:118
↓ 1 callers
Class
ParallelMLP
MLP. MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform nonlinear transformation, and project the s
megatron/model/transformer.py:58
↓ 1 callers
Class
ParallelTransformerLayer
A single transformer layer. Transformer layer takes input with size [b, s, h] and returns an output of the same size.
megatron/model/transformer.py:422
↓ 1 callers
Class
PolynomialNormalization
Dividing by the length (raised to some power (default 0.6))
megatron/model/search_strategy.py:20
↓ 1 callers
Class
Pooler
Pooler layer. Pool hidden states of a specific token (for example start of the sequence) and add a linear transformation followed by a tanh.
megatron/model/language_model.py:73
↓ 1 callers
Class
PreComputedEvidenceDocsRetriever
megatron/model/art_model.py:283
↓ 1 callers
Class
QADataset
Open-Retrieval Question Answer pairs dataset.
tasks/dense_retriever/supervised_training/evaluation/data.py:156
↓ 1 callers
Class
SimpleTokenizer
tasks/dense_retriever/supervised_training/evaluation/tokenizers.py:153
↓ 1 callers
Class
T5LMHead
Masked LM head for T5 Arguments: mpu_vocab_size: model parallel size of vocabulary. hidden_size: hidden size init_method:
megatron/model/t5_model.py:54
↓ 1 callers
Class
Timers
Group of timers.
megatron/global_vars.py:234
↓ 1 callers
Class
TransformerLanguageModel
Transformer language model. Arguments: transformer_hparams: transformer hyperparameters attention_mask_func: a function that take
megatron/model/language_model.py:246
↓ 1 callers
Class
WikiTitleDocMap
Open Retrieval Evidence dataset class.
tools/inverted_title_index.py:14
↓ 1 callers
Class
WordpieceTokenizer
Runs WordPiece tokenziation.
megatron/tokenizer/bert_tokenization.py:332
↓ 1 callers
Class
_Timer
Timer.
megatron/global_vars.py:189
↓ 1 callers
Class
_Writer
megatron/data/indexed_dataset.py:341
↓ 1 callers
Class
tofp16
Utility module that implements:: def forward(self, input): return input.half()
megatron/fp16/fp16util.py:27
Class
AbstractTokenizer
Abstract class for tokenizer.
megatron/tokenizer/tokenizer.py:77
Class
Add
megatron/fused_kernels/scaled_upper_triang_masked_softmax.h:36
Class
Add
megatron/fused_kernels/scaled_masked_softmax.h:36
Class
BeamSearch
megatron/model/search_strategy.py:124
Class
BertModel
Bert Language model.
megatron/model/bert_model.py:104
Class
CheckpointFunction
This function is adapted from torch.utils.checkpoint with two main changes: 1) torch.cuda.set_rng_state is replaced with `_set_cuda_
megatron/mpu/random.py:245
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/mpu/layers.py:170
Class
Dataset
tasks/dense_retriever/supervised_training/train_data_utils.py:226
Class
DistributedDataParallel
megatron/model/distributed.py:26
Class
FP16Model
Convert model to half precision in a batchnorm-safe way.
megatron/fp16/fp16util.py:91
Class
FullTokenizer
Runs end-to-end tokenziation.
megatron/tokenizer/bert_tokenization.py:161
Class
GeLUFunction
megatron/model/fused_bias_gelu.py:47
Class
Index
megatron/data/indexed_dataset.py:336
Class
Max
megatron/fused_kernels/scaled_upper_triang_masked_softmax.h:43
Class
Max
megatron/fused_kernels/scaled_masked_softmax.h:43
Class
MegatronModule
Megatron specific extentions of torch Module.
megatron/module.py:21
Class
OpenQADataset
tasks/dense_retriever/zero_shot_training/train_data_utils.py:68
Class
OpenRetrievalAbstractDataset
Open Retrieval base dataset class.
tasks/dense_retriever/supervised_training/train_data_utils.py:130
Class
RandomSampler
Based off of pytorch RandomSampler and DistributedSampler. Essentially a RandomSampler, but this class lets the user set an epoch like Distrib
megatron/data/samplers.py:22
Class
RingMemBuffer
A ring of memory buffers.
megatron/memory.py:129
Class
RowParallelLinear
Linear layer with row parallelism. The linear layer is defined as Y = XA + b. A is parallelized along its first dimension and X along its sec
megatron/mpu/layers.py:265
Class
SampleOrGreedySearch
megatron/model/search_strategy.py:181
Class
ScaledMaskedSoftmax
Fused operation which performs following three operations in sequence 1. Scale the tensor. 2. Apply the mask. 3. Perform
megatron/model/fused_softmax.py:46
Class
ScaledUpperTriangMaskedSoftmax
Fused operation which performs following three operations in sequence 1. Scale the tensor. 2. Apply upper triangular mask (typi
megatron/model/fused_softmax.py:18
Class
SpacyTokenizer
tasks/dense_retriever/supervised_training/evaluation/tokenizers.py:195
Class
T5Model
T5 Language model.
megatron/model/t5_model.py:84
Class
Tokenizer
Base tokenizer class. Tokenizers implement tokenize, which should return a Tokens class.
tasks/dense_retriever/supervised_training/evaluation/tokenizers.py:138
Class
VocabParallelEmbedding
Embedding parallelized in the vocabulary dimension. This is mainly adapted from torch.nn.Embedding and all the default values are kept. A
megatron/mpu/layers.py:98
Class
VocabUtility
Split the vocabulary into `world_size` chunks amd return the first and last index of the vocabulary belonging to the `rank` partition:
megatron/mpu/utils.py:54
Class
_CopyToModelParallelRegion
Pass the input to the model parallel region.
megatron/mpu/mappings.py:76
Class
_GatherFromModelParallelRegion
Gather the input from model parallel region and concatinate.
megatron/mpu/mappings.py:124
Class
_ReduceFromModelParallelRegion
All-redcue the input from the model parallel region.
megatron/mpu/mappings.py:92
Class
_ScatterToModelParallelRegion
Split the input and keep only the corresponding chuck to the rank.
megatron/mpu/mappings.py:108
Class
_VocabParallelCrossEntropy
megatron/mpu/cross_entropy.py:25