From 419160b73399fceb3ae2c19d449fd24da0e0cc05 Mon Sep 17 00:00:00 2001 From: PanQiWei <594557445@qq.com> Date: Tue, 25 Apr 2023 12:52:49 +0800 Subject: [PATCH] always trust remote code --- auto_gptq/modeling/_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto_gptq/modeling/_base.py b/auto_gptq/modeling/_base.py index c9ef1dbb996126..b11856eed880c4 100644 --- a/auto_gptq/modeling/_base.py +++ b/auto_gptq/modeling/_base.py @@ -357,7 +357,7 @@ def skip(*args, **kwargs): transformers.modeling_utils._init_weights = False torch.set_default_dtype(torch.half) - model = AutoModelForCausalLM.from_config(config) + model = AutoModelForCausalLM.from_config(config, trust_remote_code=True) torch.set_default_dtype(torch.float) model = model.eval() layers = find_layers(model)