mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-19 15:52:08 +00:00
Easiest fix.
This commit is contained in:
parent
611e21cb13
commit
d8e1ce669b
@ -354,7 +354,8 @@ class CausalLM(Model):
|
||||
if stop:
|
||||
# Decode all tokens
|
||||
output_text = self.tokenizer.decode(
|
||||
all_input_ids.squeeze(-1), skip_special_tokens=True
|
||||
all_input_ids.squeeze(-1), skip_special_tokens=True,
|
||||
cleanup_tokenization_spaces=False
|
||||
)
|
||||
# Slice with input_length to remove padding
|
||||
token_ids = all_input_ids[-new_input_length:]
|
||||
|
Loading…
Reference in New Issue
Block a user