Downloads · 30 days
14
16% of all-time downloads
anasalter/dante-inferno-gpt2
dante-inferno-gpt2 is a text generation model from anasalter. Use it when you need the model to write or continue text. The card lists the license as mit.
This model generates poetry inspired by Dante's Inferno. It was fine-tuned on the text from Project Gutenberg using GPT-2 with proper attention mask handling.
Downloads · 30 days
14
16% of all-time downloads
All-time downloads
85
Public
Parameters
124M
996 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors498 MB · 100%
From the Hugging Face model README
This model generates poetry inspired by Dante's Inferno. It was fine-tuned on the text from Project Gutenberg using GPT-2 with proper attention mask handling.
from transformers import GPT2LMHeadModel, GPT2Tokenizer
model = GPT2LMHeadModel.from_pretrained('anasalter/dante-inferno-gpt2')
tokenizer = GPT2Tokenizer.from_pretrained('anasalter/dante-inferno-gpt2')
prompt = "In the middle of"
inputs = tokenizer(prompt, return_tensors='pt')
outputs = model.generate(
inputs['input_ids'],
attention_mask=inputs['attention_mask'],
max_length=100,
temperature=0.8,
do_sample=True,
pad_token_id=tokenizer.pad_token_id
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))