Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenSparseLLMs/Linear-MoE
/ types & classes
Types & classes
227 in github.com/OpenSparseLLMs/Linear-MoE
⨍
Functions
1,498
◇
Types & classes
227
↓ 41 callers
Class
TransformerLayerSubmodules
linear_moe/model/mixtral/transformer_layer.py:31
↓ 40 callers
Class
LinearAttentionSubmodules
linear_moe/sequence_modeling/linear_attention.py:16
↓ 32 callers
Class
TransformerLayerSubmodules
linear_moe/model/qwen2/transformer_layer.py:31
↓ 32 callers
Class
TransformerLayerSubmodules
linear_moe/model/deepseek_v2/transformer_layer.py:33
↓ 28 callers
Class
TransformerLayerSubmodules
linear_moe/model/llama3/transformer_layer.py:31
↓ 17 callers
Class
SelfAttentionSubmodules
linear_moe/model/mixtral/transformer/attention.py:38
↓ 17 callers
Class
SelfAttentionSubmodules
linear_moe/model/qwen2/transformer/attention.py:38
↓ 17 callers
Class
SelfAttentionSubmodules
linear_moe/model/deepseek_v2/transformer/attention.py:30
↓ 15 callers
Class
LinearRNNSubmodules
linear_moe/sequence_modeling/linear_rnn.py:18
↓ 15 callers
Class
SelfAttentionSubmodules
linear_moe/model/llama3/transformer/attention.py:42
↓ 14 callers
Class
HybridTransformerBlockSubmodules
linear_moe/model/mixtral/hybrid/hybrid_transformer_block.py:82
↓ 14 callers
Class
HybridTransformerBlockSubmodules
linear_moe/model/qwen2/hybrid/hybrid_transformer_block.py:82
↓ 14 callers
Class
HybridTransformerBlockSubmodules
linear_moe/model/deepseek_v2/hybrid/hybrid_transformer_block.py:80
↓ 12 callers
Class
HybridTransformerBlockSubmodules
linear_moe/model/llama3/hybrid/hybrid_transformer_block.py:82
↓ 11 callers
Class
Conversation
A class that keeps all conversation history.
linear_moe/data/llava/conversation.py:30
↓ 10 callers
Class
RotaryEmbedding
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 callers
Class
RMSNorm
linear_moe/model/common_modules/layernorm.py:626
↓ 8 callers
Class
MomLinearAttentionSubmodules
linear_moe/sequence_modeling/mom_linear_attention.py:124
↓ 5 callers
Class
GPTModel
GPT Transformer language model. Args: config (TransformerConfig): Transformer config transformer_layer_spec (ModuleSpec): Specifi
linear_moe/model/qwen2/model.py:30
↓ 4 callers
Class
HybridGPTModel
GPT Transformer language model. Args: config (TransformerConfig): Transformer config hybrid_transformer_layer_spec (ModuleSpec):
linear_moe/model/qwen2/hybrid/hybrid_model.py:28
↓ 4 callers
Class
LLamaRawDataset
A class for processing a LLama text dataset
linear_moe/data/llama.py:60
↓ 4 callers
Class
MambaLayerSubmodules
linear_moe/sequence_modeling/mamba2/mamba_layer.py:21
↓ 4 callers
Class
MambaMixerSubmodules
linear_moe/sequence_modeling/mamba2/mamba_mixer.py:49
↓ 4 callers
Class
MambaModel
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 callers
Class
MambaStackSubmodules
linear_moe/sequence_modeling/ssm.py:67
↓ 4 callers
Class
Qwen2RMSNorm
linear_moe/model/qwen2/rms_norm.py:4
↓ 3 callers
Class
ChatGLMRawDataset
ChatGLM dataset class.
linear_moe/data/glm.py:246
↓ 3 callers
Class
HadamardFeatureMap
linear_moe/model/common_modules/feature_map.py:119
↓ 3 callers
Class
HedgehogFeatureMap
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 callers
Class
ParallelTransformer
Transformer class.
linear_moe/model/llama3/transformer_legacy.py:1391
↓ 3 callers
Class
StarcoderRawDataset
Starcoder dataset class
linear_moe/data/starcoder.py:23
↓ 3 callers
Class
T2RFeatureMap
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 callers
Class
BloomRawDataset
A class for processing a Bloom text dataset
linear_moe/data/bloom.py:21
↓ 2 callers
Class
DPFPFeatureMap
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 callers
Class
DeepseekV2RMSNorm
linear_moe/model/deepseek_v2/rms_norm.py:4
↓ 2 callers
Class
Encoder
toolkits/pretrain_data_preprocessing/preprocess_data_megatron.py:32
↓ 2 callers
Class
GroupNorm
linear_moe/model/common_modules/layernorm.py:578
↓ 2 callers
Class
LoRA
linear_moe/sequence_modeling/rwkv6/dd_lerp_linear.py:84
↓ 2 callers
Class
MLP
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 callers
Class
MLP
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 callers
Class
MLPSubmodules
linear_moe/model/mixtral/transformer/mlp.py:35
↓ 2 callers
Class
MLPSubmodules
linear_moe/model/qwen2/transformer/mlp.py:35
↓ 2 callers
Class
MLPSubmodules
linear_moe/model/deepseek_v2/transformer/mlp.py:36
↓ 2 callers
Class
ParallelAttention
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 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
linear_moe/model/llama3/transformer_legacy.py:93
↓ 2 callers
Class
TransformerBlock
Transformer class.
linear_moe/model/qwen2/transformer_block.py:104
↓ 1 callers
Class
BaichuanConfig
toolkits/model_checkpoints_convertor/baichuan/configuration_baichuan.py:6
↓ 1 callers
Class
BaichuanConfig
toolkits/model_checkpoints_convertor/baichuan2/configuration_baichuan.py:6
↓ 1 callers
Class
CoreAttention
linear_moe/model/llama3/transformer_legacy.py:311
↓ 1 callers
Class
DeepseekV2YarnRotaryEmbedding
linear_moe/model/deepseek_v2/yarn_rotary_pos_embedding.py:97
↓ 1 callers
Class
DropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
linear_moe/model/llama3/transformer_legacy.py:71
↓ 1 callers
Class
Embedding
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 callers
Class
Encoder
toolkits/pretrain_data_preprocessing/preprocess_data.py:33
↓ 1 callers
Class
FlashSelfAttention
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 callers
Class
GLM130BTokenizer
linear_moe/tokenizer/icetk_glm130b_tokenizer.py:84
↓ 1 callers
Class
GroupedMLP
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 callers
Class
GroupedMLP
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 callers
Class
GroupedMLP
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 callers
Class
IdentitySplitter
toolkits/pretrain_data_preprocessing/preprocess_data_megatron.py:27
↓ 1 callers
Class
JiebaBPETokenizer
SentencePiece BPE tokenizer with Jieba integration
linear_moe/tokenizer/jiebabpe_tokenizer.py:19
↓ 1 callers
Class
LLamaIdxMapDataset
LLAMA dataset class for mmap format data
linear_moe/data/llama.py:225
↓ 1 callers
Class
LerpLinear
linear_moe/sequence_modeling/rwkv6/dd_lerp_linear.py:10
↓ 1 callers
Class
MLP
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 callers
Class
MLPSubmodules
linear_moe/model/llama3/transformer/mlp.py:36
↓ 1 callers
Class
MemSavingParallelDroplessMLP
linear_moe/model/qwen2/moe/experts.py:287
↓ 1 callers
Class
MemSavingParallelMLP
linear_moe/model/qwen2/moe/experts.py:276
↓ 1 callers
Class
MixtralRMSNorm
linear_moe/model/mixtral/rms_norm.py:4
↓ 1 callers
Class
MoEAllGatherTokenDispatcher
AllGather Based Token dispatcher.
linear_moe/model/qwen2/moe/token_dispatcher.py:69
↓ 1 callers
Class
MoEAllGatherTokenDispatcher
AllGather Based Token dispatcher.
linear_moe/model/deepseek_v2/moe/token_dispatcher.py:68
↓ 1 callers
Class
MoEAlltoAllTokenDispatcher
AlltoAll Based Token dispatcher.
linear_moe/model/qwen2/moe/token_dispatcher.py:294
↓ 1 callers
Class
MoEAlltoAllTokenDispatcher
AlltoAll Based Token dispatcher.
linear_moe/model/deepseek_v2/moe/token_dispatcher.py:288
↓ 1 callers
Class
MoEDroplessTokenDispatcher
Token dispatcher without token dropping.
linear_moe/model/mixtral/moe/token_dispatcher.py:67
↓ 1 callers
Class
NoopTransformerLayer
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 callers
Class
ParallelTransformerLayer
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 callers
Class
Partition
toolkits/pretrain_data_preprocessing/preprocess_data_megatron.py:97
↓ 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.
linear_moe/model/llama3/language_model.py:83
↓ 1 callers
Class
RWConfig
toolkits/model_checkpoints_convertor/falcon40b/configuration_RW.py:23
↓ 1 callers
Class
RWConfig
toolkits/model_checkpoints_convertor/falcon/configuration_RW.py:23
↓ 1 callers
Class
RWConfig_40b
toolkits/model_checkpoints_convertor/falcon/configuration_RW.py:82
↓ 1 callers
Class
RebasedFeatureMap
linear_moe/model/common_modules/feature_map.py:206
↓ 1 callers
Class
SequentialMLP
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 callers
Class
SequentialMLP
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 callers
Class
SequentialMLP
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 callers
Class
SwitchMLP
Routes input to one of N MLP "experts"
linear_moe/model/llama3/transformer_legacy.py:199
↓ 1 callers
Class
TaylorFeatureMap
linear_moe/model/common_modules/feature_map.py:190
↓ 1 callers
Class
TopKRouter
Route each token to the top-k experts.
linear_moe/model/mixtral/moe/router.py:100
↓ 1 callers
Class
TopKRouter
Route each token to the top-k experts.
linear_moe/model/qwen2/moe/router.py:180
↓ 1 callers
Class
TopKRouter
Route each token to the top-k experts.
linear_moe/model/deepseek_v2/moe/router.py:180
↓ 1 callers
Class
TransformerBlock
Transformer class.
linear_moe/model/mixtral/transformer_block.py:104
↓ 1 callers
Class
TransformerBlock
Transformer class.
linear_moe/model/deepseek_v2/transformer_block.py:105
↓ 1 callers
Class
TransformerBlockSubmodules
linear_moe/model/mixtral/transformer_block.py:77
↓ 1 callers
Class
TransformerBlockSubmodules
linear_moe/model/qwen2/transformer_block.py:77
↓ 1 callers
Class
TransformerBlockSubmodules
linear_moe/model/deepseek_v2/transformer_block.py:78
↓ 1 callers
Class
TransformerLanguageModel
Transformer language model. Args: transformer_hparams: transformer hyperparameters vocab_size: vocabulary size max_sequen
linear_moe/model/llama3/language_model.py:314
↓ 1 callers
Class
VisImage
linear_moe/tokenizer/tokenization_qwen_vl.py:448
↓ 1 callers
Class
Visualizer
linear_moe/tokenizer/tokenization_qwen_vl.py:488
↓ 1 callers
Class
_DeepSeekV2Tokenizer
linear_moe/tokenizer/__init__.py:236
↓ 1 callers
Class
_IceTokenizer
Hardcoded tokenizer.
linear_moe/tokenizer/icetk_glm130b_tokenizer.py:260
↓ 1 callers
Class
_LLama3Tokenizer
linear_moe/tokenizer/__init__.py:399
↓ 1 callers
Class
_MistralTokenizer
linear_moe/tokenizer/__init__.py:326
next →
1–100 of 227, ranked by callers