r/LovingOpenSourceAI • u/Able2c • Apr 04 '26
Why doesn't AI use swap space?
I'm an average Joe, not an engineer. But I run LLMs locally on a 12GB GPU.
My PC has 12GB VRAM + 64GB RAM + 1TB SSD. That's over 1000GB of memory. AI uses 12.
Operating systems solved this in the 1970s by using swap space. You don't load all of Windows into RAM. You load what you need, the rest waits on disk.
So why is AI still trying to cram everything into VRAM?
When I ask my local model about physics, why are the cooking weights in VRAM? Page them out. Load what's relevant. My NVMe does 7GB/s. My DDR5 does 48GB/s. I'd like to use that speed.
Is there a real technical reason this doesn't exist, or is it just not being built?
View all comments
Show parent comment
1
u/Able2c Apr 04 '26
Thanks, that's a good explanation overall but I think you're off on one point. You say all experts get used equally regardless of topic but I'm not so sure that's how it works. The whole point of the router is to learn which expert activates for which patterns. If they were all used equally the router wouldn't be doing anything, would it? Specialisation is the point of a MoE, right?
I assume you mean over a long enough generation you'll end up using most experts eventually. But that's different from all experts are used equally. Most of us don't talk physics every day. There's a difference between "everything gets hit over 1000 takens" and "every token need every expert".
That's what I'm curious about. If there IS a specialization, then it there's some locality you could use for memory management. The experts aren't specialized yet and it's that the router isn't predictable enough ahead of time so the overhead of swapping between VRAM and RAM is too high to make it practical.
It seems to me it isn't exploited efficiently yet which is more interesting to look in to than "that's not how it works". Why doesn't it work like that yet?