alinasdkey commited on
Commit
8157279
·
verified ·
1 Parent(s): 2361b06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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 = "cpu",
19
- torch_dtype = torch.float32,
20
- load_in_4bit =True,
21
- load_in_8bit = False,
 
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)