You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the mllama convert_mllama_weights_to_hf.py script, when attempting to convert a model with the --num_shards 1 flag, the script expects the file consolidated.pth in the following line:
However, the Llama 3.2 11B vision instruct model is distributed as a single shard, but uses consolidated.00.pth as the filename instead:
ll ~/.llama/checkpoints/Llama3.2-11B-Vision-Instruct
total 41524824
drwxr-xr-x@ 6 user group 192B Dec 2 14:05 ./
drwxr-xr-x@ 5 user group 160B Dec 2 14:05 ../
-rw-r--r--@ 1 user group 156B Dec 2 14:05 checklist.chk
-rw-r--r--@ 1 user group 20G Dec 2 14:14 consolidated.00.pth
-rw-r--r--@ 1 user group 321B Dec 2 14:05 params.json
-rw-r--r--@ 1 user group 2.1M Dec 2 14:05 tokenizer.model
This results in a file not found error:
FileNotFoundError: [Errno 2] No such file or directory: 'path-to-model/consolidated.pth'
The text was updated successfully, but these errors were encountered:
A quick fix would be to simply update the file reference to consolidated.00.pth but I'm not sure if that would break compatibility with other models besides the 11B Vision Instruct model.
I'm happy to help contribute a fix if someone can weigh in on the possible compatibility issues.
Tagging @ArthurZucker since he seems to be the original author of this script.
strangiato
added a commit
to strangiato/transformers
that referenced
this issue
Dec 3, 2024
In the mllama convert_mllama_weights_to_hf.py script, when attempting to convert a model with the
--num_shards 1
flag, the script expects the fileconsolidated.pth
in the following line:https://github.com/huggingface/transformers/blob/f9c7e6021e9a9a9fd3fc8bb291da9451066aeb8d/src/transformers/models/mllama/convert_mllama_weights_to_hf.py#L341C1-L342C1
However, the Llama 3.2 11B vision instruct model is distributed as a single shard, but uses
consolidated.00.pth
as the filename instead:This results in a file not found error:
The text was updated successfully, but these errors were encountered: