(module)
| 134 | class 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(): |
no outgoing calls
no test coverage detected