REQ-INFER-027: Expert-tensor offload places routed experts on the host while attention and KV stay resident (EXPERIMENTAL)¶
What it requires
- Given cpu_moe_layers = N and a layer count, When the override list is built, Then it holds exactly the expert-tensor patterns for layers 0..N-1 in order, is null-terminated, and every pattern points into storage the list owns for its whole life.
- Given a gemma4 MoE layer's tensor names, Then the pattern for that layer matches every ffn_{gate,up,down,gate_up}_exps weight and scale and matches no attention, router, dense/shared-FFN, norm or embedding tensor, and the pattern for layer 1 does not match blk.10.
- Given the key is omitted, Then cpu_moe_layers == 0, no patterns are built and the override pointer is null.
- Given a negative N, gpu_layers: 0, or gpu_layers: auto, Then config validation fails with a reason naming the offending key.
- Given a model with no experts or fewer layers than N, Then the load is refused rather than clamped.
- tier
- NOT_RUN
How it is met
Implemented by
build_load_mparamssrc/inference/llama_cpp_backend.cpp:378datasrc/inference/expert_offload_buft.h:97do_load_activesrc/inference/llama_cpp_backend.cpp:614expert_block_patternsrc/inference/expert_offload.h:93expert_offload_admitssrc/inference/llama_cpp_backend.cpp:662expert_offload_conflict_reasonsrc/inference/expert_offload.h:155expert_offload_load_refusalsrc/inference/expert_offload.h:207expert_offload_patternssrc/inference/expert_offload.h:119load_gpu_modelsrc/inference/llama_cpp_backend.cpp:714model_expert_countsrc/inference/llama_cpp_backend.cpp:409validatesrc/config/validate.cpp:47
Tests (91)
Reached through calls
91 tests: 91 absent
| test | result | linked by | implementers exercised | calls away |
|---|---|---|---|---|
v2.13.0: an absent cpu_moe_layers installs no overrides at all | absent | inferred | 5 of 11 | 1 |
CompactionConfig validation | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
Empty adapter rejected | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
INT_MAX context_length rejected | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
ModelConfig validation | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
ModelConfig validation — failure modes | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
ModelsConfig validation | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
ModelsConfig validation — default tier must exist | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
Negative context_length rejected | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
Zero context_length rejected | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
gh#153 #42(iii): cpu_moe_layers is refused at configure time when | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 1 |
v2.13.0: the override array is a valid, owning C contract | absent | inferred | 2 of 11: data, expert_block_pattern | 1 |
v2.13.0: impossible expert-offload combinations are refused loudly | absent | inferred | 1 of 11: expert_offload_conflict_reason | 1 |
v2.13.0: the expert pattern is llama.cpp's, not our invention | absent | inferred | 1 of 11: expert_block_pattern | 1 |
v2.13.0: the load-time refusals need the model, and say so | absent | inferred | 1 of 11: expert_offload_load_refusal | 1 |
v2.13.0: the patterns select gemma4 expert tensors and nothing else | absent | inferred | 1 of 11: expert_block_pattern | 1 |
gh#153 #42(iii): cpu_moe_layers parses, and is absent by default | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 2 |
A tier selects a bundled model by family/size/quant | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
gh#108 (v2.10.0): speculative.mtp and static grammar can coexist | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
gh#148: gpu_layers accepts a count or the word auto | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
gh#157: models.defer_load parses and is not mistaken for a tier | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
gh#211: malformed YAML is a returned error, never an abort | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
gh#94: per-tier sampler knobs parse from YAML into TierConfig | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
load_config drives global + project + env + validate chain | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
load_config_from_file forwards file errors through the chain | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
load_config_from_file is the single-file public entry | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
load_config_from_string drives parse_config_string + validate | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 3 |
Classification runs the router and yields a configured tier | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 4 |
Cleared classification_prompt makes routing a no-op (RED control) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 4 |
Configure with null JSON returns error | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
Double-configure on one handle is refused | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
Nemotron3-Nano-4B Q8 first inference does not crash (gh#66) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
Three handles can coexist | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
Two GPU-resident handles can coexist (v2.2.8 target) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
Two handles configure independently | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_configure called twice on the same handle returns ALREADY_CONFIGURED | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_configure rejects NULL config_json | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_configure rejects NULL handle | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_configure_from_file rejects NULL handle | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_configure_from_file rejects NULL path | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_configure_from_file rejects missing file | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_last_error reflects most-recent operation failure | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_last_error returns per-handle state (v2.2.6) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_register_mcp_server on a configured handle | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_run_messages with console logging disabled still | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
entropic_seconds_since_last_activity returns 0 before any run | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#106 MTP routes through orchestrator->generate() | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 (v2.10.0) a request-level grammar routes to MTP on an | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 (v2.10.3) CONTROL: non-streaming generate on the same tier | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 (v2.10.3) CONTROL: plain-decode streaming on the same tier | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 (v2.10.3) MTP + grammar + streaming through | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 (v2.10.3) MTP + streaming without a grammar still streams | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 CPU-only feasibility: E2B-QAT-Q4 x MTP x flash+q4KV, | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 MTP engages with tools staged through orchestrator (agent loop) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 MTP loud error propagates through orchestrator (no fallback) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 agentic benchmark: full 24-config permutation matrix | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#108 per-tier speculative_mtp=false overrides the global flag | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#121 regression: configure populates engine's allowed_tools from identity frontmatter | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#134 (v2.10.4) A/B: the knob, not the model, produces the call | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#134 (v2.10.4) multi-turn: rails hold past the stall onset | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#134 (v2.10.4) require_tool_call forces a tool call under MTP | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#137 a toolless enable_thinking:false turn must not deliver | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#153 MTP vs plain decode throughput — four arms, Gemma 4 26B-A4B | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#153 MTP vs plain decode throughput — four arms, Gemma 4 E4B | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#154 a tier grammar stem that cannot resolve YET still | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#154 a tier grammar stem that resolves still configures | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#154 a tier with no grammar is unaffected | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#154 entropic_metrics_json carries a generations array | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#156 a frontmatter-less app_context fails configure | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#156 a frontmatter-less constitution fails configure too | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#156 a missing app_context path fails configure | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#156 a well-formed app_context file still configures | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#156 app_context false still configures | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#156 inline app_context content still configures | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#158 entropic_interrupt_session targets exactly one run | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#163 entropic_configure carries app_context into ParsedConfig | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#163 entropic_configure_from_file carries app_context | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#164 entropic_release_model names an unknown tier | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#164 entropic_release_model refuses to unload mid-turn | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#165 entropic_session_context_set guards its preconditions | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#165 entropic_session_context_set refuses the running session | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#165 entropic_session_context_set round-trips through the C ABI | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#175: a non-positive mcp.server_timeout_seconds is refused at configure | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 131072 context | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 32768 context | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#197 auto + MTP head on the 26B-A4B IQ2_M at 65536 context | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#203: followup returns delegation_id and summary from real storage | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#204: an unservable http_port fails configure loudly | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
h1.run() after h2.configure() does not segfault (v2.2.6) | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
testRunStarting | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 5 |
gh#193: what cold prefill costs at each residency level | absent | inferred | 2 of 11: expert_offload_conflict_reason, validate | 6 |