diff --git a/modules/GPTQ_loader.py b/modules/GPTQ_loader.py index e3f579ef..e9acbbd6 100644 --- a/modules/GPTQ_loader.py +++ b/modules/GPTQ_loader.py @@ -34,7 +34,7 @@ def _load_quant(model, checkpoint, wbits, groupsize=-1, faster_kernel=False, exc def noop(*args, **kwargs): pass - config = AutoConfig.from_pretrained(model) + config = AutoConfig.from_pretrained(model, trust_remote_code=shared.args.trust_remote_code) torch.nn.init.kaiming_uniform_ = noop torch.nn.init.uniform_ = noop torch.nn.init.normal_ = noop @@ -42,7 +42,7 @@ def _load_quant(model, checkpoint, wbits, groupsize=-1, faster_kernel=False, exc torch.set_default_dtype(torch.half) 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=shared.args.trust_remote_code) torch.set_default_dtype(torch.float) if eval: model = model.eval()