embedding : print cosine similarity (#899)

This commit is contained in:
Georgi Gerganov 2024-03-14 10:12:29 +02:00
parent 19885d205e
commit 0fd6c1f015
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
4 changed files with 36 additions and 25 deletions

View file

@ -268,3 +268,4 @@ void dump_kv_cache_view_seqs(const llama_kv_cache_view & view, int row_size = 40
void llama_embd_normalize(const float * inp, float * out, int n);
float llama_embd_similarity_cos(const float * embd1, const float * embd2, int n);