HACKHackers
in the Loop
Hackers in the LoopFrom Models to Custom Silicon

Book I From Models to Custom Silicon

How Modern AI Models Work

This book gives a capable software engineer the mental models and practical skills needed to inspect, trace, compare, and explain modern AI model artifacts.

Every chapter can be read or watched as short lessons, and each way teaches the whole chapter. 3 of 23 chapters are published; the rest are coming.

Download the book (PDF) 3 chapters, 121 pages

Part I Build the model vocabulary

  1. B1C01
    1What a Model Actually Is

    When you send a prompt, a tokenizer turns your text into token IDs, the model gives every possible next token a score, softmax turns the scores into chances, one token is picked and appended, and that repeats until a stop token.

    reviewed rev 4.0.2

    • Read
    • Watch
  2. B1C02
    2Tensors, Weights, Layers, and State

    Every number in a running model sits in an array; some arrays the model learned and only reads, some are made during one call and dropped, and one kind is kept from call to call while a reply is written.

    reviewed rev 3.1.1

    • Read
    • Watch
  3. B1C03
    3Linear Algebra Inside a Model

    One piece of arithmetic runs over and over inside the model, multiplying two lists of numbers pair by pair and adding up the products, which scores how well they match, and Paris at 95 percent is the best of 65,536 such scores.

    reviewed rev 3.1.2

    • Read
    • Watch
  4. B1C04
    4How Model Numbers Are Represented
    coming
  5. B1C05
    5Scores, Probabilities, Losses, and Uncertainty
    coming
  6. B1C06
    6How Training Changes Weights
    coming

Part II Follow information through the model

  1. B1C07
    7From Input Text to Model Vectors
    coming
  2. B1C08
    8A Transformer Block from First Principles
    coming
  3. B1C09
    9How Autoregressive Generation Actually Runs
    coming
  4. B1C10
    10Beyond the Standard Transformer
    coming

Part III Inspect and compare real artifacts

  1. B1C11
    11How to Read a Real Model Artifact
    coming
  2. B1C12
    12Language Heads, Decision Heads, and Typed Outputs
    coming
  3. B1C13
    13Model Cost: Compute, Memory, State, and Critical Path
    coming
  4. B1C14
    14How to Compare Models Without Fooling Yourself
    coming

Part IV Eight model deep dives

  1. B1C15
    15Needle3: A Model Designed Around Edge Constraints
    coming
  2. B1C16
    16The LFM2.5 Family: Hybrid Models Across Sizes and Tasks
    coming
  3. B1C17
    17Qwen3.8-27B: Anatomy of a Large Multimodal Parent
    coming
  4. B1C18
    18Ternary Bonsai 2 27B: What Changed from Qwen3.8-27B?
    coming
  5. B1C19
    19Laya: Decision Models Are Not Small Chatbots
    coming
  6. B1C20
    20Qwen Image 2.1: Inside an Image-Generation and Editing Pipeline
    coming
  7. B1C21
    21DiffusionGemma: Generation Without the Ordinary Left-to-Right Loop
    coming
  8. B1C22
    22DeepSeek V4.1 Flash: Inspecting a Large Modern Serving System
    coming

Part V Synthesis

  1. B1C23
    23Eight Models, One Inspection Method
    coming