
dependencies; however, they suffered from repetition
in phrasing, lack of creativity, and poor structural co-
herence (Kiros et al., 2015).
The transformer-based architectures, such as GPT,
have revolutionized the NLP by generating even
longer and more context coherent text through self-
attention mechanisms (Vaswani et al., 2017; Brown
et al., 2020). OpenAI GPT-3 demonstrated mar-
velous capabilities in language understanding and
generation but was proprietary, and researchers de-
veloped open-source alternatives like GPT-Neo by
EleutherAI. Open-source GPT-Neo offers comparable
performance and flexibility while fine-tuning on par-
ticular domain-specific tasks (EleutherAI, 2021; Gao
et al., 2021).
The goal of this research is to fine-tune the pre-
trained language model GPT-Neo for creative text
generation in the form of limericks. Limericks, which
have a unique rhythmic structure and rhyme scheme,
are quite challenging for natural language generation
models. The proposed work evaluates the ability of
GPT-Neo to generate coherent and structurally con-
sistent limericks and assesses its limitations in pro-
ducing precise rhyme patterns. Moreover, it compares
the performance of GPT-Neo to other language mod-
els, mainly focusing on the generation speed, token
efficiency, readability, and creativity.
This paper aims at using GPT-Neo in generat-
ing poetry through the transformer architecture. This
would look to overcome challenges in the creative
text generation. In this regard, we fine-tune GPT-
Neo on a well-curated limerick dataset to produce
coherent, stylistically aligned, and emotive content.
Through systematic experimentation and evaluation,
we strive to extend the frontiers of AI-driven creativ-
ity and demonstrate the ability of AI systems to con-
tribute meaningfully to the creative arts. This work
highlights the strengths and limitations of GPT-Neo
in poetic composition and points to future avenues
for improvement in generating more structurally and
rhythmically precise poetry.
The paper is structured as follows: Section 2 pro-
vides the background study, reviewing previous re-
search on poetry generation, focusing on the limita-
tions of various models, including GPT-3, and com-
paring their ability to generate rhyming and struc-
tured text. Section 3 describes the architecture, com-
ponents, and implementation of GPT-Neo for gener-
ating structured limericks. GPT-Neo, a transformer-
based AI model, processes text using layers of self-
attention, normalization, and feedforward networks to
ensure coherence and meaningful output. Section 4
demonstrates GPT-Neo’s enhanced ability to gener-
ate coherent limericks through fine-tuning, achieving
improvements in perplexity, entropy, and readability.
Results highlight efficient token generation, balanced
creativity, and adherence to poetic structures. Section
5 concludes the study, summarizing the achievements
of our fine-tuned GPT-Neo model in generating co-
herent and engaging limericks. Future research will
refine rhythmic accuracy to enhance the traditional
musicality of limericks, bridging technology and art.
2 BACKGROUND STUDY
Automatic poetry generation has evolved from rule-
based systems to modern deep learning methods.
Early systems were based on strict templates, en-
suring grammatical correctness but lacked creativity
(Mtasher et al., 2023). Statistical models like Hidden
Markov Models (HMMs) (Awad and Khanna, 2015)
and n-grams introduced probabilistic word prediction
(Fang, 2024) but failed to capture abstract poetic ele-
ments.
The advent of neural networks marked signifi-
cant progress. Recurrent Neural Networks (RNNs)
and their advanced variants, such as Long Short-Term
Memory (LSTM) networks (Hochreiter and Schmid-
huber, 1997) and Gated Recurrent Units (GRUs)
(Ahmad and Joglekar, 2022), collectively known as
Seq2Seq models, improved coherence of poetic out-
puts but suffered issues like repetitive phrasing and
thematic drift (Wang et al., 2022). Attention mecha-
nisms added these models by improving the contex-
tual focus (Horishny, 2022).
Transformer-based architectures transformed the
landscape of text generation. Creativity and stylistic
richness were demonstrated by models such as GPT-2
(Lo et al., 2022) and GPT-3 (Katar et al., 2022), but
these models are mainly general-purpose text models,
leaving poetry generation relatively under-explored
(Fang, 2024). Innovations specific to poetry include
CharPoet, which is best for Chinese classical poetry
(Yu et al., 2024), and ByT5, which achieves high
beat accuracy in English rhythmic poetry (Elzohbi
and Zhao, 2024). For Urdu poetry, LSTMs and GRUs
maintain linguistic and stylistic features, though there
are still challenges in morphology and datasets.
Fine-tuning methods have really enhanced the ap-
plicability of pre-trained models to tasks on poetry.
For example, GPT-2 and GPT-Neo have been able to
learn with high proficiency nuanced themes, rhyme
schemes, and depth of emotions when fine-tuned on
curated poetry datasets (Yu et al., 2024). Still, there
remain challenges like a lack of standardized datasets
and benchmarks to evaluate the quality of poetry in
this field of research (Fang, 2024). Closing the men-
INCOFT 2025 - International Conference on Futuristic Technology
190