Spaces:
Running
on
A10G
Running
on
A10G
osanseviero
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,8 @@ from transformers import pipeline
|
|
6 |
import spaces
|
7 |
|
8 |
import torch
|
9 |
-
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
10 |
-
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
11 |
|
12 |
-
pipe_flan = pipeline("text2text-generation", model="philschmid/flan-t5-xxl-sharded-fp16", model_kwargs={"load_in_8bit":True
|
13 |
pipe_vanilla = pipeline("text2text-generation", model="t5-large", device="cuda:0", model_kwargs={"torch_dtype":torch.bfloat16})
|
14 |
|
15 |
examples = [
|
|
|
6 |
import spaces
|
7 |
|
8 |
import torch
|
|
|
|
|
9 |
|
10 |
+
pipe_flan = pipeline("text2text-generation", model="philschmid/flan-t5-xxl-sharded-fp16", device="cuda:0", model_kwargs={"load_in_8bit":True})
|
11 |
pipe_vanilla = pipeline("text2text-generation", model="t5-large", device="cuda:0", model_kwargs={"torch_dtype":torch.bfloat16})
|
12 |
|
13 |
examples = [
|