(module)
| 139 | class Loading(): |
| 140 | |
| 141 | def is_load_module(module): |
| 142 | load_layers = [nn.Linear, nn.Embedding, nn.LayerNorm] |
| 143 | load_layer_names = [ |
| 144 | "LPLayerNorm", "SharedEmbedding", "OPTLearnedPositionalEmbedding", "LlamaRMSNorm", "FalconLinear", |
| 145 | "MistralRMSNorm", "T5LayerNorm", "MixtralRMSNorm", "Phi3RotaryEmbedding", "Phi3SuScaledRotaryEmbedding", |
| 146 | "Phi3RMSNorm", "YuanRMSNorm", "YuanRotaryEmbedding", "Phi3LongRoPEScaledRotaryEmbedding", "Qwen2RMSNorm", |
| 147 | "Qwen3RMSNorm", "Qwen3MoeRMSNorm", "Qwen3_5RMSNorm", "Qwen3_5RMSNormGated", "Qwen3_5MoeRMSNorm", |
| 148 | "Qwen3_5MoeRMSNormGated", "DeepseekV2RMSNorm", "DeepseekV3RMSNorm", "DeepseekV2YarnRotaryEmbedding", |
| 149 | "DeepseekV3YarnRotaryEmbedding", "MoEGate" |
| 150 | ] |
| 151 | return module.__class__ in load_layers or module._get_name() in load_layer_names |
| 152 | |
| 153 | def load_buffer(module, state_dict, prefix): |
| 154 | for name in module._buffers.keys(): |
no outgoing calls
no test coverage detected