Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vllm_ascend/worker/v2/sample/bad_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ def _bad_words_kernel(
# Calculate actual position and load actual token
actual_pos = effective_len - prefix_len + j
if actual_pos >= output_len:
# input_ids at local position 0 is the last committed token;
# draft tokens start at local position 1.
spec_offset = actual_pos - output_len
actual = tl.load(input_ids_ptr + cur_req_first_pos + spec_offset)
actual = tl.load(input_ids_ptr + cur_req_first_pos + spec_offset + 1)
else:
actual = tl.load(output_base + actual_pos)

Expand Down
Loading