Skip to content

Commit

Permalink
Fix lm-eval neuralspeed loading model (#1359)
Browse files Browse the repository at this point in the history
  • Loading branch information
changwangss committed Mar 11, 2024
1 parent c65cec7 commit cd6e488
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,8 @@ def __init__(self, *args, pretrained, model_format, **kwargs):
if self.model_format == "runtime":
from transformers import AutoTokenizer, TextStreamer
from intel_extension_for_transformers.transformers import AutoModelForCausalLM
self.runtime_model = AutoModelForCausalLM.from_pretrained(pretrained, quantization_config=self.woq_config)
self.runtime_model = AutoModelForCausalLM.from_pretrained(pretrained, quantization_config=self.woq_config,
trust_remote_code=kwargs.get("trust_remote_code", False))

if self.model_format == "onnx":
if not os.path.exists(os.path.join(pretrained, "decoder_model.onnx")) and \
Expand Down

0 comments on commit cd6e488

Please sign in to comment.