@@ -2445,7 +2445,7 @@ def set_gguf_parameters(self):
2445
2445
raise ValueError ("query_pre_attn_scalar must be equal to n_embd / n_head" )
2446
2446
2447
2447
def modify_tensors (self , data_torch : Tensor , name : str , bid : int | None ) -> Iterable [tuple [str , Tensor ]]:
2448
- del bid # unusem
2448
+ del bid # unused
2449
2449
2450
2450
# lm_head is not used in llama.cpp, while autoawq will include this tensor in model
2451
2451
# To prevent errors, skip loading lm_head.weight.
@@ -3225,10 +3225,6 @@ def parse_args() -> argparse.Namespace:
3225
3225
"--vocab-only" , action = "store_true" ,
3226
3226
help = "extract only the vocab" ,
3227
3227
)
3228
- parser .add_argument (
3229
- "--awq-path" , type = Path , default = None ,
3230
- help = "Path to scale awq cache file" ,
3231
- )
3232
3228
parser .add_argument (
3233
3229
"--outfile" , type = Path ,
3234
3230
help = "path to write to; default: based on input. {ftype} will be replaced by the outtype." ,
@@ -3306,19 +3302,6 @@ def main() -> None:
3306
3302
3307
3303
dir_model = args .model
3308
3304
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
-
3322
3305
if not dir_model .is_dir ():
3323
3306
logger .error (f'Error: { args .model } is not a directory' )
3324
3307
sys .exit (1 )
0 commit comments