From ebb5e5ec633213005e10388389d6984680ea7e54 Mon Sep 17 00:00:00 2001 From: Thien Tran Date: Tue, 11 Jun 2024 09:12:57 +0800 Subject: [PATCH] fix compile --- 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 ab1a8adb1..b0cc76e8a 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)