Machine Learning

Machine Learning Courses/Courselets

course
  • 2
  • 3 Students
  • All Levels

Courselet

N-gram language models, smoothing and perplexity, with a counting lab

  • 0 Rating
  • 0 Reviews
What you will learn
  • State next-word prediction formally and derive the chain rule of probability.
  • Compute bigram and trigram probabilities by counting, and explain why smoothing is needed under data sparsity.
  • Evaluate a language model by perplexity, equal to 2 to the power of the entropy.

course
  • 2
  • 2 Students
  • All Levels

Courselet

Recurrent networks, LSTM gates, attention and the transformer as answers to the limits of n-grams

  • 0 Rating
  • 0 Reviews
What you will learn
  • Write the recurrence of an RNN and explain the vanishing gradient problem.
  • Describe the forget, input and output gates of an LSTM and the reduction of the vanishing gradient by an additive cell s...
  • Compute scaled dot-product attention from queries, keys and values, and describe multi-head attention and positional enc...

course
  • 2
  • 2 Students
  • All Levels

Courselet

Pre-training, BERT and GPT, scaling laws, reasoning at answer time and tokenisation

  • 0 Rating
  • 0 Reviews
What you will learn
  • Contrast the bidirectional masking of BERT with the causal masking of GPT.
  • State the power-law form of the scaling laws and the shift from training compute to compute at answer time.
  • Apply byte pair encoding merges to a small corpus and estimate the memory of a training run at about 20 bytes per parame...

course
  • 2
  • 2 Students
  • All Levels

Courselet

Fine-tuning, prompting, retrieval, alignment and agent safety, with a sonnet lab

  • 0 Rating
  • 0 Reviews
What you will learn
  • Choose between fine-tuning and prompting for a given adaptation problem.
  • Apply chain-of-thought prompting and explain temperature, top-k and nucleus sampling.
  • Describe retrieval-augmented generation, the three steps of RLHF and the safety risks of agents.

course
  • 3
  • 2 Students
  • All Levels

Courselet

Encoder-decoder of 2017 with attention, seven elements, one layer in two equations

  • 0 Rating
  • 0 Reviews
What you will learn
  • Write a transformer language model as a product of next-token softmax distributions.
  • Name the seven elements of the encoder-decoder transformer of 2017 and place them in four groups.
  • Compute scaled dot-product attention as a softmax-weighted sum of value rows, and write one encoder layer in two equatio...

course
  • 2
  • 1 Students
  • All Levels

Courselet

The chain rule, entropy and n-gram counts, from Shannon's 1951 guessing game to GPT-2

  • Free
  • 0 Rating
  • 0 Reviews
What you will learn
  • Write the probability of a word sequence as a product of next-word probabilities with the chain rule.
  • Compute entropy in bits, including 1.58 bits for three equally likely words and 4.75 bits for 27 equal symbols.
  • State why an unseen phrase has probability zero in a trigram model and why "dog" and "puppy" are unrelated entries in a...

course
  • 1
  • 1 Students
  • All Levels

Courselet

Counting, smoothing, entropy, word vectors, attention and decoding on one novel

  • Free
  • 0 Rating
  • 0 Reviews
What you will learn
  • Compute the probability and the bits of a sentence from bigram counts with the chain rule.
  • Derive cross-entropy as the sum of entropy and KL divergence and read perplexity as an effective number of choices.
  • Explain why attention scores are divided by the square root of the head width and how a next-word distribution changes w...

course
  • 2
  • 1 Students
  • All Levels

Courselet

Chain rule, maximum likelihood, entropy, KL divergence, perplexity and gradient descent

  • Free
  • 0 Rating
  • 0 Reviews
What you will learn
  • Decompose the probability of a sentence with the chain rule and estimate each factor by maximum likelihood.
  • Compute entropy, cross-entropy and KL divergence in bits, such as 0.531 bits for P = (0.9, 0.1) against Q = (0.5, 0.5).
  • Convert a loss of 3.91 nats into bits and a perplexity of 49.9, and state when two perplexities are comparable.

course
  • 2
  • 1 Students
  • All Levels

Courselet

N-gram models on a toy corpus with add-k, Good-Turing, Kneser-Ney and perplexity

  • Free
  • 0 Rating
  • 0 Reviews
What you will learn
  • Build a bigram model from counts on a four-sentence corpus and check that every row sums to one.
  • Apply add-k, Good-Turing, Kneser-Ney and interpolation to unseen n-grams and compare their trade-offs.
  • Compute a perplexity from a total log probability and state when two perplexities are comparable.

course
  • 2
  • 1 Students
  • All Levels

Courselet

One-hot vectors, co-occurrence counts, skip-gram, GloVe and FastText with worked numbers

  • Free
  • 0 Rating
  • 0 Reviews
What you will learn
  • Compute the cosine of two rows of co-occurrence counts and rank words by it.
  • Compute one skip-gram training step with negative sampling from a real pair and a noise pair.
  • Count the skip-gram pairs of a sentence and the vectors that are summed for a word in FastText.