diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2024-03-14 10:12:29 +0200 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2024-03-14 10:12:29 +0200 |
commit | 0fd6c1f015f6cccf3b527f7dbd8386a434728126 (patch) | |
tree | 922b6618221ac91a03da9da22e3727f4cb40ceb1 /common/common.h | |
parent | 19885d205e768579ab090d1e99281cae58c21b54 (diff) |
embedding : print cosine similarity (#899)
Diffstat (limited to 'common/common.h')
-rw-r--r-- | common/common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/common.h b/common/common.h index 0f178b9e..d250eef8 100644 --- a/common/common.h +++ b/common/common.h @@ -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); |