File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12619,14 +12619,14 @@ static int llama_decode_internal(
12619
12619
std::vector<std::vector<llama_seq_id>> seq_id;
12620
12620
12621
12621
// this indicates we are doing pooled embedding, so we ignore batch.logits and output all tokens
12622
- bool embed_pooled = cparams.embeddings && cparams.pooling_type != LLAMA_POOLING_TYPE_NONE;
12622
+ const bool embd_pooled = cparams.embeddings && cparams.pooling_type != LLAMA_POOLING_TYPE_NONE;
12623
12623
12624
12624
// count outputs
12625
- if (batch_all.logits && !embed_pooled ) {
12625
+ if (batch_all.logits && !embd_pooled ) {
12626
12626
for (uint32_t i = 0; i < n_tokens_all; ++i) {
12627
12627
n_outputs += batch_all.logits[i] != 0;
12628
12628
}
12629
- } else if (lctx.logits_all || embed_pooled ) {
12629
+ } else if (lctx.logits_all || embd_pooled ) {
12630
12630
n_outputs = n_tokens_all;
12631
12631
} else {
12632
12632
// keep last output only
@@ -12672,7 +12672,7 @@ static int llama_decode_internal(
12672
12672
{
12673
12673
int32_t n_outputs_new = 0;
12674
12674
12675
- if (u_batch.logits && !embed_pooled ) {
12675
+ if (u_batch.logits && !embd_pooled ) {
12676
12676
for (uint32_t i = 0; i < n_tokens; i++) {
12677
12677
n_outputs_new += u_batch.logits[i] != 0;
12678
12678
}
You can’t perform that action at this time.
0 commit comments