From e7962187b4397a22a0a63625b1af955a9a2424df Mon Sep 17 00:00:00 2001 From: Mihir Patel Date: Wed, 15 Nov 2023 19:09:13 -0500 Subject: [PATCH] fix script (#741) --- scripts/inference/hf_generate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/inference/hf_generate.py b/scripts/inference/hf_generate.py index 96592ca477..45ddc6b63e 100644 --- a/scripts/inference/hf_generate.py +++ b/scripts/inference/hf_generate.py @@ -217,6 +217,7 @@ def main(args: Namespace) -> None: if device is not None: print(f'Placing model on {device=}...') model.to(device) + model.to(model_dtype) except Exception as e: raise RuntimeError( 'Unable to load HF model. ' +