Downloads · 30 days
7
35% of all-time downloads
prabhsurat/smol_poet_35M
smol_poet_35M is a reinforcement learning model from prabhsurat. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
SmolPoet is a lightweight (~35M parameters) decoder-only transformer model designed for generating poetic text in a Shakespearean and classical style. It is trained on a large-scale poetry corpus and further refined u…
Downloads · 30 days
7
35% of all-time downloads
All-time downloads
20
Public
Repo size
211 MB
Likes
0
Public
Click a slice to open those files.
.pt211 MB · 100%
From the Hugging Face model README
SmolPoet is a lightweight (~35M parameters) decoder-only transformer model designed for generating poetic text in a Shakespearean and classical style. It is trained on a large-scale poetry corpus and further refined using reinforcement learning to enhance stylistic structure and expressiveness.
SmolPoet demonstrates that relatively small language models can produce rich, stylistically aligned text when trained with a combination of large-scale pretraining and reinforcement learning.
The model specializes in:
SmolPoet is inspired by modern LLaMA-style architectures and incorporates several efficiency and performance improvements.
The model is trained on a large corpus of poetry and literary text:
The dataset includes a mixture of classical poetry and Shakespearean-style language, enabling the model to learn:
A custom Byte Pair Encoding (BPE) tokenizer is used:
The model is first trained using standard next-token prediction to learn general language patterns and poetic structure.
After pretraining, the model is refined using Proximal Policy Optimization (PPO) to improve stylistic quality.
The reinforcement learning phase encourages:
A KL-divergence constraint is applied to ensure the model remains close to the pretrained distribution while improving style.
"O gentle night"
Output:
O gentle night, And then the day melted to a night. I heard the performers reply, Who are on foot, I would say, But I my tongue supplied thy
"The starry night"
Output:
The starry night-hawk, stirring the light plunges, And at the wind the storm perchance the morrow. Therefore off, I will suffer more from my tongue
SmolPoet is suitable for:
This model is inspired by advancements in transformer architectures and reinforcement learning methods for language models.