Update README.md

#1
by mrrano - opened

from transformers import GPT2LMHeadModel, GPT2Tokenizer
model_name_or_path = "sberbank-ai/rugpt3large_based_on_gpt2" (можно использовать sberbank-ai/rugpt3xl)
tokenizer = GPT2Tokenizer.from_pretrained(model_name_or_path)
model = GPT2LMHeadModel.from_pretrained(model_name_or_path).cpu()
text = "Иисус Христос родился в "
input_ids = tokenizer.encode(text, return_tensors="pt").cpu()
out = model.generate(input_ids.cpu())
print(generated_text)
generated_text = list(map(tokenizer.decode, out))[0]
print(generated_text)

OSError: sberbank-ai/rugpt3xl does not appear to have a file named config.json. Checkout 'https://huggingface.co/sberbank-ai/rugpt3xl/main' for available files.

укажи путь на конфы например от rugpt3large_based_on_gpt2

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment