Commit 8655cfb0 authored by huangwb's avatar huangwb
Browse files

fix param s=1 benchmark crash bug

parent 25e8c688
...@@ -169,11 +169,13 @@ class FlashCausalLMBatch(Batch): ...@@ -169,11 +169,13 @@ class FlashCausalLMBatch(Batch):
requests_idx_mapping[r.id] = i requests_idx_mapping[r.id] = i
tokenized_input = tokenized_input[-r.truncate :] tokenized_input = tokenized_input[-r.truncate :]
'''fix input s=1 crash bug
if ( if (
tokenized_input[0] == tokenizer.bos_token_id tokenized_input[0] == tokenizer.bos_token_id
and tokenized_input[1] == tokenizer.bos_token_id and tokenized_input[1] == tokenizer.bos_token_id
): ):
tokenized_input = tokenized_input[1:] tokenized_input = tokenized_input[1:]
'''
input_length = len(tokenized_input) input_length = len(tokenized_input)
input_lengths.append(input_length) input_lengths.append(input_length)
......
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