Back to articles
How ChatGPT Actually Predicts Words (Explained Simply)

How ChatGPT Actually Predicts Words (Explained Simply)

via Dev.toRajkiran

Many people believe ChatGPT is a search engine or a giant database of pre-written answers. In reality, it is neither. ChatGPT is a prediction engine. It generates text by calculating the most statistically probable "token" that should come next in a sequence. Tokenization: The Language of Numbers ChatGPT doesn't see "words"; it sees tokens. Through a process called Tokenization, the model slices text into pieces and assigns each a unique ID. Common words (like "the") get their own ID because they appear frequently in the vocabulary. Rare or complex words (like "bioluminescence") are sliced into sub-tokens, each with its own ID. This isn't a random dictionary. It is built using Byte-Pair Encoding (BPE), a sub-word algorithm trained on massive datasets (with a vocabulary of 50,000 to 100,000 tokens) that iteratively merges common character sequences into single tokens. The Giant Game of "Fill in the Blanks" Text generation is essentially a high-stakes game of probability powered by Weigh

Continue reading on Dev.to

Opens in a new tab

Read Full Article
1 views

Related Articles