We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 853fb5b commit c307fe3Copy full SHA for c307fe3
examples/models/llama2/export_llama_lib.py
@@ -9,6 +9,7 @@
9
import argparse
10
import copy
11
import logging
12
+import os
13
import shlex
14
from dataclasses import dataclass
15
@@ -237,8 +238,10 @@ def quantize(
237
238
else:
239
torch_dtype = torch.float16
240
- if checkpoint_path is None:
241
- checkpoint_path = Path("checkpoints/meta-llama/Llama-2-7b-chat-hf/model.pth")
+ assert checkpoint_path, "Need to specify a checkpoint"
242
+ assert os.path.isfile(checkpoint_path), f"{checkpoint_path} does not exist"
243
+ # if checkpoint_path is None:
244
+ # checkpoint_path = Path("checkpoints/meta-llama/Llama-2-7b-chat-hf/model.pth")
245
246
if calibration_tasks is None:
247
calibration_tasks = ["wikitext"]
0 commit comments