"...text-generation-inference.git" did not exist on "fbeb1c44759fac1a249a9be8b47ad641438e3559"
Commit 56fd4e4e authored by Bruce MacDonald's avatar Bruce MacDonald
Browse files

log embedding eval timing

parent 74f00474
...@@ -471,6 +471,9 @@ func (llm *llama) Embedding(input string) ([]float64, error) { ...@@ -471,6 +471,9 @@ func (llm *llama) Embedding(input string) ([]float64, error) {
return nil, errors.New("llama: eval") 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) n := C.llama_n_embd(llm.ctx)
if n <= 0 { if n <= 0 {
return nil, errors.New("llama: no embeddings generated") return nil, errors.New("llama: no embeddings generated")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment