oliver-aizip commited on
Commit
f35135e
·
1 Parent(s): e24b19e

change where trust_remote is applied

Browse files
Files changed (1) hide show
  1. utils/models.py +2 -3
utils/models.py CHANGED
@@ -101,9 +101,7 @@ def run_inference(model_name, context, question):
101
 
102
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
103
  result = ""
104
- model_kwargs = {
105
- "trust_remote_code": True,
106
- } # make sure qwen3 doesn't use thinking
107
  if "qwen3" in model_name.lower():
108
  print(f"Recognized {model_name} as a Qwen3 model. Setting enable_thinking=False.")
109
  model_kwargs["enable_thinking"] = False
@@ -131,6 +129,7 @@ def run_inference(model_name, context, question):
131
  temperature=0.6,
132
  top_p=0.9,
133
  model_kwargs=model_kwargs,
 
134
  )
135
 
136
  text_input = format_rag_prompt(question, context, accepts_sys)
 
101
 
102
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
103
  result = ""
104
+ model_kwargs = {} # make sure qwen3 doesn't use thinking
 
 
105
  if "qwen3" in model_name.lower():
106
  print(f"Recognized {model_name} as a Qwen3 model. Setting enable_thinking=False.")
107
  model_kwargs["enable_thinking"] = False
 
129
  temperature=0.6,
130
  top_p=0.9,
131
  model_kwargs=model_kwargs,
132
+ trust_remote_code=True,
133
  )
134
 
135
  text_input = format_rag_prompt(question, context, accepts_sys)