From 097e121e2f17ed3541cf02c55ff7e9febc091b19 Mon Sep 17 00:00:00 2001 From: slaren Date: Fri, 18 Aug 2023 12:44:58 +0200 Subject: llama : add benchmark example (#2626) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * llama : add benchmark example * add to examples CMakeLists.txt * fix msvc build * add missing include * add Bessel's correction to stdev calculation Co-authored-by: Johannes Gäßler * improve markdown formatting * add missing include * print warning is NDEBUG is not defined * remove n_prompt and n_gen from the matrix, use each value separately instead * better checks for non-optimized builds * llama.cpp : fix MEM_REQ_SCRATCH0 reusing the value of n_ctx of the first call * fix json formatting * add sql output * add basic cpu and gpu info (linx/cuda only) * markdown: also show values that differ from the default * markdown: add build id * cleanup * improve formatting * formatting --------- Co-authored-by: Johannes Gäßler --- llama.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llama.h') diff --git a/llama.h b/llama.h index 92b47489..9d732f91 100644 --- a/llama.h +++ b/llama.h @@ -351,6 +351,8 @@ extern "C" { LLAMA_API int llama_n_ctx_from_model (const struct llama_model * model); LLAMA_API int llama_n_embd_from_model (const struct llama_model * model); + LLAMA_API int llama_model_type(const struct llama_model * model, char * buf, size_t buf_size); + // Get the vocabulary as output parameters. // Returns number of results. LLAMA_API int llama_get_vocab( -- cgit v1.2.3