From 56fd4e4ef2bd1b7b4fe4f1bcc834a7bdcff73153 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Mon, 14 Aug 2023 12:51:31 -0300 Subject: [PATCH] log embedding eval timing --- llm/llama.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llm/llama.go b/llm/llama.go index 75f1ceea..1ed38edc 100644 --- a/llm/llama.go +++ b/llm/llama.go @@ -471,6 +471,9 @@ func (llm *llama) Embedding(input string) ([]float64, error) { return nil, errors.New("llama: eval") } + timings := C.llama_get_timings(llm.ctx) + log.Printf("embed: eval_ms=%v", parseDurationMs(float64(timings.t_p_eval_ms))) + n := C.llama_n_embd(llm.ctx) if n <= 0 { return nil, errors.New("llama: no embeddings generated")