Large Language Models · 18 problems · 3 optional · 3 project ideas

Problem sheet

Beginner

5 problems

Vocabularies and Token IDs

tokenization · vocabulary · special-tokens

Next-Token Probabilities (Add-k)

language-modeling · next-token · smoothing

Logits, Temperature and Softmax

temperature · softmax · entropy

Greedy Decoding

decoding · greedy · autoregressive

Perplexity

perplexity · evaluation · cross-entropy

Intermediate

7 problems

Byte-Pair Encoding Merges

bpe · subword-tokenization · tokenizers

Scaled Dot-Product Attention

attention · transformers · softmax

Causal Masking

causal-mask · padding-mask · autoregressive

Sinusoidal Positional Encoding

positional-encoding · transformers · sinusoids

Multi-Head Attention

multi-head-attention · transformers · reshaping

A Transformer Block as nn.Module

pytorch · transformer · attention

A Pre-Norm Transformer Block by HandOptional

transformer · layer-norm · residual-connections

Advanced

9 problems

Top-k and Top-p Filtering

sampling · top-k · top-p

Beam Search

beam-search · decoding · log-probabilities

Incremental Decoding with a KV Cache

kv-cache · inference · efficiency

A Tiny GPT in PyTorch

pytorch · language-model · gpt

Chat Prompts and Messages with LangChain

langchain · prompts · chat-models

Chat Prompt TemplatesOptional

prompting · chat-templates · prompt-injection

Structured Output with Pydantic and Retries

langchain · structured-output · pydantic

Retrieval-Augmented Generation with LangChain

langchain · rag · retrieval

Retrieval-Augmented Generation by HandOptional

rag · retrieval · chunking

Project ideas

3 project ideas

Poem or Name Generator

Project idea · language-model · text-generation · gpt

Course FAQ Chatbot

Project idea · rag · chatbot · langchain

Prompt Playground

Project idea · prompting · decoding · evaluation