From 7cddc6ea4d7ae20b55685100a80f9b83a280e736 Mon Sep 17 00:00:00 2001 From: Thien Tran Date: Tue, 11 Jun 2024 09:22:23 +0800 Subject: [PATCH] fix compile (#341) --- scripts/hf_eval.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/hf_eval.py b/scripts/hf_eval.py index ab1a8adb17..b0cc76e8a5 100644 --- a/scripts/hf_eval.py +++ b/scripts/hf_eval.py @@ -22,7 +22,7 @@ def run_evaluation(repo_id, task_list, limit, device, precision, quantization, c model = AutoModelForCausalLM.from_pretrained(repo_id).to(device="cuda", dtype=precision) if compile: - torch.compile(model, mode="max-autotune", fullgraph=True) + model = torch.compile(model, mode="max-autotune", fullgraph=True) if quantization == "int8dq": change_linear_weights_to_int8_dqtensors(model)