We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84eb2f4 commit 0fd93cdCopy full SHA for 0fd93cd
src/llama.cpp
@@ -3575,13 +3575,8 @@ namespace GGUFMeta {
3575
3576
using llama_buf_map = std::unordered_map<uint32_t, ggml_backend_buffer_t>;
3577
3578
-// TODO: update when needed or think of some clever automatic way to do this
3579
-static size_t llama_model_max_nodes(const llama_model & /*model*/) {
3580
- //if (model.arch == LLM_ARCH_LLAMA && model.hparams.n_layer > ??) { // llama-3 405B
3581
- // return 32768;
3582
- //}
3583
-
3584
- return 8192;
+static size_t llama_model_max_nodes(const llama_model & model) {
+ return std::max<size_t>(8192, model.tensors_by_name.size()*5);
3585
}
3586
3587
struct llama_model_loader {
0 commit comments