Update src/llama.cpp

This commit is contained in:
slaren 2024-08-12 14:51:07 +02:00 committed by GitHub
parent ebeba4cf00
commit c2e2cb99a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3576,7 +3576,7 @@ namespace GGUFMeta {
using llama_buf_map = std::unordered_map<uint32_t, ggml_backend_buffer_t>; using llama_buf_map = std::unordered_map<uint32_t, ggml_backend_buffer_t>;
static size_t llama_model_max_nodes(const llama_model & model) { static size_t llama_model_max_nodes(const llama_model & model) {
return std::max(8192, (int)model.tensors_by_name.size()*5); return std::max<size_t>(8192, model.tensors_by_name.size()*5);
} }
struct llama_model_loader { struct llama_model_loader {