Gaivoronsky
commited on
Commit
•
40643c4
1
Parent(s):
ceaf918
Update README.md
Browse files
README.md
CHANGED
@@ -12,6 +12,13 @@ tags:
|
|
12 |
## Examples of usage
|
13 |
|
14 |
```python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
request = "Человек: Сколько весит жираф? Помощник: "
|
16 |
encoded_input = tokenizer(request, return_tensors='pt', \
|
17 |
add_special_tokens=False).to('cuda')
|
|
|
12 |
## Examples of usage
|
13 |
|
14 |
```python
|
15 |
+
from transformers import GPT2LMHeadModel, AutoTokenizer
|
16 |
+
|
17 |
+
model = GPT2LMHeadModel.from_pretrained('ruGPT-3.5-13B-fp16')
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained('ruGPT-3.5-13B-fp16')
|
19 |
+
model = model.half()
|
20 |
+
model = model.to('cuda')
|
21 |
+
|
22 |
request = "Человек: Сколько весит жираф? Помощник: "
|
23 |
encoded_input = tokenizer(request, return_tensors='pt', \
|
24 |
add_special_tokens=False).to('cuda')
|