examples : allow extracting embeddings from decoder contexts (#13797)

ggml-ci
This commit is contained in:
Georgi Gerganov
2025-05-26 14:03:54 +03:00
committed by GitHub
parent 22229314fc
commit 79c137f776
4 changed files with 10 additions and 16 deletions

View File

@ -3394,13 +3394,7 @@ struct server_context {
batch.logits + i,
};
int ret = 0;
if (do_encode) {
ret = llama_encode(ctx, batch_view);
} else {
ret = llama_decode(ctx, batch_view);
}
const int ret = llama_decode(ctx, batch_view);
metrics.on_decoded(slots);