Skip to content

Conversation

@ngxson
Copy link
Collaborator

@ngxson ngxson commented Dec 9, 2025

target model: https://huggingface.co/mistralai/Devstral-Small-2-24B-Instruct-2512

need --mistral-format, otherwise it has problem with tokenizer if you have problem with tokenizer conversion, install transformers version 5.0.0

@pwilkin
Copy link
Collaborator

pwilkin commented Dec 9, 2025

Traceback (most recent call last):
  File "/devel/tools/llama.cpp/convert_hf_to_gguf.py", line 10635, in <module>
    main()
    ~~~~^^
  File "/devel/tools/llama.cpp/convert_hf_to_gguf.py", line 10629, in main
    model_instance.write()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/devel/tools/llama.cpp/convert_hf_to_gguf.py", line 660, in write
    self.prepare_tensors()
    ~~~~~~~~~~~~~~~~~~~~^^
  File "/devel/tools/llama.cpp/convert_hf_to_gguf.py", line 2540, in prepare_tensors
    super().prepare_tensors()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/devel/tools/llama.cpp/convert_hf_to_gguf.py", line 531, in prepare_tensors
    for new_name, data_torch in (self.modify_tensors(data_torch, name, bid)):
                                 ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/devel/tools/llama.cpp/convert_hf_to_gguf.py", line 2862, in modify_tensors
    assert data_torch.nelement() == 0 # unused by the model
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

@ngxson

This comment was marked as resolved.

@ngxson
Copy link
Collaborator Author

ngxson commented Dec 9, 2025

should work now with --mistral-format

Co-authored-by: compilade <[email protected]>
@bartowski1182
Copy link
Contributor

confirming this works :)

https://huggingface.co/bartowski/mistralai_Devstral-Small-2-24B-Instruct-2512-GGUF

LGTM!

@github-actions github-actions bot added the python python script changes label Dec 9, 2025
@ngxson ngxson marked this pull request as ready for review December 9, 2025 22:44
@ngxson ngxson requested a review from CISC as a code owner December 9, 2025 22:44
@ngxson ngxson merged commit 9e79b01 into ggml-org:master Dec 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python script changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants