MCPcopy Create free account

hub / github.com/OpenSparseLLMs/Linear-MoE / types & classes

Types & classes227 in github.com/OpenSparseLLMs/Linear-MoE

↓ 41 callersClassTransformerLayerSubmodules
linear_moe/model/mixtral/transformer_layer.py:31
↓ 40 callersClassLinearAttentionSubmodules
linear_moe/sequence_modeling/linear_attention.py:16
↓ 32 callersClassTransformerLayerSubmodules
linear_moe/model/qwen2/transformer_layer.py:31
↓ 32 callersClassTransformerLayerSubmodules
linear_moe/model/deepseek_v2/transformer_layer.py:33
↓ 28 callersClassTransformerLayerSubmodules
linear_moe/model/llama3/transformer_layer.py:31
↓ 17 callersClassSelfAttentionSubmodules
linear_moe/model/mixtral/transformer/attention.py:38
↓ 17 callersClassSelfAttentionSubmodules
linear_moe/model/qwen2/transformer/attention.py:38
↓ 17 callersClassSelfAttentionSubmodules
linear_moe/model/deepseek_v2/transformer/attention.py:30
↓ 15 callersClassLinearRNNSubmodules
linear_moe/sequence_modeling/linear_rnn.py:18
↓ 15 callersClassSelfAttentionSubmodules
linear_moe/model/llama3/transformer/attention.py:42
↓ 14 callersClassHybridTransformerBlockSubmodules
linear_moe/model/mixtral/hybrid/hybrid_transformer_block.py:82
↓ 14 callersClassHybridTransformerBlockSubmodules
linear_moe/model/qwen2/hybrid/hybrid_transformer_block.py:82
↓ 14 callersClassHybridTransformerBlockSubmodules
linear_moe/model/deepseek_v2/hybrid/hybrid_transformer_block.py:80
↓ 12 callersClassHybridTransformerBlockSubmodules
linear_moe/model/llama3/hybrid/hybrid_transformer_block.py:82
↓ 11 callersClassConversation
A class that keeps all conversation history.
linear_moe/data/llava/conversation.py:30
↓ 10 callersClassRotaryEmbedding
The rotary position embeddings from RoFormer_ (Su et. al). A crucial insight from the method is that the query and keys are transformed b
linear_moe/model/common_modules/rotary.py:137
↓ 9 callersClassRMSNorm
linear_moe/model/common_modules/layernorm.py:626
↓ 8 callersClassMomLinearAttentionSubmodules
linear_moe/sequence_modeling/mom_linear_attention.py:124
↓ 5 callersClassGPTModel
GPT Transformer language model. Args: config (TransformerConfig): Transformer config transformer_layer_spec (ModuleSpec): Specifi
linear_moe/model/qwen2/model.py:30
↓ 4 callersClassHybridGPTModel
GPT Transformer language model. Args: config (TransformerConfig): Transformer config hybrid_transformer_layer_spec (ModuleSpec):
linear_moe/model/qwen2/hybrid/hybrid_model.py:28
↓ 4 callersClassLLamaRawDataset
A class for processing a LLama text dataset
linear_moe/data/llama.py:60
↓ 4 callersClassMambaLayerSubmodules
linear_moe/sequence_modeling/mamba2/mamba_layer.py:21
↓ 4 callersClassMambaMixerSubmodules
linear_moe/sequence_modeling/mamba2/mamba_mixer.py:49
↓ 4 callersClassMambaModel
Mamba language model. Args: config (TransformerConfig): Transformer config mamba_stack_spec (ModuleSpec): Specifies the modules t
linear_moe/sequence_modeling/mamba2/mamba_model.py:16
↓ 4 callersClassMambaStackSubmodules
linear_moe/sequence_modeling/ssm.py:67
↓ 4 callersClassQwen2RMSNorm
linear_moe/model/qwen2/rms_norm.py:4
↓ 3 callersClassChatGLMRawDataset
ChatGLM dataset class.
linear_moe/data/glm.py:246
↓ 3 callersClassHadamardFeatureMap
linear_moe/model/common_modules/feature_map.py:119
↓ 3 callersClassHedgehogFeatureMap
r""" Hedgehog feature map as introduced in `The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicry <https://arxiv.org
linear_moe/model/common_modules/feature_map.py:38
↓ 3 callersClassParallelTransformer
Transformer class.
linear_moe/model/llama3/transformer_legacy.py:1391
↓ 3 callersClassStarcoderRawDataset
Starcoder dataset class
linear_moe/data/starcoder.py:23
↓ 3 callersClassT2RFeatureMap
r""" Simple linear mapping feature map as in `Finetuning Pretrained Transformers into RNNs <https://arxiv.org/abs/2103.13076>`_
linear_moe/model/common_modules/feature_map.py:66
↓ 2 callersClassBloomRawDataset
A class for processing a Bloom text dataset
linear_moe/data/bloom.py:21
↓ 2 callersClassDPFPFeatureMap
r""" Deterministic Parameter-Free Projection (DPFP) feature map in `Linear Transformers Are Secretly Fast Weight Programmers <https://arxiv.or
linear_moe/model/common_modules/feature_map.py:97
↓ 2 callersClassDeepseekV2RMSNorm
linear_moe/model/deepseek_v2/rms_norm.py:4
↓ 2 callersClassEncoder
toolkits/pretrain_data_preprocessing/preprocess_data_megatron.py:32
↓ 2 callersClassGroupNorm
linear_moe/model/common_modules/layernorm.py:578
↓ 2 callersClassLoRA
linear_moe/sequence_modeling/rwkv6/dd_lerp_linear.py:84
↓ 2 callersClassMLP
MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform nonlinear transformation, and project the state
linear_moe/model/qwen2/transformer/mlp.py:40
↓ 2 callersClassMLP
MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform nonlinear transformation, and project the state
linear_moe/model/deepseek_v2/transformer/mlp.py:41
↓ 2 callersClassMLPSubmodules
linear_moe/model/mixtral/transformer/mlp.py:35
↓ 2 callersClassMLPSubmodules
linear_moe/model/qwen2/transformer/mlp.py:35
↓ 2 callersClassMLPSubmodules
linear_moe/model/deepseek_v2/transformer/mlp.py:36
↓ 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.
linear_moe/model/llama3/transformer_legacy.py:508
↓ 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
linear_moe/model/llama3/transformer_legacy.py:93
↓ 2 callersClassTransformerBlock
Transformer class.
linear_moe/model/qwen2/transformer_block.py:104
↓ 1 callersClassBaichuanConfig
toolkits/model_checkpoints_convertor/baichuan/configuration_baichuan.py:6
↓ 1 callersClassBaichuanConfig
toolkits/model_checkpoints_convertor/baichuan2/configuration_baichuan.py:6
↓ 1 callersClassCoreAttention
linear_moe/model/llama3/transformer_legacy.py:311
↓ 1 callersClassDeepseekV2YarnRotaryEmbedding
linear_moe/model/deepseek_v2/yarn_rotary_pos_embedding.py:97
↓ 1 callersClassDropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
linear_moe/model/llama3/transformer_legacy.py:71
↓ 1 callersClassEmbedding
Language model embeddings. Args: hidden_size: hidden size vocab_size: vocabulary size max_sequence_length: maximum size o
linear_moe/model/llama3/language_model.py:119
↓ 1 callersClassEncoder
toolkits/pretrain_data_preprocessing/preprocess_data.py:33
↓ 1 callersClassFlashSelfAttention
Implement the scaled dot product attention with softmax. Arguments --------- softmax_scale: The temperature to use for the softmax att
linear_moe/model/llama3/transformer_legacy.py:446
↓ 1 callersClassGLM130BTokenizer
linear_moe/tokenizer/icetk_glm130b_tokenizer.py:84
↓ 1 callersClassGroupedMLP
An efficient implementation of the Experts layer using CUTLASS GroupedGEMM. This class is designed to execute multiple experts in parallel, t
linear_moe/model/mixtral/moe/experts.py:32
↓ 1 callersClassGroupedMLP
An efficient implementation of the Experts layer using CUTLASS GroupedGEMM. This class is designed to execute multiple experts in parallel, t
linear_moe/model/qwen2/moe/experts.py:39
↓ 1 callersClassGroupedMLP
An efficient implementation of the Experts layer using CUTLASS GroupedGEMM. This class is designed to execute multiple experts in parallel, there
linear_moe/model/deepseek_v2/moe/experts.py:32
↓ 1 callersClassIdentitySplitter
toolkits/pretrain_data_preprocessing/preprocess_data_megatron.py:27
↓ 1 callersClassJiebaBPETokenizer
SentencePiece BPE tokenizer with Jieba integration
linear_moe/tokenizer/jiebabpe_tokenizer.py:19
↓ 1 callersClassLLamaIdxMapDataset
LLAMA dataset class for mmap format data
linear_moe/data/llama.py:225
↓ 1 callersClassLerpLinear
linear_moe/sequence_modeling/rwkv6/dd_lerp_linear.py:10
↓ 1 callersClassMLP
MLP will take the input with h hidden state, project it to 4*h hidden dimension, perform nonlinear transformation, and project the state
linear_moe/model/mixtral/transformer/mlp.py:40
↓ 1 callersClassMLPSubmodules
linear_moe/model/llama3/transformer/mlp.py:36
↓ 1 callersClassMemSavingParallelDroplessMLP
linear_moe/model/qwen2/moe/experts.py:287
↓ 1 callersClassMemSavingParallelMLP
linear_moe/model/qwen2/moe/experts.py:276
↓ 1 callersClassMixtralRMSNorm
linear_moe/model/mixtral/rms_norm.py:4
↓ 1 callersClassMoEAllGatherTokenDispatcher
AllGather Based Token dispatcher.
linear_moe/model/qwen2/moe/token_dispatcher.py:69
↓ 1 callersClassMoEAllGatherTokenDispatcher
AllGather Based Token dispatcher.
linear_moe/model/deepseek_v2/moe/token_dispatcher.py:68
↓ 1 callersClassMoEAlltoAllTokenDispatcher
AlltoAll Based Token dispatcher.
linear_moe/model/qwen2/moe/token_dispatcher.py:294
↓ 1 callersClassMoEAlltoAllTokenDispatcher
AlltoAll Based Token dispatcher.
linear_moe/model/deepseek_v2/moe/token_dispatcher.py:288
↓ 1 callersClassMoEDroplessTokenDispatcher
Token dispatcher without token dropping.
linear_moe/model/mixtral/moe/token_dispatcher.py:67
↓ 1 callersClassNoopTransformerLayer
A single 'no-op' transformer layer. The sole purpose of this layer is for when a standalone embedding layer is used (i.e., args.standalone_em
linear_moe/model/llama3/transformer_legacy.py:1294
↓ 1 callersClassParallelTransformerLayer
A single transformer layer. Transformer layer takes input with size [s, b, h] and returns an output of the same size.
linear_moe/model/llama3/transformer_legacy.py:863
↓ 1 callersClassPartition
toolkits/pretrain_data_preprocessing/preprocess_data_megatron.py:97
↓ 1 callersClassPooler
Pooler layer. Pool hidden states of a specific token (for example start of the sequence) and add a linear transformation followed by a tanh.
linear_moe/model/llama3/language_model.py:83
↓ 1 callersClassRWConfig
toolkits/model_checkpoints_convertor/falcon40b/configuration_RW.py:23
↓ 1 callersClassRWConfig
toolkits/model_checkpoints_convertor/falcon/configuration_RW.py:23
↓ 1 callersClassRWConfig_40b
toolkits/model_checkpoints_convertor/falcon/configuration_RW.py:82
↓ 1 callersClassRebasedFeatureMap
linear_moe/model/common_modules/feature_map.py:206
↓ 1 callersClassSequentialMLP
An implementation of the Experts layer using a sequence of MLP layers. This class executes each expert sequentially.
linear_moe/model/mixtral/moe/experts.py:171
↓ 1 callersClassSequentialMLP
An implementation of the Experts layer using a sequence of MLP layers. This class executes each expert sequentially.
linear_moe/model/qwen2/moe/experts.py:190
↓ 1 callersClassSequentialMLP
An implementation of the Experts layer using a sequence of MLP layers. This class executes each expert sequentially.
linear_moe/model/deepseek_v2/moe/experts.py:179
↓ 1 callersClassSwitchMLP
Routes input to one of N MLP "experts"
linear_moe/model/llama3/transformer_legacy.py:199
↓ 1 callersClassTaylorFeatureMap
linear_moe/model/common_modules/feature_map.py:190
↓ 1 callersClassTopKRouter
Route each token to the top-k experts.
linear_moe/model/mixtral/moe/router.py:100
↓ 1 callersClassTopKRouter
Route each token to the top-k experts.
linear_moe/model/qwen2/moe/router.py:180
↓ 1 callersClassTopKRouter
Route each token to the top-k experts.
linear_moe/model/deepseek_v2/moe/router.py:180
↓ 1 callersClassTransformerBlock
Transformer class.
linear_moe/model/mixtral/transformer_block.py:104
↓ 1 callersClassTransformerBlock
Transformer class.
linear_moe/model/deepseek_v2/transformer_block.py:105
↓ 1 callersClassTransformerBlockSubmodules
linear_moe/model/mixtral/transformer_block.py:77
↓ 1 callersClassTransformerBlockSubmodules
linear_moe/model/qwen2/transformer_block.py:77
↓ 1 callersClassTransformerBlockSubmodules
linear_moe/model/deepseek_v2/transformer_block.py:78
↓ 1 callersClassTransformerLanguageModel
Transformer language model. Args: transformer_hparams: transformer hyperparameters vocab_size: vocabulary size max_sequen
linear_moe/model/llama3/language_model.py:314
↓ 1 callersClassVisImage
linear_moe/tokenizer/tokenization_qwen_vl.py:448
↓ 1 callersClassVisualizer
linear_moe/tokenizer/tokenization_qwen_vl.py:488
↓ 1 callersClass_DeepSeekV2Tokenizer
linear_moe/tokenizer/__init__.py:236
↓ 1 callersClass_IceTokenizer
Hardcoded tokenizer.
linear_moe/tokenizer/icetk_glm130b_tokenizer.py:260
↓ 1 callersClass_LLama3Tokenizer
linear_moe/tokenizer/__init__.py:399
↓ 1 callersClass_MistralTokenizer
linear_moe/tokenizer/__init__.py:326
next →1–100 of 227, ranked by callers