llama : add --n-cpu-ffn option (#26622)

* common : dedupe --n-cpu-moe / --spec-draft-n-cpu-moe override loops

* common : add --n-cpu-ffn to CPU-offload dense FFN weights of first N layers

* common : generalize llm_ffn_block_regex over the FFN regex, drop TODO
This commit is contained in:
Jonas J
2026-08-27 11:26:42 +02:00
committed by GitHub
parent d7a2074112
commit c5fc7e3488
3 changed files with 29 additions and 15 deletions
+1 -1
View File
@@ -1254,7 +1254,7 @@ struct cmd_params_instance {
merged.reserve(merged.size() + (size_t) n_cpu_moe + 1);
for (int i = 0; i < n_cpu_moe; ++i) {
patterns.push_back(llm_ffn_exps_block_regex(i));
patterns.push_back(llm_ffn_block_regex(i, LLM_FFN_EXPS_REGEX));
merged.push_back({ patterns.back().c_str(),
ggml_backend_cpu_buffer_type() });
}