Remix.run Logo
▲ thway15269037 5 hours ago

Excuse me, could you elaborate how you came up with 192GB of RAM? I almost thought they downsized model, but it's still 2.8T tokens. Are we talking about not-yet-out 1-bit quant or assumption that something like ds4 (daskstar, not deepseek) will heavily optimize it?

Not a trolling question, genuine interest.

▲labcomputer 5 hours ago | parent | next [-]

All these very large models are sparse mixtures of experts (SMoE), where typically only 2-3% of weights are active for a given forward pass.

Usually there are some static experts in each attention layer, plus a whole bunch of dynamically-routed experts. Typically some form of LRU cache is used for the dynamic experts.

So you can keep only the static expert(s) and routing layers in memory and then stream the dynamic experts from SSD, at a modest inference speed cost driven by the latency required to load layers from SSD when they aren’t already in the memory cache.

The LRU cache works reasonably well because a given task will often hit the same experts on each iteration of the forward pass.

For example, on a Mac Studio, Qwen3.8-flash-next (180b total parameters) with 50% of experts in memory and n-gram offloading has about 1/4 to 1/3 the inference speed of everything in memory. That requires 32GB of vRAM for the weights (plus a little extra for context, obviously)

▲zozbot234 5 hours ago | parent | prev | next [-]

It's not based on loading the full 1.5TB model into VRAM or system RAM, it's just streaming parameters on demand from SSD - which is worthwhile since the MoE portion of the model is quite sparsely accessed. This has been demoed on a 128GB M5 MacBook Pro with lousy performance (0.3 tok/s or so) because it had to load at least ~25GB from SSD per token (comprising the entirety of the sparsely routed active params) and potentially even reload some of the dense weights, depending on what exactly managed to fit on that platform. With 192GB you'd avoid any reloading for the dense weights and even cache a few layer-experts.

▲thway15269037 2 hours ago | parent | next [-]

Yes, I understand the principle, but will it be usable? E.g. in my personal opinion border of usefulness starts somewhere at 7-10 tok/s. I currently have 192GB and 24GB VRAM, and I can run Qwen-Flash-Next (4 bit) and GLM5.3-Flash (4 bit) at 25 tok/s and 7 tok/s respectfully (with quantized cache on beellama). Parallel queries worsen result significantly but can push aggregate to around 50 tok/s.

I can't, however, run DS4.1-1017, for example, but maybe I didn't find proper options and quantization yet.

So I'm really interested how to be sure what can/cannot fit in specific hardware (for example, I want to buy a Mac Studio with 64 or 128 GB RAM, what MoE model it would run at comfortable speed? Will it be qwen-flash-next or something bigger? And so on). So far websites with "benchmarks" were really terrible in that regard (and huggingface calculator even worse!)

▲zozbot234 2 hours ago | parent [-]

> in my personal opinion border of usefulness starts somewhere at 7-10 tok/s.

This is expected if you're actively steering the agent, but what about running unattended tasks - perhaps multiple such tasks in parallel, such that you can stay engaged by "attending" to each of them in turn? Then you're not restricted to such a requirement, and can benefit from much slower (individually, not wrt. total throughput) inference streams.

> I currently have 192GB and 24GB VRAM

I'm not familiar with beellama, but this seems like it could be the perfect setup for Strata which people are saying good things about, including for running DS4.1F (at least quantized). The whole point of it is to effectively leverage heterogenous RAM/VRAM setups. Of course llama.cpp itself is doing a good job of trying to catch up, but they've yet to support efficient SSD streaming (mmap doesn't quite cut it) in the main branch.

▲reasonableklout 4 hours ago | parent | prev [-]

Wow, TIL. Is there any calculator or rule of thumb you use to figure out the expected performance of a model on some DRAM/SSD split? For instance I am wondering what the performance could be like on a 512GB M5 Mac Studio.

▲zozbot234 3 hours ago | parent [-]

The rule of thumb is to just test it on your chosen platform, with your workload. SSD performance matters a lot obviously, you'll want to run PCIe 5.0 if at all feasible, or a recent M5 Pro/Max/Ultra or M6 Mac with high storage capacity (lower tiers have much worse performance). You can figure out a worst case easily (assuming that the fraction of sparse params you manage to cache in VRAM or system RAM has a fair chance of being picked among the total) but in practice you do quite a bit better than that - which is why even very small caches can be potentially worthwhile.

▲adgjlsfhk1 5 hours ago | parent | prev [-]

it's a mixture of experts so it's somewhat viable to stream weights from nvme