Commit
·
b7c78c8
1
Parent(s):
03dc97a
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-tuned-alpha-7b",
|
13 |
tok = AutoTokenizer.from_pretrained("stabilityai/stablelm-tuned-alpha-7b")
|
14 |
generator = pipeline('text-generation', model=m, tokenizer=tok, device=0)
|
15 |
print(f"Sucessfully loaded the model to the memory")
|
|
|
9 |
|
10 |
print(f"Starting to load the model to memory")
|
11 |
m = AutoModelForCausalLM.from_pretrained(
|
12 |
+
"stabilityai/stablelm-tuned-alpha-7b", device_map="auto", load_in_8bit=True).cuda()
|
13 |
tok = AutoTokenizer.from_pretrained("stabilityai/stablelm-tuned-alpha-7b")
|
14 |
generator = pipeline('text-generation', model=m, tokenizer=tok, device=0)
|
15 |
print(f"Sucessfully loaded the model to the memory")
|