Tokens and Next-Token Prediction

How LLMs Work Intermediate 3 min read Published
In this lesson

Every large language model (LLM), however clever it looks, does one job: given some text, it predicts what comes next. It writes an answer one small piece at a time, adding each piece to the text and predicting again.

Those small pieces are called tokens.

🔒 This is a premium lesson

It is part of the Gen AI Developer career track.

🎬 Live animations · 🧪 Tested code · 💼 Projects · 🎓 Certificate

See the track

Already a member? Sign in

Progress is saved in this browser. Create a free account to keep it on every device.