@@ -2445,7 +2445,7 @@ def set_gguf_parameters(self):
24452445 raise ValueError ("query_pre_attn_scalar must be equal to n_embd / n_head" )
24462446
24472447 def modify_tensors (self , data_torch : Tensor , name : str , bid : int | None ) -> Iterable [tuple [str , Tensor ]]:
2448- del bid # unusem
2448+ del bid # unused
24492449
24502450 # lm_head is not used in llama.cpp, while autoawq will include this tensor in model
24512451 # To prevent errors, skip loading lm_head.weight.
@@ -3225,10 +3225,6 @@ def parse_args() -> argparse.Namespace:
32253225 "--vocab-only" , action = "store_true" ,
32263226 help = "extract only the vocab" ,
32273227 )
3228- parser .add_argument (
3229- "--awq-path" , type = Path , default = None ,
3230- help = "Path to scale awq cache file" ,
3231- )
32323228 parser .add_argument (
32333229 "--outfile" , type = Path ,
32343230 help = "path to write to; default: based on input. {ftype} will be replaced by the outtype." ,
@@ -3306,19 +3302,6 @@ def main() -> None:
33063302
33073303 dir_model = args .model
33083304
3309- if args .awq_path :
3310- sys .path .insert (1 , str (Path (__file__ ).parent / 'awq-py' ))
3311- from awq .apply_awq import add_scale_weights # type: ignore[import-not-found]
3312- tmp_model_path = args .model / "weighted_model"
3313- dir_model = tmp_model_path
3314- if tmp_model_path .is_dir ():
3315- logger .info (f"{ tmp_model_path } exists as a weighted model." )
3316- else :
3317- tmp_model_path .mkdir (parents = True , exist_ok = True )
3318- logger .info ("Saving new weighted model ..." )
3319- add_scale_weights (str (args .model ), str (args .awq_path ), str (tmp_model_path ))
3320- logger .info (f"Saved weighted model at { tmp_model_path } ." )
3321-
33223305 if not dir_model .is_dir ():
33233306 logger .error (f'Error: { args .model } is not a directory' )
33243307 sys .exit (1 )
0 commit comments