From d6f74975a40beba94ed6f55c964c35aae66f5314 Mon Sep 17 00:00:00 2001 From: Radek Pilar Date: Tue, 12 Dec 2023 17:05:37 +0100 Subject: [PATCH] convert : use sentencepiece tokenizer for Mixtral-instruct --- convert-hf-to-gguf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/convert-hf-to-gguf.py b/convert-hf-to-gguf.py index 770e10eb9..40358409f 100755 --- a/convert-hf-to-gguf.py +++ b/convert-hf-to-gguf.py @@ -180,6 +180,8 @@ class Model: return StableLMModel if model_architecture == "QWenLMHeadModel": return QwenModel + if model_architecture == "MixtralForCausalLM": + return MixtralModel return Model def _is_model_safetensors(self) -> bool: @@ -848,6 +850,11 @@ class StableLMModel(Model): self.gguf_writer.add_parallel_residual(hparams["use_parallel_residual"] if "use_parallel_residual" in hparams else True) self.gguf_writer.add_layer_norm_eps(1e-5) +class MixtralModel(Model): + def set_vocab(self): + self._set_vocab_sentencepiece() + + class QwenModel(Model): @staticmethod