Skip to content

Commit c55dff5

Browse files
ggerganovhodlen
authored andcommitted
embedding : print all resulting embeddings (ggml-org#899)
1 parent eb4ef3e commit c55dff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/embedding/embedding.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ int main(int argc, char ** argv) {
167167
float * out = emb + p * n_embd;
168168
batch_decode(ctx, batch, out, s, n_embd);
169169

170-
// print first 3 embeddings
170+
// print the first part of the embeddings
171171
fprintf(stdout, "\n");
172-
for (int j = 0; j < std::min(3, n_prompts); j++) {
172+
for (int j = 0; j < n_prompts; j++) {
173173
fprintf(stdout, "embedding %d: ", j);
174174
for (int i = 0; i < std::min(16, n_embd); i++) {
175175
fprintf(stdout, "%f ", emb[j * n_embd + i]);

0 commit comments

Comments
 (0)