MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / is_load_module

Method is_load_module

deepspeed/module_inject/auto_tp.py:136–145  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

134class Loading():
135
136 def is_load_module(module):
137 load_layers = [nn.Linear, nn.Embedding, nn.LayerNorm]
138 load_layer_names = [
139 "LPLayerNorm", "SharedEmbedding", "OPTLearnedPositionalEmbedding", "LlamaRMSNorm", "FalconLinear",
140 "MistralRMSNorm", "T5LayerNorm", "MixtralRMSNorm", "Phi3RotaryEmbedding", "Phi3SuScaledRotaryEmbedding",
141 "Phi3RMSNorm", "YuanRMSNorm", "YuanRotaryEmbedding", "Phi3LongRoPEScaledRotaryEmbedding", "Qwen2RMSNorm",
142 "Qwen3RMSNorm", "Qwen3MoeRMSNorm", "DeepseekV2RMSNorm", "DeepseekV3RMSNorm",
143 "DeepseekV2YarnRotaryEmbedding", "DeepseekV3YarnRotaryEmbedding", "MoEGate"
144 ]
145 return module.__class__ in load_layers or module._get_name() in load_layer_names
146
147 def load_buffer(module, state_dict, prefix):
148 for name in module._buffers.keys():

Callers 2

_replace_moduleFunction · 0.80
_replace_moduleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected