New Beatles Lyrics Generated with GPT-2 #GPT2 #Beatles #MachineLearning #ArtificialIntelligence #DeepLearning #OpenAI

“Photograph of The Beatles as they arrive in New York City in 1964” from the Wikimedia Foundation and the United States Library of Congress‘s Prints and Photographs division. This work is in the public domain in the United States because it was published in the United States between 1924 and 1977 without a copyright notice.


There are a number of interesting examples of generating text with AI including sports stats and fun/ridiculous costume ideas. In a recent toward data science article Eugene Hotaj uses language models to predict new Beatles’ lyrics. Hotaj starts off with a simple bigrams approach which predicts the next word in a series based on probability. The resulting lyrics are pretty obtuse:

A never-before-seen Beatles’ song

Here’s a small snippet of one of the songs the bigram model generates:


She’s so I love her heart.

Well they are; they said I’m so many,

She no surprise

When you’re mine

Sad and the Amsterdam Hilton

they make my way,

Yes I wait a boy been born with a rich man,

all share

Hotaj discusses the limitations of bigrams, trigrams, and n-grams highlighting that this approach will eventually overfit returning actual Beatles’ songs. To create NEW Beatles’ lyrics, Hotaj decided to use OpenAI’s GPT-2 algorithm. The GPT-2 algorithm is a transformer model that can generate highly realistic text. Although the full-sized model was not released there are a number of smaller versions of the model available for use. Utilizing transfer methodology, Hotaj tuned the trained model to generate new lyrics from the Beatles lyric dataset. Hotaj gives an example of underfit lyrics, overfit lyrics and some that are just right (after fine-tuning for ~350 batches). The model learns pretty quickly that it needs to give the song a title and attribution (which is included in the data sets). Example lyrics below!:

Woman in Black

Lennon & McCartney

I’d make a scene

If you don’t want me to appear

You might as well leave me alone.

I’m near death and I’m in love

It’s not quite Lennon and McCartney but it’s a start! Take a look at the article on if you’d like to see some more of the NEW GPT2 Beatles’ lyrics. If you’d like to take a look at the code, check out Eugene Hotaj on GitHub. If you’d like to learn how to use the GPT-2 model for your next language project check out this post.

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Join 30,000+ makers on Adafruit’s Discord channels and be part of the community!

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more

CircuitPython – The easiest way to program microcontrollers –

Maker Business — Savannah tells the story of the supply chain crisis in the U.S.

Wearables — Feathers from leather

Electronics — Get Oriented!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Events, Projects, and much more! #Python #Adafruit #CircuitPython @micropython @ThePSF

Adafruit IoT Monthly — No-Code IoT with WipperSnapper, Beaming Internet across the Congo, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — New Products 10/20/21 feat. DIN Rail 10×10 to Terminal Block Adapter!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at !

No Comments

No comments yet.

Sorry, the comment form is closed at this time.