Spaces:
Running
Running
Update FastAPI_app.py
Browse files- FastAPI_app.py +1 -1
FastAPI_app.py
CHANGED
|
@@ -131,7 +131,7 @@ def load_Qwen():
|
|
| 131 |
try:
|
| 132 |
print("\n🔵 [Fallback] Loading Qwen2.5-1.5B-Instruct")
|
| 133 |
_tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", trust_remote_code=True)
|
| 134 |
-
_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", device_map="auto", torch_dtype=
|
| 135 |
print("\n🟢 [Fallback] Qwen ready!")
|
| 136 |
return _tokenizer, _model
|
| 137 |
|
|
|
|
| 131 |
try:
|
| 132 |
print("\n🔵 [Fallback] Loading Qwen2.5-1.5B-Instruct")
|
| 133 |
_tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", trust_remote_code=True)
|
| 134 |
+
_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct", device_map="auto", torch_dtype=torch.float16)
|
| 135 |
print("\n🟢 [Fallback] Qwen ready!")
|
| 136 |
return _tokenizer, _model
|
| 137 |
|