Re:Run a 1T parameter model on a 32gb Mac by streaming tenso...
by anshulbasia27 on Tuesday March 24, 2026 @01:25PM
(#47506170)
OS paging would be significantly worse here. The kernel's page fault handler is reactive — it doesn't know
you're about to read layer 47's FFN weights, so it can't prefetch. You stall on every fault, wait for the
4KB/16KB page to load, then resume. With 80 layers of dense FFN streaming, that's thousands of cold faults per
token.
[ Parent
| on HN ]
Re:Run a 1T parameter model on a 32gb Mac by streaming tenso...
by zozbot234 on Tuesday March 24, 2026 @01:26PM
(#47506188)
> The kernel's page fault handler is reactive — it doesn't know you're about to read layer 47's FFN weights, so it can't prefetch.
man 2 madvise
Re:Run a 1T parameter model on a 32gb Mac by streaming tenso...
by astrange on Tuesday March 24, 2026 @05:40PM
(#47509801)
That works for readahead but it's not good for random access. readv, aio, dispatch_io are better there.
Re:Run a 1T parameter model on a 32gb Mac by streaming tenso...
by zozbot234 on Tuesday March 24, 2026 @05:54PM
(#47509983)
This claim is a bit apples and oranges (no pun intended!). madvise is all about providing hints to the kernel to tune the page cache and readahead (including possibly disabling readahead altogether). it's not about performing reads into private memory buffers, which is actually where the options you mentioned fit in.