Update app.py
Browse files
app.py
CHANGED
|
@@ -15,10 +15,11 @@ lora_repo = "alinasdkey/unsloth-pret-lora"
|
|
| 15 |
# Load base model
|
| 16 |
model, processor = FastVisionModel.from_pretrained(
|
| 17 |
model_name = model_name,
|
| 18 |
-
device_map = "
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 22 |
)
|
| 23 |
|
| 24 |
# Applying LoRA adapter from the root of the repo)
|
|
|
|
| 15 |
# Load base model
|
| 16 |
model, processor = FastVisionModel.from_pretrained(
|
| 17 |
model_name = model_name,
|
| 18 |
+
device_map = "auto", # or "cuda" if you're sure you're on GPU
|
| 19 |
+
load_in_4bit = False, # Use 8bit if you're on CPU
|
| 20 |
+
load_in_8bit = True, # Set this to True
|
| 21 |
+
# remove torch_dtype entirely
|
| 22 |
+
)
|
| 23 |
)
|
| 24 |
|
| 25 |
# Applying LoRA adapter from the root of the repo)
|