Skip to content

Commit

Permalink
embedding : print all resulting embeddings (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Mar 14, 2024
1 parent 381da2d commit 68265eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/embedding/embedding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 68265eb

Please sign in to comment.