Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
e24b19e
1
Parent(s):
c5183c8
trust_remote_code=True
Browse files- utils/models.py +4 -2
utils/models.py
CHANGED
@@ -101,8 +101,10 @@ 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 |
-
|
|
|
|
|
106 |
print(f"Recognized {model_name} as a Qwen3 model. Setting enable_thinking=False.")
|
107 |
model_kwargs["enable_thinking"] = False
|
108 |
|
|
|
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
|
110 |
|