File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010- feat: Update llama.cpp to ggerganov/llama.cpp@5d6f18a63 and sync Python bindings
1111- fix: Correct batched embedding outputs for multi-sequence ` embed() ` calls by @Anai-Guo in #2205
1212- fix: Configure embedding contexts with enough sequence slots for batched ` embed() ` calls
13+ - fix: Mark all embedding input tokens as outputs to avoid llama.cpp override warnings by @Anai-Guo in #2212
1314
1415## [ 0.3.22]
1516
Original file line number Diff line number Diff line change @@ -1040,7 +1040,13 @@ def embed(
10401040
10411041 # get pooling information
10421042 pooling_type = self .pooling_type ()
1043- logits_all = pooling_type == llama_cpp .LLAMA_POOLING_TYPE_NONE
1043+ # In embedding mode every input token must be marked as an output, regardless of
1044+ # pooling type. llama.cpp would otherwise override per-token `logits[i]` and emit
1045+ # "embeddings required but some input tokens were not marked as outputs ->
1046+ # overriding" once per input. Pooling NONE vs MEAN/CLS only changes how the
1047+ # per-token outputs are read back (see decode_batch below), not whether they are
1048+ # produced. See abetlen/llama-cpp-python#2208.
1049+ logits_all = True
10441050
10451051 if self .context_params .embeddings is False :
10461052 raise RuntimeError (
You can’t perform that action at this time.
0 commit comments