vvsotnikov
commited on
Commit
•
51b7b28
1
Parent(s):
117a240
Update README.md
Browse files
README.md
CHANGED
@@ -24,9 +24,10 @@ datasets:
|
|
24 |
Get started chatting with `StableLM-Tuned-Alpha 16-bit` by using the following code snippet:
|
25 |
|
26 |
```python
|
|
|
27 |
from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList
|
28 |
tokenizer = AutoTokenizer.from_pretrained("vvsotnikov/stablelm-tuned-alpha-3b-16bit")
|
29 |
-
model = AutoModelForCausalLM.from_pretrained("vvsotnikov/stablelm-tuned-alpha-3b-16bit")
|
30 |
model.cuda()
|
31 |
class StopOnTokens(StoppingCriteria):
|
32 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|
|
|
24 |
Get started chatting with `StableLM-Tuned-Alpha 16-bit` by using the following code snippet:
|
25 |
|
26 |
```python
|
27 |
+
import torch
|
28 |
from transformers import AutoModelForCausalLM, AutoTokenizer, StoppingCriteria, StoppingCriteriaList
|
29 |
tokenizer = AutoTokenizer.from_pretrained("vvsotnikov/stablelm-tuned-alpha-3b-16bit")
|
30 |
+
model = AutoModelForCausalLM.from_pretrained("vvsotnikov/stablelm-tuned-alpha-3b-16bit", torch_dtype=torch.float16)
|
31 |
model.cuda()
|
32 |
class StopOnTokens(StoppingCriteria):
|
33 |
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
|