Skip to content

Commit ed4ff0b

Browse files
mikekgfbmalfet
authored andcommitted
add version check (#498)
1 parent ad98ae2 commit ed4ff0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,12 @@ def _add_arguments_common(parser):
295295

296296

297297
def arg_init(args):
298-
if hasattr(args, "quantize") and Path(args.quantize).is_file():
298+
if not (torch.__version__ > "2.3"):
299+
raise RuntimeError(
300+
"You are using PyTorch {torch.__version__}. At this time, torchchat uses the latest PyTorch technology with high-performance kernels only available in PyTorch nightly until the PyTorch 2.4 release"
301+
)
302+
303+
if hasattr(args, 'quantize') and Path(args.quantize).is_file():
299304
with open(args.quantize, "r") as f:
300305
args.quantize = json.loads(f.read())
301306

0 commit comments

Comments
 (0)