Skip to content
View original post on X: Daniel Han
Published

Daniel Han explains how to set llama.cpp’s MoE cache size

AIDaniel Han explains how to enable MoE caching in llama.cpp with `--moe-cache-mib N`. He says to set the value to an amount of GPU VRAM in MiB; Unsloth’s llama.cpp prebuilt also offers an `auto` option to size it automatically.
Daniel HanVerified on X
@danielhanchen
View on X

To enable MoE offloading with a LRU cache in llama.cpp:

--moe-cache-mib N

Set --moe-cache-mib to some amount of your GPU VRAM in MiB. In Unsloth's llama.cpp prebuilt we have an "auto" option which will auto size it.

See https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md

Daniel Han@danielhanchen
Local AI wouldn't be here without llama.cpp. Congrats to v1! Llama.cpp also now also has MoE offloading and MoE smart LRU caching, so large MoEs which can't fit in VRAM can still be fast!
View quoted post on X
Source details

Daniel Han · x.comPublished · added here

Original title: To enable MoE offloading with a LRU cache in llama.cpp: