Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ from threading import Thread
|
|
9 |
|
10 |
print(f"Starting to load the model to memory")
|
11 |
m = AutoModelForCausalLM.from_pretrained(
|
12 |
-
"stabilityai/stablelm-2-zephyr-1_6b", torch_dtype=torch.float16, trust_remote_code=True)
|
13 |
tok = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-zephyr-1_6b", trust_remote_code=True)
|
14 |
# using CUDA for an optimal experience
|
15 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
9 |
|
10 |
print(f"Starting to load the model to memory")
|
11 |
m = AutoModelForCausalLM.from_pretrained(
|
12 |
+
"stabilityai/stablelm-2-zephyr-1_6b", torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32, trust_remote_code=True)
|
13 |
tok = AutoTokenizer.from_pretrained("stabilityai/stablelm-2-zephyr-1_6b", trust_remote_code=True)
|
14 |
# using CUDA for an optimal experience
|
15 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|