Open ganeshpatelQB opened 1 year ago
Very good catch! I'll open a pr for this. Affect both convert_ids_to_tokens
and decode. 🤗 I need to do some benchmarking as I suspect this does won't have a huge impact but will give it a shot. I plan to benchmark our full calls to make sure we don't have things similar to this else where
My initial tests did not show any impact with NLLB and whisper which have the most amount of added tokens, but I'll try to optimize and benchmark in a near futur!
System Info
transformers
version: 4.29.0.dev0Who can help?
@ArthurZucker
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
The following function is being called for each token while using decoding function.
Expected behavior
all_special_ids should not be called for each token while decoding at the time of inferencing.