Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/THUDM/GLM
/ types & classes
Types & classes
200 in github.com/THUDM/GLM
⨍
Functions
1,117
◇
Types & classes
200
↓ 46 callers
Class
CommandToken
data_utils/tokenization.py:154
↓ 38 callers
Class
InputExample
A raw input example consisting of one or two segments of text and a label
tasks/data_utils.py:43
↓ 9 callers
Class
Tokenization
Tokenization object to hold tokenization, (processed text),and original text. Can hold tokenization as Ids or tokens. It also holds
data_utils/tokenization.py:56
↓ 8 callers
Class
LazyLoader
Arguments: path: path to directory where array entries are concatenated into one big string file and the .len file are locate
data_utils/lazy_loader.py:122
↓ 7 callers
Class
BertModel
BERT model ("Bidirectional Embedding Representations from a Transformer"). Params: config: a BertConfig class instance with the configura
model/modeling_bert.py:852
↓ 7 callers
Class
TypeToken
data_utils/tokenization.py:190
↓ 6 callers
Class
LazyWriter
data_utils/lazy_loader.py:62
↓ 5 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, ..
mpu/layers.py:179
↓ 5 callers
Class
SuperGlueDataset
tasks/superglue/dataset.py:130
↓ 4 callers
Class
BertLayerNorm
model/modeling_bert.py:271
↓ 4 callers
Class
FakeDataloader
tasks/data_utils.py:349
↓ 3 callers
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
mpu/layers.py:246
↓ 2 callers
Class
AnnealingLR
Anneals the learning rate from start to zero along a cosine curve.
learning_rates.py:22
↓ 2 callers
Class
BeamSearchScorer
r""" :class:`transformers.BeamScorer` implementing standard beam search decoding. Adapted in part from `Facebook's XLM beam search code <
generation_utils.py:141
↓ 2 callers
Class
BertLMPredictionHead
model/modeling_bert.py:611
↓ 2 callers
Class
BlankLMDataset
tasks/seq2seq/dataset.py:651
↓ 2 callers
Class
ConstructBlockStrategy
blocklm_utils.py:30
↓ 2 callers
Class
CustomizationDataset
tasks/seq2seq/dataset.py:779
↓ 2 callers
Class
DynamicLossScaler
Class that manages dynamic loss scaling. It is recommended to use :class:`DynamicLossScaler` indirectly, by supplying ``dynamic_loss_scale
fp16/loss_scaler.py:63
↓ 2 callers
Class
ExtractionDataset
tasks/seq2seq/dataset.py:553
↓ 2 callers
Class
GLMForSequenceClassification
model/downstream.py:148
↓ 2 callers
Class
IdentityLayer
mpu/tests/commons.py:25
↓ 2 callers
Class
IdentityLayer2D
mpu/tests/test_layers.py:178
↓ 2 callers
Class
IdentityLayer3D
mpu/tests/test_layers.py:319
↓ 2 callers
Class
LMDataset
tasks/language_model/dataset.py:12
↓ 2 callers
Class
MultiTaskDataset
configure_data.py:35
↓ 2 callers
Class
ParallelMLP
MLP for GPT2. MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform gelu transformation, and project the
mpu/transformer.py:343
↓ 2 callers
Class
ParallelSelfAttention
Parallel self-attention layer for GPT2. Self-attention layer takes input with size [b, s, h] where b is the batch size, s is the sequence len
mpu/transformer.py:154
↓ 2 callers
Class
Seq2SeqDataset
tasks/seq2seq/dataset.py:420
↓ 2 callers
Class
Timers
Group of timers.
utils.py:113
↓ 2 callers
Class
XStanceProcessor
Processor for the X-Stance data set.
tasks/superglue/dataset.py:1115
↓ 1 callers
Class
BasicTokenizer
Runs basic tokenization (punctuation splitting, lower casing, etc.).
data_utils/wordpiece.py:176
↓ 1 callers
Class
BeamHypotheses
generation_utils.py:344
↓ 1 callers
Class
BertAttention
model/modeling_bert.py:437
↓ 1 callers
Class
BertConfig
Configuration class to store the configuration of a `BertModel`.
model/modeling_bert.py:166
↓ 1 callers
Class
BertEmbeddings
Construct the embeddings from word, position and token_type embeddings.
model/modeling_bert.py:287
↓ 1 callers
Class
BertEncoder
model/modeling_bert.py:526
↓ 1 callers
Class
BertIntermediate
model/modeling_bert.py:456
↓ 1 callers
Class
BertLayer
model/modeling_bert.py:512
↓ 1 callers
Class
BertOnlyMLMHead
model/modeling_bert.py:652
↓ 1 callers
Class
BertOnlyNSPHead
model/modeling_bert.py:662
↓ 1 callers
Class
BertOutput
model/modeling_bert.py:477
↓ 1 callers
Class
BertPooler
model/modeling_bert.py:575
↓ 1 callers
Class
BertPreTrainingHeads
model/modeling_bert.py:672
↓ 1 callers
Class
BertPredictionHeadTransform
model/modeling_bert.py:590
↓ 1 callers
Class
BertSelfAttention
model/modeling_bert.py:350
↓ 1 callers
Class
BertSelfOutput
model/modeling_bert.py:402
↓ 1 callers
Class
BertSentencepairDataset
Dataset containing sentencepairs for BERT training. Each index corresponds to a randomly generated sentence pair. Arguments: ds (Data
data_utils/datasets.py:840
↓ 1 callers
Class
BertWordPieceTokenizer
Loads a pretrained WordPiece tokenizer from `cache_dir` for tokenization in BERT training. Default to bert-large-uncased tokenizer.
data_utils/tokenization.py:784
↓ 1 callers
Class
BlankLMEvaluater
tasks/seq2seq/evaluate.py:409
↓ 1 callers
Class
BlockDataset
data_utils/datasets.py:570
↓ 1 callers
Class
CMRCProcessor
tasks/seq2seq/dataset.py:108
↓ 1 callers
Class
ChineseSPTokenizer
data_utils/tokenization.py:1137
↓ 1 callers
Class
ConcatDataset
Dataset to concatenate multiple datasets. Purpose: useful to assemble different existing datasets, possibly large-scale datasets as the c
data_utils/datasets.py:57
↓ 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`.
mpu/random.py:119
↓ 1 callers
Class
DataConfig
configure_data.py:95
↓ 1 callers
Class
DecoderEvaluater
tasks/seq2seq/evaluate.py:250
↓ 1 callers
Class
Encoder
data_utils/sp_tokenizer.py:34
↓ 1 callers
Class
Encoder_SP
data_utils/sp_tokenizer.py:98
↓ 1 callers
Class
FP16_Module
fp16/fp16.py:67
↓ 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
fp16/fp16.py:86
↓ 1 callers
Class
GLMForMultiTokenCloze
model/downstream.py:8
↓ 1 callers
Class
GLMForMultiTokenClozeFast
model/downstream.py:56
↓ 1 callers
Class
GLMForSingleTokenCloze
model/downstream.py:114
↓ 1 callers
Class
GLMModel
GLM Language model. The output of the forward method are the logits (parallel or serial depending on the `parallel_output` flag.
model/modeling_glm.py:40
↓ 1 callers
Class
GPT2BPETokenizer
data_utils/tokenization.py:933
↓ 1 callers
Class
GPT2Dataset
data_utils/datasets.py:715
↓ 1 callers
Class
LambadaDataset
tasks/language_model/dataset.py:73
↓ 1 callers
Class
LogitsProcessorList
This class can be used to create a list of :class:`~transformers.LogitsProcessor` or :class:`~transformers.LogitsWarper` to subsequently proc
generation_utils.py:402
↓ 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
fp16/loss_scaler.py:26
↓ 1 callers
Class
MinLengthLogitsProcessor
r""" :class:`transformers.LogitsProcessor` enforcing a min-length by setting EOS probability to 0. Args: min_length (:obj:`int`):
generation_utils.py:416
↓ 1 callers
Class
MultiChoiceDataset
tasks/superglue/dataset.py:64
↓ 1 callers
Class
NLTKSegmenter
data_utils/extraction.py:9
↓ 1 callers
Class
NoRepeatNGramLogitsProcessor
r""" :class:`transformers.LogitsProcessor` that enforces no repetition of n-grams. See `Fairseq <https://github.com/pytorch/fairseq/blob/a07cb
generation_utils.py:444
↓ 1 callers
Class
ParallelCrossAttention
Parallel cross-attention layer for Transformer
mpu/transformer.py:57
↓ 1 callers
Class
ParallelDecoderLayer
A single layer transformer for GPT2. We use the following notation: h: hidden size n: number of attention heads b: batch
mpu/transformer.py:391
↓ 1 callers
Class
ParallelTransformerLayer
A single layer transformer for GPT2. We use the following notation: h: hidden size n: number of attention heads b: batch
mpu/transformer.py:492
↓ 1 callers
Class
PositionalEmbedding
mpu/transformer.py:38
↓ 1 callers
Class
ProcessorTokenizer
callable class that runs a preprocessing, as well as tokenization step, on input text.
data_utils/lazy_loader.py:104
↓ 1 callers
Class
PromptSpell
model/prompt.py:5
↓ 1 callers
Class
SQuADGenerationProcessor
tasks/seq2seq/dataset.py:149
↓ 1 callers
Class
SQuADProcessor
tasks/seq2seq/dataset.py:190
↓ 1 callers
Class
SplitDataset
Dataset wrapper to access a subset of another dataset. Purpose: useful to index into existing datasets, possibly large-scale datasets as
data_utils/datasets.py:143
↓ 1 callers
Class
SummmaryProcessor
tasks/seq2seq/dataset.py:60
↓ 1 callers
Class
Tokenizer
Tokenizer object that handles text tokenization, command tokens, and type tokens. Command tokens and text tokens are stored together in o
data_utils/tokenization.py:216
↓ 1 callers
Class
WordpieceTokenizer
Runs WordPiece tokenization.
data_utils/wordpiece.py:293
↓ 1 callers
Class
XLDataset
data_utils/datasets.py:501
↓ 1 callers
Class
XSumProcessor
tasks/seq2seq/dataset.py:362
↓ 1 callers
Class
tofp16
Utility module that implements:: def forward(self, input): return input.half()
fp16/fp16util.py:24
Class
AFQMCPVP
tasks/superglue/pvp.py:1051
Class
AFQMCProcessor
Processor for the AFQMC data set (CLUE version).
tasks/superglue/dataset.py:961
Class
AgnewsPVP
tasks/superglue/pvp.py:907
Class
AgnewsProcessor
Processor for the AG news data set.
tasks/superglue/dataset.py:994
Class
AxBProcessor
Processor for the AX-B diagnostic data set.
tasks/superglue/dataset.py:359
Class
AxGProcessor
Processor for the AX-G diagnostic data set.
tasks/superglue/dataset.py:349
Class
BeamScorer
Abstract base class for all beam scorers that are used for :meth:`~transformers.PretrainedModel.beam_search` and :meth:`~transformers.Pretrai
generation_utils.py:112
Class
BertBaseData
data_utils/corpora.py:483
Class
BertData
data_utils/corpora.py:404
Class
BertForMaskedLM
BERT model with the masked language modeling head. This module comprises the BERT model followed by the masked language modeling head. Params
model/modeling_bert.py:1019
Class
BertForMultipleChoice
BERT model for multiple choice tasks. This module is composed of the BERT model with a linear layer on top of the pooled output. Params:
model/modeling_bert.py:1214
next →
1–100 of 200, ranked by callers