Unverified Commit 3c79ad35 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

[Fix] Fix the padded hash value for image tokens (#2309)

parent 983bfcf3
......@@ -1170,6 +1170,14 @@ class Scheduler:
+ 1 : len(req.fill_ids)
- req.last_update_decode_tokens
]
# Clip the padded hash values from image tokens.
# Otherwise, it will lead to detokenization errors.
input_token_ids = [
x if x < self.model_config.vocab_size - 1 else 0
for x in input_token_ids
]
req.input_token_logprobs = list(zip(input_token_logprobs, input_token_ids))
if (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment