# AI

> How AI models work inside, where the cost goes, how to read the numbers people publish, and how to check what agents build.

- [400 times faster: reading the ZHA results honestly](https://learn.chabulab.com/ai/reading-zha-results-honestly.md): Separate what was measured from what was projected in the ZHA paper, see why deep trees lose attention, and take a checklist to the next paper.
- [Searching a context with a tree: how ZHA works](https://learn.chabulab.com/ai/searching-context-with-a-tree-zha.md): Watch a question walk down a tree level by level, tune top-p, try random data, then run a small version in about 130 lines.
- [Tests or formal verification when agents write code](https://learn.chabulab.com/ai/testing-or-formal-verification-when-agents-write-code.md): Tests run real code. Formal verification covers every state of a description. What each one misses, and how to divide them when agents write the code.
- [Ways to stop AI models rereading everything](https://learn.chabulab.com/ai/ways-to-cut-attention-cost.md): Compare a sliding window, indexers and a tree on the same context, and see which forgets and which only moves the cost elsewhere.
- [Attention: why long text costs AI models so much](https://learn.chabulab.com/ai/what-is-attention-and-why-it-costs.md): Click a word to see where attention looks back, then see why doubling the length of a text means four times the work.
