Skip to content

Commit 1e35d61

Browse files
committed
convert : remove AWQ remnants (#5768)
1 parent 8ced9f7 commit 1e35d61

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

convert.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,6 @@ def main(args_in: list[str] | None = None) -> None:
13771377
# We currently only support Q8_0 output on little endian systems.
13781378
output_choices.append("q8_0")
13791379
parser = argparse.ArgumentParser(description="Convert a LLaMA model to a GGML compatible file")
1380-
parser.add_argument("--awq-path", type=Path, help="Path to scale awq cache file", default=None)
13811380
parser.add_argument("--dump", action="store_true", help="don't convert, just show what's in the model")
13821381
parser.add_argument("--dump-single", action="store_true", help="don't convert, just show what's in a single model file")
13831382
parser.add_argument("--vocab-only", action="store_true", help="extract only the vocab")
@@ -1393,18 +1392,6 @@ def main(args_in: list[str] | None = None) -> None:
13931392
parser.add_argument("--skip-unknown", action="store_true", help="skip unknown tensor names instead of failing")
13941393

13951394
args = parser.parse_args(args_in)
1396-
if args.awq_path:
1397-
sys.path.insert(1, str(Path(__file__).parent / 'awq-py'))
1398-
from awq.apply_awq import add_scale_weights # type: ignore[import-not-found]
1399-
tmp_model_path = args.model / "weighted_model"
1400-
if tmp_model_path.is_dir():
1401-
print(f"{tmp_model_path} exists as a weighted model.")
1402-
else:
1403-
tmp_model_path.mkdir(parents=True, exist_ok=True)
1404-
print("Saving new weighted model ...")
1405-
add_scale_weights(str(args.model), str(args.awq_path), str(tmp_model_path))
1406-
print(f"Saved weighted model at {tmp_model_path}.")
1407-
args.model = tmp_model_path
14081395

14091396
if args.dump_single:
14101397
model_plus = lazy_load_file(args.model)

0 commit comments

Comments
 (0)