Skip to content
Projets

RajatDandekar/build-a-world-model-from-scratch

Voir sur GitHub

À propos

Build a World Model from Scratch — the Vizuara AI lecture series: slides, from-scratch code, and Colab notebooks

IA et apprentissage automatique

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
+2
in 7 days
+5
in 15 days
+7
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Build a World Model from Scratch — pixels → encoder → code → memory → prediction → imagined frame

Build a World Model from Scratch

A lecture series by Vizuara AI — slides, runnable code, and Colab notebooks.
Everything is built from first principles, every number on every slide is real output from the code in this repo.

YouTube Open in Colab Dependencies No GPU required


What is this?

A world model is a neural network that learns how a world works — well enough to predict what happens next, and eventually well enough that an agent can plan, imagine, and train inside the model instead of the real world. World models sit behind some of the most exciting results in modern AI: Dreamer agents that learn in imagination, video models that simulate reality, robots that rehearse before they act.

This series builds that entire idea up from scratch — small worlds, small networks, complete code, honest engineering. No magic, no hand-waving, no "trust us, it works." When something broke while we built it (and plenty did), the failure and the fix are part of the lecture.

The lectures

Each lecture folder holds its slides, its runnable code, and a README with the full write-up.

# Lecture Materials What you'll learn
0 Series Introduction slides Why world models, the Renderer/Simulator/Planner map of the field, and where this series goes
1 What Is a World Model, Really? slides · code The agent–environment loop, why state ≠ observation, 80 years of the idea, and the taxonomy
2 The World Modeler's Toolkit slides The four tools every world model stands on: latent spaces, reward over time, value, actor-critic
3 Your First World Model write-up · slides · notebook Build a complete world model on MiniPong: encoder + memory + prediction, then run it as the game
4 Dreams That Last — the RSSM write-up · slides · notebook Build an RSSM on real SO-101 robot data: track a belief, carry a memory and a doubt, dream 60 steps with the camera off
5 A Vector, or a Vocabulary? — IRIS write-up · slides · play with it Discrete latents and transformers: give a world model a vocabulary instead of a vector, then open the transformer and trace one word through every layer
6a The World Model in Your Head write-up · slides LeCun's blueprint, made runnable: what an energy landscape is, and the measured contours that show why predicting in representation space wins
6 Stop Painting Pixels — I-JEPA write-up · slides · code Build I-JEPA's ideas from scratch, watch representation collapse happen on purpose, and replicate the ImageNet study — including at 1% of labels
10 DINO-WM — Planning in Feature Space write-up · notebook · Push-T notebook Frozen DINOv2 features + a transformer predictor; plan a Push-T trajectory zero-shot with CEM in imagination
11 DIAMOND — Diffusion as a World Model write-up · notebook · World Model Arena Predict the next Atari frame by denoising pixels, train an agent in the dream — then race your own world model on the Arena leaderboard
12 V-JEPA 2 and V-JEPA 2-AC write-up · notebook Scale JEPA to 22M videos and 1B params — then plan a real SO-101 arm in frozen V-JEPA 2 feature space with an action-conditioned predictor and CEM
13 LeWorldModel — a JEPA on One GPU write-up + project · SO-101 converter A 15M-param end-to-end JEPA with the SIGReg loss; train it on real SO-101 data and plan with it
14 Video World Models — Imagine, then Act write-up · notebook UniPi, SuSIE, HiP, GR-1/2, VPP and π0.7 — then train the inverse-dynamics interpreter that reads SO-101 joint commands off video
15 World Action Models — DreamZero write-up + project · DreamZero-SO101 One 14B model that dreams the video and the actions; our open fine-tune for the SO-101 arm

Lecture numbers 10–15 match the YouTube playlist. More on the way.


Latest result — Lecture 6

Five encoders, identical training data, one exam: score how "surprised" each model is by candidate answers to what is behind the mask? — the true content, or content from a different image. Drawn as a map (light = calm, dark = surprised):

Measured energy contours of five encoders

The collapsed models are stripes — blind to the very axis that matters (they rank the true answer above an impostor at a coin-flip 0.500). I-JEPA digs the deepest well, centred on the truth: 0.9998. And its space is organized by meaning — a goose's nearest neighbours are herons, while a pixel-trained model offers a gas mask and a cauliflower.

Nearest neighbours: meaning vs texture

Explorer des projets similaires

Chargement…