Skip to content

Commit

Permalink
model load
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Gschwind committed Apr 11, 2024
1 parent 88af130 commit b6fc99d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def main(checkpoint_path, device, quantize = "{ }", args = None):
print("Loading model ...")
t0 = time.time()
model = _load_model(
checkpoint_path, device=device, precision=precision, use_tp=False)
checkpoint_path, args.checkpoint_dir, device=device, precision=precision, use_tp=False)

device_sync(device=device) # MKG
print(f"Time to load model: {time.time() - t0:.02f} seconds")
Expand Down Expand Up @@ -149,6 +149,12 @@ def cli():
default="not_specified",
help="Model checkpoint path.",
)
parser.add_argument(
"--checkpoint-dir",
type=Path,
default=None,
help="Model checkpoint directory.",
)
parser.add_argument(
"--output-pte-path",
type=str,
Expand Down

0 comments on commit b6fc99d

Please sign in to comment.