The limit the author measures
Reads top out at 278 MB/s, and a lone ~1 MB random read costs about 6 ms. [1]
A model that has to stream X MB per token can never beat 278 / X tokens per second. [2]
That, not the CPU, is what limits everything above 2B, and it's why a mixture-of-experts model, which touches about 1 B of its 8 B weights per token, is the way past it. [3]
Why a mixture-of-experts model gets past it
A mixture-of-experts model only uses a few experts per token. [4]
A mixture-of-experts model picks a few "experts" per layer for each token, so most of its weights sit unused at any moment. [5]
How the pager works
The pager keeps a pool of experts in RAM and reads the rest from flash when the router asks for them. [6]
We keep the popular ones in RAM, read the others from flash on demand and prefetch the next layer's. [7]
Sources
- The smolmaxxing source says: Reads top out at 278 MB/s, and a lone ~1 MB random read costs about 6 ms. Running LLMs on small and old devices
- The smolmaxxing source says: A model that has to stream X MB per token can never beat 278 / X tokens per second. Running LLMs on small and old devices
- The smolmaxxing source says: That, not the CPU, is what limits everything above 2B, and it's why a mixture-of-experts model, which touches about 1 B of its 8 B weights per token, is the way past it. Running LLMs on small and old devices
- The smolmaxxing source says: A mixture-of-experts model only uses a few experts per token. Running LLMs on small and old devices
- The smolmaxxing source says: A mixture-of-experts model picks a few "experts" per layer for each token, so most of its weights sit unused at any moment. Running LLMs on small and old devices
- The smolmaxxing source says: The pager keeps a pool of experts in RAM and reads the rest from flash when the router asks for them. Running LLMs on small and old devices
- The smolmaxxing source says: We keep the popular ones in RAM, read the others from flash on demand and prefetch the next layer's. Running LLMs on small and old devices