Update README.md
Browse files
README.md
CHANGED
@@ -22,9 +22,10 @@ from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
|
22 |
import torch
|
23 |
DEVICE = torch.device("cuda:0")
|
24 |
|
25 |
-
model_name_or_path = "
|
26 |
-
tokenizer = GPT2Tokenizer.from_pretrained(
|
27 |
-
model = GPT2LMHeadModel.from_pretrained(
|
|
|
28 |
text = "В чем смысл жизни?\n"
|
29 |
input_ids = tokenizer.encode(text, return_tensors="pt").to(DEVICE)
|
30 |
model.eval()
|
|
|
22 |
import torch
|
23 |
DEVICE = torch.device("cuda:0")
|
24 |
|
25 |
+
model_name_or_path = "radm/rugpt3medium-tathagata"
|
26 |
+
tokenizer = GPT2Tokenizer.from_pretrained("sberbank-ai/rugpt3medium_based_on_gpt2")
|
27 |
+
model = GPT2LMHeadModel.from_pretrained(model_name_or_path).to(DEVICE)
|
28 |
+
|
29 |
text = "В чем смысл жизни?\n"
|
30 |
input_ids = tokenizer.encode(text, return_tensors="pt").to(DEVICE)
|
31 |
model.eval()
|