<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kartalio</title>
    <description>The latest articles on DEV Community by Kartalio (@kartalioai).</description>
    <link>https://dev.to/kartalioai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4285837%2Fa65d616e-9cbf-4641-be0d-72a000637022.png</url>
      <title>DEV Community: Kartalio</title>
      <link>https://dev.to/kartalioai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kartalioai"/>
    <language>en</language>
    <item>
      <title>llama.cpp 1.0: MoE Offload Became a Cache Problem, Not a Flag</title>
      <dc:creator>Kartalio</dc:creator>
      <pubDate>Sun, 06 Dec 2026 05:57:27 +0000</pubDate>
      <link>https://dev.to/kartalioai/llamacpp-10-moe-offload-became-a-cache-problem-not-a-flag-2dol</link>
      <guid>https://dev.to/kartalioai/llamacpp-10-moe-offload-became-a-cache-problem-not-a-flag-2dol</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Originally published with an interactive architecture mind map on &lt;a href="https://kartalio.com/kartaworld/pulse/llamacpp-1-0-moe-expert-cache-2026?utm_source=syndication&amp;amp;utm_medium=blog&amp;amp;utm_campaign=pulse" rel="noopener noreferrer"&gt;KartaWorld Pulse (Kartalio)&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Three weeks after 1.0, llama.cpp still ships ~16 nightlies a day. The real change: host-resident MoE experts now live in an LRFU cache with a tunable CPU share, behind a stable C ABI and 19 runtime-loadable backends.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The version bump mattered less than the memory model it locked in.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Executive Takeaway&lt;/strong&gt;: The November 13 release replaced &lt;code&gt;--n-cpu-moe&lt;/code&gt;, a static per-layer switch, with a host-side expert cache: &lt;code&gt;--moe-cache-mib&lt;/code&gt;, &lt;code&gt;--moe-cache-cpu-share&lt;/code&gt;, LRFU eviction, and no CPU wait on cached experts. The question stops being "does the model fit in VRAM" and becomes "what is the expert hit rate".&lt;/p&gt;

&lt;p&gt;Around that core, llama.cpp published a stable C ABI, promoted the NextN speculative API into &lt;code&gt;llama.h&lt;/code&gt;, added FP8 KV caches, and now compiles 19 ggml backends into runtime-loadable libraries. Three weeks later the repo still publishes roughly 16 nightlies a day. The cadence is the product.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7q5hl545pu722mggpkxz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7q5hl545pu722mggpkxz.png" alt="llama.cpp v1.0.0 banner: 'A stronger foundation for the local AI ecosystem'" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ggml-org/llama.cpp" rel="noopener noreferrer"&gt;ggml-org/llama.cpp - LLM inference in C/C++&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1 · Inside the Expert Cache
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;MoE weights are a paging problem wearing a flag's clothing.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before 1.0 the answer to "my MoE does not fit" was &lt;code&gt;--n-cpu-moe N&lt;/code&gt;: keep the experts of the first N layers on the CPU. It works, but the split is static and per layer, so every token that touches an offloaded layer pulls expert weights across the bus, whether that expert is hot or never routed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Layer Offload Hit a Wall
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Static split, layer granularity, no reuse across tokens&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bandwidth-bound, not capacity-bound&lt;/strong&gt;: a token routes to a few experts, so the cost is a PCIe transfer per expert per layer, not a missing FLOP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Coarse knob&lt;/strong&gt;: &lt;code&gt;--n-cpu-moe&lt;/code&gt; moves whole layers. A model that misses VRAM by 1 GB loses a full layer's expert set.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No second chance&lt;/strong&gt;: without an eviction policy there is no hot set that survives across decode steps.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LRFU Eviction and CPU-Side Misses
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Expert weights become a tunable cache&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;moe_cache_size&lt;/code&gt; / &lt;code&gt;--moe-cache-mib&lt;/code&gt;&lt;/strong&gt;: GPU-side budget for host-resident experts, split across GPUs the same way as &lt;code&gt;--tensor-split&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;moe_cache_cpu_share&lt;/code&gt;&lt;/strong&gt;: the fraction of misses the CPU computes straight from host memory instead of uploading to the GPU.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;LRFU / ClassLRU&lt;/strong&gt;: recency-plus-frequency replacement, so frequently routed experts stay resident instead of being flushed by a single cold token.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No CPU wait on hits&lt;/strong&gt;: cached experts no longer stall the device queue behind the host.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Pre-1.0&lt;/th&gt;
&lt;th&gt;1.0&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MoE offload&lt;/td&gt;
&lt;td&gt;Per-layer flag&lt;/td&gt;
&lt;td&gt;Expert cache&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Replacement&lt;/td&gt;
&lt;td&gt;None (static)&lt;/td&gt;
&lt;td&gt;LRFU / ClassLRU&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;KV cache types&lt;/td&gt;
&lt;td&gt;f16, q8_0, q4&lt;/td&gt;
&lt;td&gt;+ f8_e4m3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multimodal code&lt;/td&gt;
&lt;td&gt;clip.h + mtmd&lt;/td&gt;
&lt;td&gt;Unified mtmd&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Public C API&lt;/td&gt;
&lt;td&gt;35 deprecated fns&lt;/td&gt;
&lt;td&gt;Pruned + NextN&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Versioning&lt;/td&gt;
&lt;td&gt;Rolling build tags&lt;/td&gt;
&lt;td&gt;Semver + ABI&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  FP8 KV Cache With Per-Tensor Scales
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;-ctk f8_e4m3 -ctv f8_e4m3&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;FP8 E4M3 joins f32, f16, bf16, q8_0 and q4 in the accepted KV types, with optional static per-tensor scales. Halving KV bytes buys context length or concurrency; the cost is attention-side quantization error, which is exactly where long-context accuracy is most brittle.&lt;/p&gt;

&lt;h3&gt;
  
  
  One ABI, Nineteen Backends
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Runtime-loaded ggml libraries, not compile-time forks&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ggml/src&lt;/code&gt; now carries 19 backend directories: CPU, CUDA, HIP, MUSA, SYCL, Vulkan, Metal, OpenCL, WebGPU, Hexagon, CANN, OpenVINO, ZenDNN, VirtGPU, RPC and more. Each builds as a dynamic library that can be loaded at runtime, so one API surface can drive a Snapdragon NPU and an H100 without recompiling the caller.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv4wmzj27pbh60okcz7xb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv4wmzj27pbh60okcz7xb.png" alt="llama cli running a vision-language session against a local GGUF model" width="800" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2 · The Release Machine
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;300 releases, 19 days, one repository.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Cadence is not vanity here. Every merge is compiled, quantized and exercised on vendor hardware through self-hosted runners, so a nightly tag is the shortest path from a kernel patch to a binary a user can download.&lt;/p&gt;

&lt;h3&gt;
  
  
  298 Nightlies in 19 Days
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Counted from the GitHub releases API&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The newest 300 GitHub releases span November 17 to December 5, and 298 of them are nightly &lt;code&gt;b&lt;/code&gt; builds. The last seven days, shown below, average about 13.4 releases a day.&lt;/p&gt;

&lt;h3&gt;
  
  
  Coverage at 1.0
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;192 model files, 19 backends, 447 contributors&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The model file count is measured from &lt;code&gt;src/models/*.cpp&lt;/code&gt;; the project's own blog claims 150+ architecture variants, a number that includes variants sharing a source file and is consistent with 192 files.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GitHub stars&lt;/td&gt;
&lt;td&gt;137,619&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Forks&lt;/td&gt;
&lt;td&gt;26,674&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Open issues&lt;/td&gt;
&lt;td&gt;2,860&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Named contributors&lt;/td&gt;
&lt;td&gt;447&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model source files&lt;/td&gt;
&lt;td&gt;192&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ggml backend dirs&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nightlies, newest 300&lt;/td&gt;
&lt;td&gt;298&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  3 · Limits and Counterarguments
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;What the cache does not buy you.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A Hit Still Costs a Copy
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Misses cross the interconnect, not magic&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The cache reduces uploads; it does not delete the bus. A 16-lane PCIe 5.0 link tops out near 64 GB/s in theory, and a missed 4-bit expert block still has to cross it. Raising &lt;code&gt;--moe-cache-cpu-share&lt;/code&gt; trades GPU idle time for host compute, which only pays off if the CPU cores and their memory bandwidth are not already committed to another tenant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Semver Covers the Header, Not GGUF
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;API stability is not format stability&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;1.0 promises that breaking changes to &lt;code&gt;include/llama.h&lt;/code&gt; get a major bump. It says nothing about GGUF layouts, chat templates, or the 35 removed functions that downstream bindings still call. Projects that pinned a commit now need a policy for both.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benchmarks Are Still Machine-Specific
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;No official cross-vendor table&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;llama.cpp ships &lt;code&gt;llama-bench&lt;/code&gt; and leaves the numbers to whoever runs it. The Hexagon HMX kernels, Vulkan RDNA3/4 vision encoder work and ARM SVE paths in the current nightly stream are merge-level optimizations; independent, per-device numbers are the reader's job before quoting a speedup.&lt;/p&gt;

&lt;h2&gt;
  
  
  4 · Operator Playbook
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Two populations, two policies.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Pin or Track
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Pin for products, track for experiments&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pin&lt;/strong&gt; if you embed &lt;code&gt;libllama&lt;/code&gt; or ship a product: fix a minor version, read the semver rules, and vendor the GGUF files you validated. &lt;strong&gt;Track&lt;/strong&gt; if you run a lab or a hobby box: the nightly channel is where new architectures land first, and regressions are usually reverted within days.&lt;/p&gt;

&lt;h3&gt;
  
  
  A 30-Minute Evaluation
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Override one layer, measure hit rate, keep or revert&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# v1.0: all experts host-resident, 4 GiB cached on the GPU&lt;/span&gt;
llama serve -m ./model-Q4_K_M.gguf \
  -ngl 99 -ctk f8_e4m3 -ctv f8_e4m3 \
  --n-cpu-moe 99 --moe-cache-mib 4096 \
  --moe-cache-cpu-share 0.25
&lt;span class="c"&gt;# measure before/after on the same box&lt;/span&gt;
llama-bench -m ./model-Q4_K_M.gguf -p 512 -n 128 -r 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Security Defaults Moved
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Upgrade if llama-server faces a network&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;1.0 closed SSRF in the CORS proxy and media fetchers, fixed DNS rebinding and child-instance access, restricted &lt;code&gt;HF_TOKEN&lt;/code&gt; to huggingface.co, and made tools and private media URLs opt-in via &lt;code&gt;--allow-unauthenticated-tools&lt;/code&gt; and &lt;code&gt;--media-allow-private-urls&lt;/code&gt;. If you exposed the server, the upgrade is a patch, not a feature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs4c46rmhtwkvbmd7dtjz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs4c46rmhtwkvbmd7dtjz.png" alt="Llama Chat, the built-in web UI, against llama serve running Qwen" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5 · Verified Sources
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Primary documents, not press coverage.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Primary Documents
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://huggingface.co/blog/ggml-org/llama-cpp-v1" rel="noopener noreferrer"&gt;llama.cpp v1.0.0 announcement (Hugging Face)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ggml-org/llama.cpp/releases/tag/v1.0.0" rel="noopener noreferrer"&gt;v1.0.0 release notes and changelog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md" rel="noopener noreferrer"&gt;Build guide: 18 documented backend paths&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ggml-org/llama.cpp/blob/master/tools/cli/README.md" rel="noopener noreferrer"&gt;llama cli flag reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://llama.app" rel="noopener noreferrer"&gt;llama.app - official install path&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Primary Sources &amp;amp; References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ggml-org/llama.cpp" rel="noopener noreferrer"&gt;ggml-org/llama.cpp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://huggingface.co/blog/ggml-org/llama-cpp-v1" rel="noopener noreferrer"&gt;llama.cpp v1.0.0 announcement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ggml-org/llama.cpp/releases/tag/v1.0.0" rel="noopener noreferrer"&gt;v1.0.0 release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Explore the interactive mind map &amp;amp; bilingual breakdown:&lt;/strong&gt; &lt;a href="https://kartalio.com/kartaworld/pulse/llamacpp-1-0-moe-expert-cache-2026?utm_source=syndication&amp;amp;utm_medium=blog&amp;amp;utm_campaign=pulse" rel="noopener noreferrer"&gt;Read on Kartalio Pulse →&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>llamacpp</category>
      <category>moe</category>
    </item>
  </channel>
</rss>
