MCPcopy Create free account

hub / github.com/OpenSparseLLMs/Linear-MoE / functions

Functions1,498 in github.com/OpenSparseLLMs/Linear-MoE

Functionget_basic_linear_attention_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1329
Functionget_checkpoint_sub_dir_name
(tp_rank, pp_rank, pp_size)
toolkits/model_checkpoints_convertor/llama/hf2mcore_70b.py:145
Functionget_checkpoint_sub_dir_name
(tp_rank, pp_rank, pp_size)
toolkits/model_checkpoints_convertor/qwen/hf2mcore_qwen1.5_dense_gqa.py:124
Functionget_deltanet_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1285
Functionget_gla_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1240
Functionget_gpt_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:105
Functionget_gpt_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:91
Functionget_gpt_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:75
Functionget_gpt_layer_with_transformer_engine_spec
Generates a spec for a GPT transformer layer using Transformer Engine modules. Args: num_experts: Optional; the number of experts to
linear_moe/model/mixtral/layer_specs.py:65
Functionget_gpt_layer_with_transformer_engine_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:51
Functionget_gpt_layer_with_transformer_engine_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:46
Functionget_hgrn2_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1470
Functionget_hidden_output
(module, args, output)
toolkits/model_checkpoints_convertor/llama/hf2mcore.py:163
Functionget_hidden_output
(module, args, output)
toolkits/model_checkpoints_convertor/llama/hf_llama_moe/llama_moe.py:6
Functionget_hidden_output
(module, args, output)
toolkits/model_checkpoints_convertor/qwen/hf2megablocks_qwen1.5.py:156
Functionget_hybrid_based_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:279
Functionget_hybrid_based_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:267
Functionget_hybrid_based_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:241
Functionget_hybrid_basic_linear_attention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:848
Functionget_hybrid_basic_linear_attention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:881
Functionget_hybrid_basic_linear_attention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:684
Functionget_hybrid_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:533
Functionget_hybrid_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:538
Functionget_hybrid_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:495
Functionget_hybrid_gated_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:596
Functionget_hybrid_gated_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:669
Functionget_hybrid_gated_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:558
Functionget_hybrid_gla_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:405
Functionget_hybrid_gla_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:397
Functionget_hybrid_gla_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:367
Functionget_hybrid_hgrn2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:1044
Functionget_hybrid_hgrn2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:1083
Functionget_hybrid_hgrn2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:880
Functionget_hybrid_lasp2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:785
Functionget_hybrid_lasp2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:816
Functionget_hybrid_lightning_attention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:722
Functionget_hybrid_lightning_attention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:603
Functionget_hybrid_mamba2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:147
Functionget_hybrid_mamba2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:131
Functionget_hybrid_mamba2_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:108
Functionget_hybrid_mom_gated_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:659
Functionget_hybrid_mom_gated_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:743
Functionget_hybrid_mom_gated_deltanet_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:621
Functionget_hybrid_mom_gla_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:469
Functionget_hybrid_mom_gla_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:464
Functionget_hybrid_mom_gla_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:431
Functionget_hybrid_rebased_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:342
Functionget_hybrid_rebased_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:332
Functionget_hybrid_rebased_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:304
Functionget_hybrid_retention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:216
Functionget_hybrid_retention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:202
Functionget_hybrid_retention_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:178
Functionget_hybrid_rwkv6_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:911
Functionget_hybrid_rwkv6_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:946
Functionget_hybrid_rwkv6_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:747
Functionget_hybrid_rwkv7_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/mixtral/layer_specs.py:976
Functionget_hybrid_rwkv7_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/deepseek_v2/layer_specs.py:1014
Functionget_hybrid_rwkv7_linear_moe_layer_local_spec
( num_experts: int = None, moe_grouped_gemm: bool = False, qk_layernorm: bool = False )
linear_moe/model/llama3/layer_specs.py:812
Methodget_image
(self)
linear_moe/tokenizer/tokenization_qwen_vl.py:478
Functionget_megatron_sharded_states
Get sharded checkpoints from NVIDIA Megatron-LM checkpoint based on the provided tensor parallel size, pipeline parallel size and pipeline pa
toolkits/model_checkpoints_convertor/glm/checkpoint_reshaping_and_interoperability.py:235
Functionget_megatron_sharded_states
Get sharded checkpoints from NVIDIA Megatron-LM checkpoint based on the provided tensor parallel size, pipeline parallel size and pipeline pa
toolkits/model_checkpoints_convertor/glm130b/checkpoint_reshaping_and_interoperability.py:235
Functionget_megatron_sharded_states
Get sharded checkpoints from NVIDIA Megatron-LM checkpoint based on the provided tensor parallel size, pipeline parallel size and pipeline pa
toolkits/model_checkpoints_convertor/chatglm/checkpoint_reshaping_and_interoperability.py:264
Functionget_megatron_sharded_states
Get sharded checkpoints from NVIDIA Megatron-LM checkpoint based on the provided tensor parallel size, pipeline parallel size and pipeline pa
toolkits/model_checkpoints_convertor/yi/checkpoint_reshaping_and_interoperability.py:294
Functionget_megatron_sharded_states
Get sharded checkpoints from NVIDIA Megatron-LM checkpoint based on the provided tensor parallel size, pipeline parallel size and pipeline pa
toolkits/model_checkpoints_convertor/galactica/checkpoint_reshaping_and_interoperability.py:296
Functionget_model_name_from_path
(model_path)
linear_moe/data/llava/mm_utils.py:76
Functionget_num_layers_to_build
(config: TransformerConfig)
linear_moe/model/mixtral/hybrid/hybrid_transformer_block.py:43
Functionget_num_layers_to_build
(config: TransformerConfig)
linear_moe/model/qwen2/hybrid/hybrid_transformer_block.py:43
Functionget_num_layers_to_build
(config: TransformerConfig)
linear_moe/model/deepseek_v2/hybrid/hybrid_transformer_block.py:41
Functionget_num_layers_to_build
(config: TransformerConfig)
linear_moe/model/llama3/hybrid/hybrid_transformer_block.py:43
Methodget_output
(self)
linear_moe/tokenizer/tokenization_qwen_vl.py:555
Methodget_ppl
Get perplexity scores given a list of inputs.
eval/models/qwen2_linear_moe.py:134
Methodget_query_key_value_tensors
Derives `query`, `key` and `value` tensors from `hidden_states`.
linear_moe/model/mixtral/transformer/attention.py:469
Methodget_query_key_value_tensors
Derives `query` tensor from `hidden_states`, and `key`/`value` tensors from `key_value_states`.
linear_moe/model/mixtral/transformer/attention.py:572
Methodget_query_key_value_tensors
Derives `query`, `key` and `value` tensors from `hidden_states`.
linear_moe/model/qwen2/transformer/attention.py:469
Methodget_query_key_value_tensors
Derives `query` tensor from `hidden_states`, and `key`/`value` tensors from `key_value_states`.
linear_moe/model/qwen2/transformer/attention.py:572
Methodget_query_key_value_tensors
Derives `query`, `key` and `value` tensors from `hidden_states`.
linear_moe/model/deepseek_v2/transformer/attention.py:330
Methodget_query_key_value_tensors
Derives `query`, `key` and `value` tensors from `hidden_states`.
linear_moe/model/llama3/transformer/attention.py:467
Methodget_query_key_value_tensors
Derives `query` tensor from `hidden_states`, and `key`/`value` tensors from `key_value_states`.
linear_moe/model/llama3/transformer/attention.py:567
Functionget_rank
()
linear_moe/sequence_modeling/mamba2/triton_cache_manager.py:15
Functionget_rebased_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1196
Functionget_retention_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1108
Functionget_rwkv6_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1373
Functionget_rwkv7_linear_moe_layer_local_spec
Generates a specification for a GPT transformer layer using only the core modules from Megatron. Args: num_experts: Optional; the nu
linear_moe/model/mixtral/layer_specs.py:1421
Methodget_slopes
(n)
linear_moe/sequence_modeling/lightning_attention/lightning_attention.py:81
Methodget_slopes_power_of_2
(n)
linear_moe/sequence_modeling/lightning_attention/lightning_attention.py:82
Methodget_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
linear_moe/tokenizer/tokenization_baichuan.py:163
Methodget_special_tokens_mask
Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding special tokens using the
linear_moe/tokenizer/tokenization_yi.py:182
Methodget_token_len
Get lengths of the tokenized strings.
eval/models/qwen2_linear_moe.py:86
Methodget_vocab
(self)
linear_moe/tokenizer/tokenization_qwen_vl.py:173
Methodget_vocab
Returns vocab as a dict
linear_moe/tokenizer/tokenization_baichuan.py:87
Methodglu
(x)
linear_moe/model/mixtral/transformer/mlp.py:144
Methodglu
(x)
linear_moe/model/mixtral/moe/experts.py:51
Methodglu
(x)
linear_moe/model/qwen2/transformer/mlp.py:144
Methodglu
(x)
linear_moe/model/qwen2/moe/experts.py:60
Methodglu
(x)
linear_moe/model/deepseek_v2/transformer/mlp.py:132
Methodglu
(x)
linear_moe/model/deepseek_v2/moe/experts.py:53
Methodglu
(x)
linear_moe/model/llama3/transformer/mlp.py:125
Functiongroup_texts
(examples)
toolkits/pretrain_data_preprocessing/qwen_hf_preprocess_datasets.py:14
Methodhead_dim
(self)
toolkits/model_checkpoints_convertor/falcon40b/configuration_RW.py:70
Methodhead_dim
(self)
toolkits/model_checkpoints_convertor/falcon/configuration_RW.py:74
← previousnext →1,201–1,300 of 1,498, ranked by callers