Downloads · 30 days
33
3% of all-time downloads
domsebalj/GPcroaT
GPcroaT is a text generation model from domsebalj. Use it when you need the model to write or continue text. It is set up for transformers.
If you use this model for own tasks, please share your results in the community tab.
Downloads · 30 days
33
3% of all-time downloads
All-time downloads
1K
Public
Repo size
498 MB
Likes
2
Public
Click a slice to open those files.
.h5498 MB · 100%
From the Hugging Face model README
If you use this model for own tasks, please share your results in the community tab.
With Tensorflow you can use:
from transformers import GPT2Tokenizer, TFGPT2Model
tokenizer = GPT2Tokenizer.from_pretrained("domsebalj/GPcroaT")
model = TFGPT2LMHeadModel.from_pretrained("domsebalj/GPcroaT")
text = "Zamijeni ovaj tekst vlastitim"
input_ids = tokenizer.encode(text, return_tensors='tf')
beam_output = model.generate(
input_ids,
max_length = 80,
min_length = 10,
num_beams = 10,
temperature = 5.7,
no_repeat_ngram_size=2,
num_return_sequences=5,
repetition_penalty =7.5,
length_penalty = 1.5,
top_k = 50
)
output = []
for i in beam_output:
output.append(tokenizer.decode(i))
print(output)