Skip to content
AgenticAIWiki
  1. Learn
  2. Part 1. Gen AI concepts
  3. Chapter 9

Machine learning basics for LLM builders

5 lessons · 32 min

A tiny network learns, one step at a time

Full screen
0.5-0.2-0.30.4v1 0.6v2 -0.4x11.0x20.5h1 (ReLU)?h2 (ReLU)?y (sigmoid)?

Swipe to change step

Step 1 of 8. A network with 9 parameters: two inputs, two hidden ReLU neurons, one sigmoid output. Its job is to say whether a point lies above the line x1 + x2 = 1. Our point is (1, 0.5), so the right answer is 1. x1 (1.0), highlighted. x2 (0.5), highlighted. h1 (ReLU) (?). h2 (ReLU) (?). y (sigmoid) (?). arrow from x1 to h1 (ReLU), labelled 0.5. arrow from x1 to h2 (ReLU), labelled -0.2. arrow from x2 to h1 (ReLU), labelled -0.3. arrow from x2 to h2 (ReLU), labelled 0.4. arrow from h1 (ReLU) to y (sigmoid), labelled v1 0.6. arrow from h2 (ReLU) to y (sigmoid), labelled v2 -0.4.

In this chapter

  1. 9.1Discriminative vs generative models5 min read
  2. 9.2Neurons, weights, biases and activations6 min read
  3. 9.3Gradient descent and backpropagation7 min read
  4. 9.4Training compute vs inference compute6 min read
  5. 9.5Lab: a tiny two-layer network by hand8 min read

Chapter check

Already know this? Score 80% or more and you can skip ahead. Each attempt draws 4 questions from 12.

Loading check…