From 9e51a50bcd6c4e287d4cd27a9c3a8303f8416cf4 Mon Sep 17 00:00:00 2001 From: Henk Date: Thu, 28 Sep 2023 01:08:53 +0200 Subject: [PATCH] Llama fixes for Mistral --- modeling/inference_models/hf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modeling/inference_models/hf.py b/modeling/inference_models/hf.py index 7e291b93..8cb52d69 100644 --- a/modeling/inference_models/hf.py +++ b/modeling/inference_models/hf.py @@ -232,7 +232,7 @@ class HFInferenceModel(InferenceModel): self.model_type = str(self.model_config.model_type) # These are model specific tokenizer overrides if a model has bad defaults - if self.model_type == "llama": + if self.model_type == "llama" or self.model_type == "mistral": # Note: self.tokenizer is a GenericTokenizer, and self.tokenizer.tokenizer is the actual LlamaTokenizer self.tokenizer.add_bos_token = False self.tokenizer.legacy = False