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:
@@ -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() });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user