summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorcompilade <113953597+compilade@users.noreply.github.com>2024-03-02 08:42:56 -0500
committerGitHub <noreply@github.com>2024-03-02 15:42:56 +0200
commit802da0091ba646ecf02e1a8fae2da0b8e76409bd (patch)
treeeab65e664dc826d4862237a302e535a12220c788 /scripts
parent715641391dda1ff9762dc5d99d9a30acce99f2c6 (diff)
llama : fix segfault from unknown model arch name (#5820)
* llama : fix segfault from unknown model arch name * llama : make all LLM maps const This also requires using `std::map::at` instead of its `operator[]` which does not exist for const maps. * llama : name LLM_ARCH_UNKNOWN to "(unknown)" This avoids errors from `std::map::at` when getting the general name of the model architecture. Using "(unknown)" instead of an empty string as per suggestion https://github.com/ggerganov/llama.cpp/pull/5820#issuecomment-1973735284 * llama : remove redundant inner const for LLM_TENSOR_NAMES The extra const won't do anything here as const maps return const references to values. Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com> * llama : remove redundant nullptr check in llm_arch_from_string Since LLM_ARCH_NAMES is a const map, no spurious elements with a NULL name are inserted anymore, so this check is dead code. --------- Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions