Spaces:
Runtime error
Runtime error
changed model to m
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from threading import Thread
|
|
| 10 |
# init
|
| 11 |
tok = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1")
|
| 12 |
m = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16)
|
| 13 |
-
m =
|
| 14 |
|
| 15 |
class StopOnTokens(StoppingCriteria):
|
| 16 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|
|
|
|
| 10 |
# init
|
| 11 |
tok = AutoTokenizer.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1")
|
| 12 |
m = AutoModelForCausalLM.from_pretrained("togethercomputer/RedPajama-INCITE-Chat-3B-v1", torch_dtype=torch.float16)
|
| 13 |
+
m = m.to('cuda:0')
|
| 14 |
|
| 15 |
class StopOnTokens(StoppingCriteria):
|
| 16 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|