Spaces:
Sleeping
Sleeping
Commit
·
7b971c7
1
Parent(s):
6ac2a7b
Add application file
Browse files
app.py
CHANGED
@@ -3,8 +3,11 @@ import torch
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList, TextIteratorStreamer
|
4 |
from threading import Thread
|
5 |
|
6 |
-
tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1")
|
7 |
-
model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16)
|
|
|
|
|
|
|
8 |
|
9 |
class StopOnTokens(StoppingCriteria):
|
10 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|
|
|
3 |
from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList, TextIteratorStreamer
|
4 |
from threading import Thread
|
5 |
|
6 |
+
#tokenizer = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1")
|
7 |
+
#model = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16)
|
8 |
+
|
9 |
+
tokenizer = AutoTokenizer.from_pretrained("aaditya/OpenBioLLM-Llama3-8B-GGUF")
|
10 |
+
model = AutoModelForCausalLM.from_pretrained("openbiollm-llama3-8b.Q5_K_M.gguf", torch_dtype=torch.float16)
|
11 |
|
12 |
class StopOnTokens(StoppingCriteria):
|
13 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|