Downloads · 30 days
19
2% of all-time downloads
macedonizer/blaze-koneski
blaze-koneski is a text generation model from macedonizer. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
GPT-2 type of model. We finetuned macedonizer/mk-gpt-2 with Blaze Koneski's poetry.
Downloads · 30 days
19
2% of all-time downloads
All-time downloads
1.1K
Public
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.bin516 MB · 99%
From the Hugging Face model README
GPT-2 type of model. We finetuned macedonizer/mk-gpt-2 with Blaze Koneski's poetry.
Born in a village near Prilep in 1921. Studied philology at Skopje University and worked there as a professor. Was the first chairman of the Macedonian Academy of Sciences and Arts, corresponding member of the Yugoslav Academy of Sciences and Arts, as well as of the Serbian and Slovene Academies, and honorary doctor of the Universities of Chicago and Krakow.
Wrote poetry, short stories, and essays, as well as scholarly works, many of them on the Macedonian language. Editor of the Dictionarv of the Macedonian Language, translator of Heine and Shakespeare. His works have been translated into Serbian, Croatian, Slovene, Albanian, Turkish, Hungarian, French, Russian, Italian, Greek, Polish, Romanian, German, and English.
Winner of numerous prizes, including the Golden Wreath of the Struga Poetry Evenings.
Here is how to use this model to get the features of a given text in PyTorch:
import random from transformers import AutoTokenizer, AutoModelWithLMHead
tokenizer = AutoTokenizer.from_pretrained('macedonizer/blaze-koneski') nmodel = AutoModelWithLMHead.from_pretrained('macedonizer/blaze-koneski')
input_text = 'Москва '
if len(input_text) == 0:
encoded_input = tokenizer(input_text, return_tensors="pt")
output = model.generate(
bos_token_id=random.randint(1, 50000),
do_sample=True,
top_k=50,
max_length=1024,
top_p=0.95,
num_return_sequences=1,
)
else:
encoded_input = tokenizer(input_text, return_tensors="pt")
output = model.generate(
**encoded_input,
bos_token_id=random.randint(1, 50000),
do_sample=True,
top_k=50,
max_length=1024,
top_p=0.95,
num_return_sequences=1,
)
decoded_output = []
for sample in output:
decoded_output.append(tokenizer.decode(sample, skip_special_tokens=True))
print(decoded_output)