Didier commited on
Commit
e40f135
·
verified ·
1 Parent(s): 37f622b

Update vlm.py

Browse files
Files changed (1) hide show
  1. vlm.py +1 -1
vlm.py CHANGED
@@ -14,7 +14,7 @@ import torch
14
  #
15
  # Load the model: google/gemma-3-4b-it
16
  #
17
- device = 'mps'
18
  model_id = "google/gemma-3-4b-it"
19
  processor = AutoProcessor.from_pretrained(model_id, use_fast=True, padding_side="left")
20
  model = Gemma3ForConditionalGeneration.from_pretrained(
 
14
  #
15
  # Load the model: google/gemma-3-4b-it
16
  #
17
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
18
  model_id = "google/gemma-3-4b-it"
19
  processor = AutoProcessor.from_pretrained(model_id, use_fast=True, padding_side="left")
20
  model = Gemma3ForConditionalGeneration.from_pretrained(