summaryrefslogtreecommitdiff
path: root/llama.cpp
diff options
context:
space:
mode:
authorunbounded <haakon@likedan.net>2023-04-08 00:09:18 +0200
committerGitHub <noreply@github.com>2023-04-08 00:09:18 +0200
commit62cfc54f77e519057110265b52b0d614fa363e2a (patch)
tree899b22495ef99e5e1661891c7ec0fd6de45aa43e /llama.cpp
parent698f7b5d6316a1f8453b3b32fd0d637d24952ffd (diff)
Add quantize-stats command for testing quantization (#728)
Command that calculates some statistics over the errors introduced by quantization, like mean square error, max error and some percentile errors for layer weights. Should be useful for testing quantization improvements. Exposes some internal state from ggml and llama for testing
Diffstat (limited to 'llama.cpp')
-rw-r--r--llama.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llama.cpp b/llama.cpp
index 978327a5..fc6f43af 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -1852,3 +1852,8 @@ const char * llama_print_system_info(void) {
return s.c_str();
}
+
+// For internal test use
+std::unordered_map<std::string, struct ggml_tensor *>& llama_internal_get_tensor_map(struct llama_context * ctx) {
+ return ctx->model.tensors;
+}