File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2898,7 +2898,12 @@ struct llama_sbatch {
2898
2898
}
2899
2899
}
2900
2900
}
2901
- if (batch->logits) {
2901
+ if (logits_all) {
2902
+ for (size_t i = 0; i < length; ++i) {
2903
+ ubatch.output[ubatch.n_tokens + i] = 1;
2904
+ out_ids.push_back(ids[seq.offset + i]);
2905
+ }
2906
+ } else if (batch->logits) {
2902
2907
if (ubatch.equal_seqs) {
2903
2908
for (size_t i = 0; i < length; ++i) {
2904
2909
size_t id = ids[seq.offset + i];
@@ -2913,11 +2918,6 @@ struct llama_sbatch {
2913
2918
if (ubatch.output[i] != 0) { out_ids.push_back(seq.offset + i); }
2914
2919
}
2915
2920
}
2916
- } else if (logits_all) {
2917
- for (size_t i = 0; i < length; ++i) {
2918
- ubatch.output[ubatch.n_tokens + i] = 1;
2919
- out_ids.push_back(ids[seq.offset + i]);
2920
- }
2921
2921
} else {
2922
2922
// only get last output
2923
2923
for (size_t i = 0; i < length; ++i) {
@@ -15088,7 +15088,7 @@ static int llama_decode_internal(
15088
15088
};
15089
15089
15090
15090
while (lctx.sbatch.n_tokens > 0) {
15091
- // For now, only use equal splits for recurrent or hybrid model architectures
15091
+ // For now, only use equal splits for recurrent model architectures
15092
15092
llama_ubatch u_batch = kv_self.recurrent ? lctx.sbatch.split_equal(n_ubatch) : lctx.sbatch.split_simple(n_ubatch);
15093
15093
const uint32_t n_tokens = u_batch.n_tokens;
15094
15094
You can’t perform that action at this time.
0 commit comments