Wills17 commited on
Commit
34d486d
·
verified ·
1 Parent(s): b79e1b0

Update FastAPI_app.py

Browse files
Files changed (1) hide show
  1. 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="auto")
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