Skip to content

Commit c667120

Browse files
committed
Move raw output handling into format handling section
1 parent cd96be7 commit c667120

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/embedding/embedding.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,6 @@ int main(int argc, char ** argv) {
283283
float * out = emb + e * n_embd;
284284
batch_decode(ctx, batch, out, s, n_embd, params.embd_normalize);
285285

286-
if (params.embd_out == "raw") {
287-
print_raw_embeddings(emb, n_embd_count, n_embd, model, pooling_type, params.embd_normalize);
288-
}
289-
290286
if (params.embd_out.empty()) {
291287
LOG("\n");
292288

@@ -402,6 +398,10 @@ int main(int argc, char ** argv) {
402398
if (notArray) LOG("\n}\n");
403399
}
404400

401+
if (params.embd_out == "raw") {
402+
print_raw_embeddings(emb, n_embd_count, n_embd, model, pooling_type, params.embd_normalize);
403+
}
404+
405405
LOG("\n");
406406
llama_perf_context_print(ctx);
407407

0 commit comments

Comments
 (0)