BigMoeOnEdge/core/include/bmoe
Raffaele 3170385fad
feat(prefill): the NPU prefill reads only routed experts (+ --decide-probe); 0.28.0 (#208)
The NPU prefill's expert arena read every expert of every layer ahead of its
routing. It now reads, ahead of a layer's routing, the experts the previous
graph routed there, and at the routing node whatever the routing adds. The
matmul reads only routed experts, so the output is bit for bit the same. A layer
routing more than --prefill-routed-full (0.85) of its experts gets the next one
read whole; --no-prefill-routed restores whole layers everywhere.

Phone, Hexagon v81 NPU, top-4, same session, every answer identical:
Qwen3.6-35B-A3B Q4_0 7.68 -> 4.16 s, Q4_K_M 9.95 -> 5.37 s, Gemma 4 26B-A4B
Q4_K_M 6.69 -> 3.70 s, Nemotron 3.5 30B-A3B Q4_0 7.42 -> 6.81 s.

Also: --decide-probe (experimental per-decision expert usage and layer-exit
answers), BMOE_DECIDE prefill_dev_* counters, gates G17f/G17g, app 0.28.0.
2026-09-29 16:08:23 +02:00
..
config.h feat(prefill): the NPU prefill reads only routed experts (+ --decide-probe); 0.28.0 (#208) 2026-09-29 16:08:23 +02:00
decide.h feat(prefill): the NPU prefill reads only routed experts (+ --decide-probe); 0.28.0 (#208) 2026-09-29 16:08:23 +02:00
decode_trace.h feat(trace): add layer-granularity compute trace (--compute-trace-layers) 2026-07-19 09:21:39 +02:00
expert_source.h feat(io): uncached reads on macOS via F_NOCACHE, and o_direct from the open's outcome (#182) 2026-08-29 16:05:11 +02:00
metrics.h feat: prefill on the NPU, decode on the CPU (--prefill-device), in the release APK (#200) 2026-09-28 09:52:46 +02:00
ngram_draft.h feat(engine): self-speculative decoding — the model's own MTP head, or n-gram lookup (#134) 2026-08-02 00:09:39 +02:00
predict_stats.h feat(moe): measure how predictable expert routing is, then act on it — and refute it (#101) 2026-07-28 09:21:41 +02:00
recipe.h feat(moe): Nemotron 3.5 (nemotron_h_moe) and Ornith 1.5 support (#203) 2026-09-28 09:34:42 +02:00
route_trace.h feat(moe): --drop-cold-experts — spend quality only where it buys I/O (#95) 2026-07-22 17:21:55 +02:00
row_source.h feat(moe): serve row-gathered dense tables from flash (--row-stream) (#180) 2026-08-29 10:04:02 +02:00
runtime.h feat(moe): --drop-cold-experts — spend quality only where it buys I/O (#95) 2026-07-22 17:21:55 +02:00
session.h feat: --decide, choose from a list from one prefill, with no decode (#201) 2026-09-28 12:01:25 +02:00
version.h feat(metrics): record the whole run configuration, and what tok/s omits (#116) 2026-07-28 11:49:34 +02:00