@@ -892,7 +892,7 @@ def _quantized_8bit_generator(self, hf_weights_files, use_safetensors,
892
892
if not weight_name .lower ().endswith (".scb" ):
893
893
continue
894
894
895
- weight_key = weight_name .lower ().replace (".scb" , ".qweight " )
895
+ weight_key = weight_name .lower ().replace (".scb" , ".weight " )
896
896
quant_state_dict [weight_key ] = weight_tensor
897
897
898
898
for weight_name , weight_tensor in self ._hf_weight_iter (
@@ -901,11 +901,9 @@ def _quantized_8bit_generator(self, hf_weights_files, use_safetensors,
901
901
if self ._is_8bit_weight_name (weight_name ):
902
902
continue
903
903
904
- qweight_name = weight_name .replace (".weight" , ".qweight" )
905
-
906
- if qweight_name in quant_state_dict :
904
+ if weight_name in quant_state_dict :
907
905
set_weight_attrs (weight_tensor , {"load_in_8bit" : True })
908
- yield qweight_name , weight_tensor
906
+ yield weight_name , weight_tensor
909
907
else :
910
908
yield weight_name , weight_tensor
911
909
@@ -950,9 +948,8 @@ def _parse_quant_state(param_name: str,
950
948
(f"{ weight_name } .quant_state.bitsandbytes__fp4" \
951
949
in temp_state_dict ):
952
950
quant_state = _parse_quant_state (weight_name , temp_state_dict )
953
- weight_name = weight_name .replace (".weight" , ".qweight" )
954
951
quant_state_dict [weight_name ] = quant_state
955
- yield weight_name . replace ( ".weight" , ".qweight" ) , weight_tensor
952
+ yield weight_name , weight_tensor
956
953
else :
957
954
yield weight_name , weight_tensor
958
955
@@ -967,7 +964,6 @@ def _unquantized_generator(self, hf_weights_files, use_safetensors,
967
964
968
965
if any (target_module in weight_name for target_module in
969
966
self .target_modules ) and weight_name .endswith (".weight" ):
970
- weight_name = weight_name .replace (".weight" , ".qweight" )
971
967
# Without sharding
972
968
if any (
973
969
weight_name .startswith (module )
@@ -1093,7 +1089,7 @@ def _load_weights(self, model_config: ModelConfig,
1093
1089
# Some models, such as MiniCPM V2.5/2.6, contain both
1094
1090
# module names 'kv_proj' and 'qkv_proj'. To prevent 'kv_proj'
1095
1091
# from being incorrectly identified as being present in
1096
- # 'vpm.encoder.layers.0.self_attn.qkv_proj.qweight
1092
+ # 'vpm.encoder.layers.0.self_attn.qkv_proj.weight
1097
1093
if shard_pos > 0 and quant_param_name [shard_pos - 1 ] == "." :
1098
1094
shard_index = index
1099
1095
quant_param_name = quant_param_name .replace (
0 commit comments