[Bugfix] Migrate to REGEX Library to prevent catastrophic backtracking (#18454)
Signed-off-by: Crucifixion-Fxl <xmufxl@gmail.com> Co-authored-by: Crucifixion-Fxl <xmufxl@gmail.com>
This commit is contained in:
@@ -250,7 +250,7 @@ class MiMoMTP(nn.Module):
|
||||
return loaded_params
|
||||
|
||||
def map_model_name_to_mtp_param_name(self, name: str) -> str:
|
||||
import re
|
||||
import regex as re
|
||||
name_without_prefix = [
|
||||
"token_layernorm", "hidden_layernorm", "input_proj",
|
||||
"final_layernorm"
|
||||
|
||||
Reference in New Issue
Block a user