ariG23498 HF staff commited on
Commit
2b1bf5b
·
verified ·
1 Parent(s): 60f50de

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -5,7 +5,7 @@ import torch
5
 
6
  app = FastAPI()
7
 
8
- checkpoint = "Qwen/Qwen2.5-VL-7B-Instruct"
9
  min_pixels = 256*28*28
10
  max_pixels = 1280*28*28
11
  processor = AutoProcessor.from_pretrained(
@@ -16,7 +16,7 @@ processor = AutoProcessor.from_pretrained(
16
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
17
  checkpoint,
18
  torch_dtype=torch.bfloat16,
19
- device_map="cuda",
20
  # attn_implementation="flash_attention_2",
21
  )
22
 
 
5
 
6
  app = FastAPI()
7
 
8
+ checkpoint = "Qwen/Qwen2.5-VL-3B-Instruct"
9
  min_pixels = 256*28*28
10
  max_pixels = 1280*28*28
11
  processor = AutoProcessor.from_pretrained(
 
16
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
17
  checkpoint,
18
  torch_dtype=torch.bfloat16,
19
+ device_map="auto",
20
  # attn_implementation="flash_attention_2",
21
  )
22