Put model on GPU
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def load_model_on_selection(model_name, progress=gr.Progress(track_tqdm=False)):
|
|
19 |
current_model = AutoModelForCausalLM.from_pretrained(
|
20 |
model_name,
|
21 |
torch_dtype=torch.float16,
|
22 |
-
device_map="
|
23 |
use_auth_token=token
|
24 |
)
|
25 |
|
|
|
19 |
current_model = AutoModelForCausalLM.from_pretrained(
|
20 |
model_name,
|
21 |
torch_dtype=torch.float16,
|
22 |
+
device_map="cuda",
|
23 |
use_auth_token=token
|
24 |
)
|
25 |
|