Understanding the First Step of GPT-2: Words into Input Embeddings
pub.towardsai.net·15h
Flag this post

Member-only story

Words, once rich with meaning, dissolve into a symphony of numbers.

8 min readJan 9, 2025

Press enter or click to view image in full size

Unlike images or numbers, which can be directly fed into machines, text needs a little extra work. Words and sentences, full of meaning, aren’t something a machine can understand just as they are. To make sense of them, we have to turn these words into numbers. Once in numeric form, the machine can start to work with the data, processing it in a way that makes sense in its own mathematical world. One of the simplest ways to convert words into numbers is by using a method called “one-hot encoding.” For the purpose of this article, I will use the sentence “The bank was closed because of the flood” as the corpus for trai…

Similar Posts

Loading similar posts...