fix(server): fix typo in tokenizers decode (#269)

closes #268
This commit is contained in:
OlivierDehaene 2023-05-03 10:10:34 +02:00 committed by GitHub
parent 411b0d4e1f
commit 4096000e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View File

@ -490,7 +490,7 @@ class CausalLM(Model):
def decode(self, generated_ids: List[int]) -> str:
return self.tokenizer.decode(
generated_ids, skip_special_tokens=True, cleanup_tokenization_spaces=False
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
def forward(

View File

@ -402,7 +402,7 @@ class FlashCausalLM(Model):
def decode(self, generated_ids: Union[torch.Tensor, List[int]]) -> str:
return self.tokenizer.decode(
generated_ids, skip_special_tokens=True, cleanup_tokenization_spaces=False
generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
def forward(

View File

@ -165,7 +165,7 @@ class FlashSantacoder(FlashCausalLM):
def decode(self, generated_ids: List[int]) -> str:
# Do not skip special tokens as they are used for custom parsing rules of the generated text
return self.tokenizer.decode(
generated_ids, skip_special_tokens=False, cleanup_tokenization_spaces=False
generated_ids, skip_special_tokens=False, clean_up_tokenization_spaces=False
)

View File

@ -173,7 +173,7 @@ class Galactica(OPT):
def decode(self, generated_ids: List[int]) -> str:
# Do not skip special tokens as they are used for custom parsing rules of the generated text
return self.tokenizer.decode(
generated_ids, skip_special_tokens=False, cleanup_tokenization_spaces=False
generated_ids, skip_special_tokens=False, clean_up_tokenization_spaces=False
)
def forward(

View File

@ -64,5 +64,5 @@ class SantaCoder(CausalLM):
def decode(self, generated_ids: List[int]) -> str:
# Do not skip special tokens as they are used for custom parsing rules of the generated text
return self.tokenizer.decode(
generated_ids, skip_special_tokens=False, cleanup_tokenization_spaces=False
generated_ids, skip_special_tokens=False, clean_up_tokenization_spaces=False
)