Qwen 3.8 flash next, vram requirements

#65
by mzubairtahir000714 - opened

You can check Qwen 3.8 flash next's vram requirements: https://www.whichllmmodel.com/models/alibaba-cloud-qwen-qwen38-flash-next

If you have any feedback , kindly leave a comment.

Thanks! Looks like great and useful tool . One improvement could be an option to offload not only n-gram tables but also some expert weights

Thanks! Looks like great and useful tool . One improvement could be an option to offload not only n-gram tables but also some expert weights

Hey, does llama.cpp or any other engine supports that feature? Because our logic is direct simulation of inference engine

@mzubairtahir000714 yes, llama.cpp does. --n-cpu-moe N (-ncmoe) keeps the expert FFN tensors of the first N layers in system RAM and runs them on the CPU, --cpu-moe does that for all layers, and -ot / --override-tensor gives per-tensor control. Attention, shared tensors and the KV cache stay on the GPU.

For this model the step size is large. Reading the unsloth GGUF headers, the 48 expert blocks in UD-IQ4_XS are about 1.19 GB per layer (1.61 to 1.78 GB on a few layers). Without the n-gram table and token_embd, the non-expert weights come to only about 4.7 GB. So each extra layer offloaded frees roughly 1.2 GB of VRAM, and the rest is KV cache.

Disclosure: I made a free planner that does this per layer from the GGUF tensor sizes, if it's useful as a reference: https://modelvram.com/moe-offload-calculator/

Thanks! Looks like great and useful tool . One improvement could be an option to offload not only n-gram tables but also some expert weights

Hey, does llama.cpp or any other engine supports that feature? Because our logic is direct simulation of inference engine
Probably not the main ones , but I wouldn't be surprised if there are already some PR or forks . For sure there are some custom ones like Colibri and such recent attempts as: https://www.reddit.com/r/LocalLLaMA/comments/1wrxap8/qwen38flashnext_177b_nvfp4119gib_ssd_streaming_at/?sort=new

Edit: this fork seems more promising:

https://github.com/mihailescu2m/llama.cpp

Sign up or log in to comment