NGram to SSD streaming?

#1
by dandandelion - opened

How do you do just that? Do I ommit --no-mmap or do I just run it like any other MoE models and the NGRAM table lookup just automatically sits in the SSD?

Atomic Chat org

Hi @dandandelion !
The most important flag is -fit off
I already did everything to make it work for you - just split the model into shards with a specific layout, where the ngram sits in one big shard that gets offloaded to ssd, that's it!
So yeah just download and use this flag, like in a model card

Atomic Chat org
β€’
edited 5 days ago

Here:
image

Atomic Chat org

Here you can see a shard that is 38.4 GB, it's an n-gram table

image

This poses potential problem with my setup. Here's how I ran the former 122B-A10B Qwen3.5

First off, my system is hybrid
16GB VRAM (RTX 3080 Ti Laptop)
64GB DDR5-4800

So already, my VRAM is constraint, so I essentially offload rest of the experts that don't fit my VRAM to system RAM using --n-cpu-moe N

./llama-server -m ./models/model-file.gguf --alias "Qwen3.5-122B-A10B" -ngl 99 -fit off --n-cpu-moe 42 -c 262144 -ctk q4_0 -ctv q4_0 --jinja --no-mmap --host 0.0.0.0 --port 8090 -fa on -b 2560 -ub 2560 --reasoning on --reasoning-preserve -np 1 --kv-tail-tokens 2048 -t 6 --temp 0.6 --top-p 0.95 --min-p 0.0 --presence-penalty 1.5 --repeat-penalty 1.0

This is the dilemma here, I have no clue how to do it with this model that has this outlying 51B N-gram. My plan was do what I was doing already and stream the 51B in SSD but even looking it up, what other people were recommending was -ot + mmap which then poses another problem cause mmap essentially puts my experts to SSD too once I even touch my tried and tested -ot or -ncmoe offloading.

just curious if directio also can work similar to mmap here

just curious if directio also can work similar to mmap here

The second pr i linked allows for that, but I dont know if it was tested, so you should.

How are you loading it?

Sign up or log in to comment