Samuel Thomas commited on
Commit
7753f0c
·
1 Parent(s): 82de5c7

auto device

Browse files
Files changed (1) hide show
  1. tools.py +2 -2
tools.py CHANGED
@@ -98,7 +98,7 @@ class State(TypedDict, total=False):
98
  llm_pipe = pipeline(
99
  "text-generation",
100
  model="microsoft/Phi-3-mini-4k-instruct",
101
- device_map=0,
102
  torch_dtype="auto",
103
  max_new_tokens=256
104
  )
@@ -117,7 +117,7 @@ rag_model = RagSequenceForGeneration.from_pretrained("facebook/rag-token-base",
117
  asr_pipe = pipeline(
118
  "automatic-speech-recognition",
119
  model="openai/whisper-small",
120
- device=0
121
  )
122
 
123
  # --- BLIP VQA setup ---
 
98
  llm_pipe = pipeline(
99
  "text-generation",
100
  model="microsoft/Phi-3-mini-4k-instruct",
101
+ device_map="auto",
102
  torch_dtype="auto",
103
  max_new_tokens=256
104
  )
 
117
  asr_pipe = pipeline(
118
  "automatic-speech-recognition",
119
  model="openai/whisper-small",
120
+ device="auto"
121
  )
122
 
123
  # --- BLIP VQA setup ---