Spaces:
Paused
Paused
0x7o
commited on
Commit
•
ed96116
1
Parent(s):
e738d31
Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ from transformers import StoppingCriteria, StoppingCriteriaList, TextIteratorStr
|
|
6 |
from threading import Thread
|
7 |
|
8 |
# Loading the tokenizer and model from Hugging Face's model hub.
|
9 |
-
|
10 |
-
|
11 |
-
model.
|
12 |
|
13 |
|
14 |
# Defining a custom stopping criteria class for the model's text generation.
|
|
|
6 |
from threading import Thread
|
7 |
|
8 |
# Loading the tokenizer and model from Hugging Face's model hub.
|
9 |
+
if torch.cuda.is_available():
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained("0x7194633/fialka-13B-v3.1")
|
11 |
+
model = AutoModelForCausalLM.from_pretrained("0x7194633/fialka-13B-v3.1", load_in_8bit=True, device_map="auto")
|
12 |
|
13 |
|
14 |
# Defining a custom stopping criteria class for the model's text generation.
|