TensoriumInterview preparation
← Core concepts

Beginner path · 3 lessons · about 30 minutes

From text to a prediction

For anyone comfortable with basic arithmetic and new to machine learning. Each lesson starts with a concrete problem, works one operation with small numbers, asks you to predict what changes, and only then names the idea. Nothing is scored: try options freely and reveal the working whenever you like.

Step 1 of 7 · jump to any step

The situation

A model can only calculate with numbers

A language model is one large calculation: numbers go in, numbers come out. Our running sentence is the cat sat on the mat. Before the model can do anything with it, the text has to become a list of numbers.

The first step is to cut the text into pieces called tokens and look each piece up in a fixed list, the vocabulary.

thecatsatonthemat

Finish line

You can explain how text becomes a prediction and what training does to improve that prediction.

text → token IDs → vectors → scores → probabilities → loss → parameter update