← Back to context

Comment by cpfohl

9 hours ago

I’m still slightly confused on what this adds.

Let’s say I wanted to run a full size open weight model. I have a 128GB m3 max laptop.

Does this basically load layers in and out on demand? So I still have to download the full model to disk, but the RAM requirements go way down? The readme calls out that one still needs to connect HuggingFace, which leads me to believe that maybe you don’t even need to download the full model?

If you point it at a huggingface model identifier, it will download it, I assume. No way around that.

It reads like it is keeping only the core and the active layer loaded at any one point, and streams layers from disk; there are several other solutions like this and if my understanding is right, this is probably better than an mmap implementation or just streaming experts in.

  • Not an expert in this field, but the "expert" is consisting of multiple layers. To keep it small in terms of memory print, this project streams each layer (dividing even further).

    It also requires extra space because of decomposition of the layers. Normally the file format optimized for compute intense workloads. But here the bottleneck is the memory capacity.

    Also guessing that you need to be able to hold at least 3-layers at once in the memory, given M x N = R operation, M is the previous layer, N is next, and R is the result. on the next "layer", the R (result) becomes M, gets computed against the next layer, N, yielding the further result R'. And so on, until all layers are processed.

    I assume it's horribly slow, but can be put in a non-intrusive background task...

  • Obviously needs downloading eventually :).

    It seems like this tool saves on both disk space and RAM, then. Classic trade off: speed vs space.