]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
embedding : show full embedding for single prompt (#6342)
authorhowlger <redacted>
Wed, 27 Mar 2024 11:15:44 +0000 (12:15 +0100)
committerGitHub <redacted>
Wed, 27 Mar 2024 11:15:44 +0000 (13:15 +0200)
commit1e13987fba5a536965ef942f2c86549d62cef50b
treed20b7bc3fc78d8a73133890d45f58624b68bcbac
parente82f9e2b833d88cd2b30123ef57346c2cb8abd99
embedding : show full embedding for single prompt (#6342)

* embedding : show full embedding for single prompt

To support the use case of creating an embedding for a given prompt, the entire embedding and not just the first part needed to be printed.

Also, show cosine similarity matrix only if there is more than one prompt, as the cosine similarity matrix for a single prompt is always `1.00`.

* Update examples/embedding/embedding.cpp

---------

Co-authored-by: Georgi Gerganov <redacted>
examples/embedding/embedding.cpp