> For the complete documentation index, see [llms.txt](https://world-models-from-scratch.gitbook.io/wmfs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://world-models-from-scratch.gitbook.io/wmfs/readme.md).

# World Models from Scratch

*Building Modern World Models from First Principles*

[**Read the book on GitBook**](https://world-models-from-scratch.gitbook.io/)

[**View the source on GitHub**](https://github.com/nahidalam/world_model_from_scratch)

This book is a hands-on guide for builders who want to understand, train, evaluate, customize, and deploy world models.

## Chapters

* [Chapter 1: Understanding World Models](/wmfs/chapters/chapter_01.md)
* [Chapter 2: Running a Pretrained World Model](/wmfs/chapters/chapter_02.md)
* [Chapter 3: Evaluating World Models](/wmfs/chapters/chapter_03.md)
* Chapter 4: Building a World Model from Scratch (coming soon)
* Chapter 5: Architectures of Modern World Models (coming soon)
* Chapter 6: Pretraining World Models (coming soon)
* Chapter 7: Adapting and Fine-Tuning World Models (coming soon)
* Chapter 8: Improving World-Model Training (coming soon)
* Chapter 9: Improving World Models at Inference Time (coming soon)
* Chapter 10: Efficient World Models and Distillation (coming soon)

## Code

Reusable code is in `src/world_models/`, tests in `tests/`, self-contained explorable demos in `interactive/`. Install dependencies with:

```bash
pip install -r requirements.txt
pip install -e .
```

Different chapters might have additional GPU or system requirements, described in the corresponding chapters.
