Gaivoronsky
commited on
Commit
•
ceaf918
1
Parent(s):
0a474c9
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
language:
|
4 |
+
- ru
|
5 |
+
- en
|
6 |
+
pipeline_tag: text-generation
|
7 |
+
tags:
|
8 |
+
- gpt3
|
9 |
+
- transformers
|
10 |
+
- pytorch
|
11 |
+
---
|
12 |
+
## Examples of usage
|
13 |
+
|
14 |
+
```python
|
15 |
+
request = "Человек: Сколько весит жираф? Помощник: "
|
16 |
+
encoded_input = tokenizer(request, return_tensors='pt', \
|
17 |
+
add_special_tokens=False).to('cuda')
|
18 |
+
output = model.generate(
|
19 |
+
**encoded_input,
|
20 |
+
num_beams=2,
|
21 |
+
do_sample=True,
|
22 |
+
max_new_tokens=100
|
23 |
+
)
|
24 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
25 |
+
```
|