summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2024-03-14 12:37:20 +0200
committerGeorgi Gerganov <ggerganov@gmail.com>2024-03-14 12:37:20 +0200
commit68265ebfc6a1bed022973ea0c3145be1450b7e70 (patch)
treef4ac0710177e234c9bdf3a135f76d7c4f2836995
parent381da2d9f0940d7009e3e918bed36338c8ff2fbb (diff)
embedding : print all resulting embeddings (#899)
-rw-r--r--examples/embedding/embedding.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/embedding/embedding.cpp b/examples/embedding/embedding.cpp
index f390c406..895469a3 100644
--- a/examples/embedding/embedding.cpp
+++ b/examples/embedding/embedding.cpp
@@ -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]);