Look like there is error with `sentencepiece ` and `protobuf`
Author: chwenjun225
Pull request: no
Labels: name: bug

### System Info

Hi, I'm install transformers to convert Llama-11B-Vision-Instruct `.pth` to HF format `.safetensors`. I was carefully install follow the https://github.com/huggingface/transformers?tab=readme-ov-file#with-pip

Then I run my bash command:
```sh
python /home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py \
	--input_dir /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct \
	--model_size 11B \
	--output_dir /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct/hf
```

and here is my terminal:
```
(pth_convert_st) (base) chwenjun225@chwenjun225:~/.llama/checkpoints/transformers$ python /home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py \
        --input_dir /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct \
        --model_size 11B \
        --output_dir /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct/hf
Converting the tokenizer.
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message.
Traceback (most recent call last):
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py", line 502, in write_tokenizer
    tokenizer = tokenizer_class(input_tokenizer_path)
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/tokenization_llama_fast.py", line 157, in __init__
    super().__init__(
    ~~~~~~~~~~~~~~~~^
        vocab_file=vocab_file,
        ^^^^^^^^^^^^^^^^^^^^^^
    ...<10 lines>...
        **kwargs,
        ^^^^^^^^^
    )
    ^
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/tokenization_utils_fast.py", line 133, in __init__
    slow_tokenizer = self.slow_tokenizer_class(*args, **kwargs)
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/tokenization_llama.py", line 169, in __init__
    self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False))
                    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/tokenization_llama.py", line 196, in get_spm_processor
    tokenizer.Load(self.vocab_file)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/chwenjun225/miniconda3/envs/pth_convert_st/lib/python3.13/site-packages/sentencepiece/__init__.py", line 961, in Load
    return self.LoadFromFile(model_file)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/home/chwenjun225/miniconda3/envs/pth_convert_st/lib/python3.13/site-packages/sentencepiece/__init__.py", line 316, in LoadFromFile
    return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
RuntimeError: Internal: could not parse ModelProto from /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct/tokenizer.model

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py", line 601, in <module>
    main()
    ~~~~^^
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py", line 576, in main
    write_tokenizer(
    ~~~~~~~~~~~~~~~^
        args.output_dir,
        ^^^^^^^^^^^^^^^^
    ...<4 lines>...
        push_to_hub=args.push_to_hub,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py", line 504, in write_tokenizer
    raise ValueError(
        "Failed to instantiate tokenizer. Please, make sure you have sentencepiece and protobuf installed."
    )
ValueError: Failed to instantiate tokenizer. Please, make sure you have sentencepiece and protobuf installed.
```

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [ ] 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

python /home/chwenjun225/.llama/checkpoints/transformers/src/transformers/models/llama/convert_llama_weights_to_hf.py \
	--input_dir /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct \
	--model_size 11B \
	--output_dir /home/chwenjun225/.llama/checkpoints/Llama3.2-11B-Vision-Instruct/hf

### Expected behavior

I think it should be ok after ```pip install transformers[sentencepiece]``` and ```pip install transformers[protobuf]```. But no, I upgrade my python from 3.11 to 3.13, I still get this problem 

Comments:
hi @chwenjun225, I don't know if the conversion scripts support the Llama Vision models! Those models were all released in Transformers-compatible format at launch, so there wasn't much need!