Remix.run Logo
tredre3 an hour ago

I'm curious how your project compares to plain mmap!

Because llama.cpp will already run 26B in 2GB of RAM if you really want to (mmap enabled, repacking disabled).

It seems like the main difference is that your project synchronizes the SSD reads with inference activity, which you've presumably tuned to cause the least latency possible? Whereas the OS wouldn't care about any of that.

gitpusher42 22 minutes ago | parent | next [-]

My first version used plain `mmap`. On the 8 GB M2, a cold 3.36 MB expert took 10 ms with mmap and 2.8 ms with `pread`. The full simulation was 0.50tok/s for `mmap` vs 4 tok/s for `pread`

With `mmap`, OS loads pages reactively as the model touches them. It doesn’t know which experts were selected or when their reads could overlap with GPU work

And common weights still use mmap for simplicity

So, I believe llama.cpp might run it under 2gb, but I assume it will be slower

a-dub 3 minutes ago | parent [-]

for a given expert, do you have a sense for what the spatiotemporal access pattern looks like?

Catloafdev 41 minutes ago | parent | prev [-]

Ya I'd be interested to see a comparison of using llamacpp with ssd offloading to compare real speeds.