How Language Models Work by Hand: Tokens, Embeddings, Attention Weights, Softmax & Sampling with Temperature
Open up a tiny language model in a spreadsheet: token ids, embedding lookups, positional signals, attention scores, softmax and next-token sampling with temperature, with every cell checked as you go.
- One-time payment
- 14-day money-back guarantee
- Secure checkout with Stripe
What you'll build
What you will be able to do
Each lab ends with a concrete result that you build yourself and the checker confirms, cell by cell.
- Turn a split prompt into token ids with a lookup that handles an unknown word, measure tokens per word, compare a character rule of thumb with the real count and price the prompt for a day of traffic.
- Look up a 4-number vector for each token of the prompt, compare tokens with dot products and count the parameters of an embedding table.
- Build sine and cosine position signals for four positions, see how the wavelength grows with the dimension pair and add the signals to the token embeddings.
- Turn each token's input vector into a query, a key and a value with three small weight tables and SUMPRODUCT, and count the weights of a larger attention layer.
- Score every token against every earlier token with q · k ÷ √d_k, block the future with a causal mask and turn each row into attention weights with softmax.
- Mix the value vectors with the attention weights into the output of the attention layer, find which earlier token "boxes" attends to most and chart its weights.
- Turn eight logits into next-token probabilities at a temperature, pick the greedy token, find the top-k cut-off and sample a token with a fixed random number.
- Work out how many input tokens each turn of a chat re-sends, price a turn, see the n × n score grid grow and estimate the memory for the stored keys and values.
About this course
Language models feel like magic until you calculate one yourself. In this course a tiny model lives in a spreadsheet, and you fill in every number. You split a prompt into tokens and ids, look up embedding vectors and compare them with dot products, then add sine and cosine positional signals. With SUMPRODUCT you turn embeddings into queries, keys and values, scale attention scores by the square root of the dimension, apply a causal mask and normalise each row with softmax. You read off which token attends to which, convert final scores into next-token probabilities and compare greedy choice, top-k and temperature sampling. A last lab shows why long chat histories cost more per turn. For curious analysts, students and developers who want intuition without code.
Curriculum
Course content
8 lessons · 8 labs · 2.1 h · final exam
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Unlocked when you buy the course
- Final exam
Certificate
Finish with a certificate you can verify
Complete every lesson and pass the final exam to receive a certificate of completion for this course, with a unique credential ID and a public verification page.
- Names the course, your score and the date of issue
- A verification link for your CV or LinkedIn profile
- 12 questions, 75% to pass, unlimited retries.
A Tutorvo certificate confirms that you completed a course. It is not an official or professional qualification.
Before you buy
Questions about this course
Is this a subscription?
No. You pay $9.99 once for this course. There is no subscription and nothing renews automatically. Prices are in US dollars; taxes may be added where required.
What exactly do I get?
All lessons and labs of this course, the final exam and the certificate, including later updates to the course, for as long as Tutorvo offers it. Access is personal and tied to your account.
Can I get a refund?
Yes. If you are not satisfied, email hello@tutorvo.com within 14 days of buying and we refund the course in full via Stripe. The guarantee does not apply once a certificate for the course has been issued to you, or where there are signs of abuse.
When can I start?
Right after payment. Access starts immediately at your request; for consumers in the EU/EEA the statutory right of withdrawal therefore ends once access has begun, while our 14-day money-back guarantee applies regardless.
Do I need Excel or other software?
No. The labs run in a spreadsheet inside your browser on a laptop, tablet or phone. Function names and syntax follow Excel.
Is the certificate an official qualification?
No. It confirms that you completed all lessons of the course and passed its final exam. It is not an official, state-recognised or professional qualification. The name is taken from your profile when the certificate is issued.
Full details are in our Terms · hello@tutorvo.com
