mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-21 01:24:04 +00:00
add context_attention_unpadded
This commit is contained in:
committed by
FrankLeeeee
parent
07b5283b6a
commit
02c1bf8b2a
@@ -232,11 +232,7 @@ class InferenceEngine:
|
||||
|
||||
# Decode completed sentences.
|
||||
for seq in finished_sequences:
|
||||
if seq.prompt:
|
||||
output_str = self.tokenizer.decode(seq.output_token_id, skip_special_tokens=True)
|
||||
output_list.append(seq.prompt + output_str)
|
||||
else:
|
||||
output_str = self.tokenizer.decode(seq.input_token_id + seq.output_token_id, skip_special_tokens=True)
|
||||
output_list.append(output_str)
|
||||
output_str = self.tokenizer.decode(seq.input_token_id + seq.output_token_id, skip_special_tokens=True)
|
||||
output_list.append(output_str)
|
||||
|
||||
return output_list
|
||||
|
Reference in New Issue
Block a user