Spaces:
Runtime error
Runtime error
Commit
·
d0555d0
1
Parent(s):
5009b7f
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ from threading import Thread
|
|
10 |
|
11 |
|
12 |
model_path = "ayoolaolafenwa/ChatLM"
|
13 |
-
|
14 |
-
tokenizer = AutoTokenizer.from_pretrained(model_path
|
15 |
|
16 |
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code = True, device_map = "auto",
|
17 |
-
torch_dtype=torch.bfloat16, load_in_8bit=True
|
18 |
|
19 |
class StopOnTokens(StoppingCriteria):
|
20 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|
|
|
10 |
|
11 |
|
12 |
model_path = "ayoolaolafenwa/ChatLM"
|
13 |
+
|
14 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
15 |
|
16 |
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code = True, device_map = "auto",
|
17 |
+
torch_dtype=torch.bfloat16, load_in_8bit=True)
|
18 |
|
19 |
class StopOnTokens(StoppingCriteria):
|
20 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|