]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
embedding : print all resulting embeddings (#899)
authorGeorgi Gerganov <redacted>
Thu, 14 Mar 2024 10:37:20 +0000 (12:37 +0200)
committerGeorgi Gerganov <redacted>
Thu, 14 Mar 2024 10:37:20 +0000 (12:37 +0200)
examples/embedding/embedding.cpp

index f390c406104467ae4ee9b5b9cf83dbcfb16563aa..895469a3152715fd1fed9c7597bbd82273e7d8f0 100644 (file)
@@ -167,9 +167,9 @@ int main(int argc, char ** argv) {
     float * out = emb + p * n_embd;
     batch_decode(ctx, batch, out, s, n_embd);
 
-    // print first 3 embeddings
+    // print the first part of the embeddings
     fprintf(stdout, "\n");
-    for (int j = 0; j < std::min(3, n_prompts); j++) {
+    for (int j = 0; j < n_prompts; j++) {
         fprintf(stdout, "embedding %d: ", j);
         for (int i = 0; i < std::min(16, n_embd); i++) {
             fprintf(stdout, "%f ", emb[j * n_embd + i]);