Update app.py
Browse files
app.py
CHANGED
@@ -35,11 +35,11 @@ async def lifespan(app: FastAPI):
|
|
35 |
|
36 |
model = AutoModelForCausalLM.from_pretrained(
|
37 |
model_name,
|
38 |
-
|
39 |
-
|
40 |
)
|
41 |
|
42 |
-
log("✅ Model ve tokenizer başarıyla hazır.")
|
43 |
yield # Uygulama burada çalışır
|
44 |
|
45 |
except Exception as e:
|
|
|
35 |
|
36 |
model = AutoModelForCausalLM.from_pretrained(
|
37 |
model_name,
|
38 |
+
device_map="auto",
|
39 |
+
load_in_8bit=True # ✅ 8-bit quantization
|
40 |
)
|
41 |
|
42 |
+
log("✅ Model ve tokenizer başarıyla hazır (8-bit quantized).")
|
43 |
yield # Uygulama burada çalışır
|
44 |
|
45 |
except Exception as e:
|