Mistral Slow Tokenizer error
Author: ari9dam
Pull request: no

### System Info

transformers=4.35.0

### Who can help?

@Arthu

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

No slow tokenizer

tokenizer = transformers.AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1", use_fast=False)--> results into exception
TypeError: not a string

### Expected behavior

1. slow tokenizer works

Comments:
Hey, sorry but I just can't reproduce the snippet is missing the end and the full traceback 

TypeError                                 Traceback (most recent call last)
Cell In[13], line 2
      1 import transformers
----> 2 tokenizer = transformers.AutoTokenizer.from_pretrained("/mnt/mistral-7b-v0.1/", use_fast=False)

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/transformers/models/auto/tokenization_auto.py:768, in AutoTokenizer.from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs)
    764     if tokenizer_class is None:
    765         raise ValueError(
    766             f"Tokenizer class {tokenizer_class_candidate} does not exist or is not currently imported."
    767         )
--> 768     return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
    770 # Otherwise we have to be creative.
    771 # if model is an encoder decoder, the encoder tokenizer class is used by default
    772 if isinstance(config, EncoderDecoderConfig):

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/transformers/tokenization_utils_base.py:2024, in PreTrainedTokenizerBase.from_pretrained(cls, pretrained_model_name_or_path, cache_dir, force_download, local_files_only, token, revision, *init_inputs, **kwargs)
   2021     else:
   2022         logger.info(f"loading file {file_path} from cache at {resolved_vocab_files[file_id]}")
-> 2024 return cls._from_pretrained(
   2025     resolved_vocab_files,
   2026     pretrained_model_name_or_path,
   2027     init_configuration,
   2028     *init_inputs,
   2029     token=token,
   2030     cache_dir=cache_dir,
   2031     local_files_only=local_files_only,
   2032     _commit_hash=commit_hash,
   2033     _is_local=is_local,
   2034     **kwargs,
   2035 )

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/transformers/tokenization_utils_base.py:2256, in PreTrainedTokenizerBase._from_pretrained(cls, resolved_vocab_files, pretrained_model_name_or_path, init_configuration, token, cache_dir, local_files_only, _commit_hash, _is_local, *init_inputs, **kwargs)
   2254 # Instantiate the tokenizer.
   2255 try:
-> 2256     tokenizer = cls(*init_inputs, **init_kwargs)
   2257 except OSError:
   2258     raise OSError(
   2259         "Unable to load vocabulary from file. "
   2260         "Please check that the provided vocabulary is accessible and not corrupted."
   2261     )

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/transformers/models/llama/tokenization_llama.py:178, in LlamaTokenizer.__init__(self, vocab_file, unk_token, bos_token, eos_token, pad_token, sp_model_kwargs, add_bos_token, add_eos_token, clean_up_tokenization_spaces, use_default_system_prompt, spaces_between_special_tokens, legacy, **kwargs)
    176 self.add_eos_token = add_eos_token
    177 self.use_default_system_prompt = use_default_system_prompt
--> 178 self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False))
    180 super().__init__(
    181     bos_token=bos_token,
    182     eos_token=eos_token,
   (...)
    192     **kwargs,
    193 )

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/transformers/models/llama/tokenization_llama.py:203, in LlamaTokenizer.get_spm_processor(self, from_slow)
    201 tokenizer = spm.SentencePieceProcessor(**self.sp_model_kwargs)
    202 if self.legacy or from_slow:  # no dependency on protobuf
--> 203     tokenizer.Load(self.vocab_file)
    204     return tokenizer
    206 with open(self.vocab_file, "rb") as f:

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/sentencepiece/__init__.py:905, in SentencePieceProcessor.Load(self, model_file, model_proto)
    903 if model_proto:
    904   return self.LoadFromSerializedProto(model_proto)
--> 905 return self.LoadFromFile(model_file)

File /anaconda/envs/orca2_hf_gradio/lib/python3.9/site-packages/sentencepiece/__init__.py:310, in SentencePieceProcessor.LoadFromFile(self, arg)
    309 def LoadFromFile(self, arg):
--> 310     return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)

TypeError: not a string
=================

Might be an issue with my local version. Because when I'm taking it from huggingface repo it is working.

Please refrain from just copy pasting unfromatted text like this it's not gonna help me help you. I need a full reproducer, I cannot access your local folder to see what your tokenizer.model looks like. See the following colab https://colab.research.google.com/drive/1AcZygj9zMvbkiVduKDsm1e1x-TsCJZJx?usp=sharing

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.