Skip to content

Commit 9af0466

Browse files
fix speculate_verify_and_update op (#9759)
1 parent 55e7e33 commit 9af0466

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

csrc/gpu/speculate_decoding_kernels/speculate_verify_and_update.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ __global__ void speculate_verify_and_update_kernel(int64_t* accept_tokens,
107107

108108
int i = 0;
109109
for (; i < seq_lens_this_time[bid] - 1; i++) {
110+
if (seq_lens_encoder[bid] != 0) {
111+
break;
112+
}
110113
if (USE_TOPK) {
111114
if (verify_tokens_now[i * max_candidate_len] == draft_tokens_now[i + 1]) {
112115
accept_num_now++;

0 commit comments

Comments
 (0)