Unverified Commit 65e2f162 authored by OlivierDehaene's avatar OlivierDehaene Committed by GitHub
Browse files

fix(server): fix token_is_special (#87)

parent 3b03c4ea
...@@ -445,7 +445,7 @@ class CausalLM(Model): ...@@ -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,
) )
......
...@@ -509,7 +509,7 @@ class Seq2SeqLM(Model): ...@@ -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,
) )
......
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