fix(server): fix token_is_special (#87)

This commit is contained in:
OlivierDehaene 2023-02-24 17:20:00 +01:00 committed by GitHub
parent 3b03c4ea18
commit 65e2f1624e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -445,7 +445,7 @@ class CausalLM(Model):
next_token_id_squeezed, next_token_id_squeezed,
next_token_logprob, next_token_logprob,
next_token_text, next_token_text,
next_token_id_squeezed in self.all_special_ids, next_token_id_squeezed.item() in self.all_special_ids,
generated_text, generated_text,
) )

View File

@ -509,7 +509,7 @@ class Seq2SeqLM(Model):
next_token_id_squeezed, next_token_id_squeezed,
next_token_logprob, next_token_logprob,
next_token_text, next_token_text,
next_token_id_squeezed in self.all_special_ids, next_token_id_squeezed.item() in self.all_special_ids,
generated_text, generated_text,
) )