diff --git a/tokenizers/src/models/bpe/trainer.rs b/tokenizers/src/models/bpe/trainer.rs index 0c411f59c..153c2e921 100644 --- a/tokenizers/src/models/bpe/trainer.rs +++ b/tokenizers/src/models/bpe/trainer.rs @@ -414,6 +414,7 @@ impl BpeTrainer { word_counts: &HashMap, model: &mut BPE, ) -> Result> { + #![allow(invalid_reference_casting)] let mut word_to_id: HashMap = HashMap::with_capacity(self.vocab_size); let mut id_to_word: Vec = Vec::with_capacity(self.vocab_size);