Skip to content

Misc. bug: ERROR:hf-to-gguf:Model Ministral3ForCausalLM is not supported #17987

@vbooka1

Description

@vbooka1

Name and Version

llama.cpp b7376

Operating systems

Linux

Which llama.cpp modules do you know to be affected?

llama-quantize

Command line

python convert_hf_to_gguf.py --outtype q8_0 --verbose Devstral-2-123B-Instruct-2512/

Problem description & steps to reproduce

Hello, I can not quantize Devstral-2-123B-Instruct-2512. I have installed the latest transformers version 4.57.3 from the stable repo and got this error:

$ python convert_hf_to_gguf.py --outtype q8_0 --verbose Devstral-2-123B-Instruct-2512/
INFO:hf-to-gguf:Loading model: Devstral-2-123B-Instruct-2512
WARNING:hf-to-gguf:Failed to load model config from Devstral-2-123B-Instruct-2512: The checkpoint you are trying to load has model type `ministral3` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.

You can update Transformers with the command `pip install --upgrade transformers`. If this does not work, and the checkpoint is very new, then there may not be a release version that supports this model yet. In this case, you can get the most up-to-date code by installing Transformers from source with the command `pip install git+https://github.com/huggingface/transformers.git`
WARNING:hf-to-gguf:Trying to load config.json instead
INFO:hf-to-gguf:Model architecture: Ministral3ForCausalLM
ERROR:hf-to-gguf:Model Ministral3ForCausalLM is not supported

Then I have installed unstable transformers version 5.0.0dev0 from the unstable repo using the command above pip install git+https://github.com/huggingface/transformers.git and got a similar error, although less verbose this time:

$ python convert_hf_to_gguf.py --outtype q8_0 --verbose Devstral-2-123B-Instruct-2512/
INFO:hf-to-gguf:Loading model: Devstral-2-123B-Instruct-2512
INFO:hf-to-gguf:Model architecture: Ministral3ForCausalLM
ERROR:hf-to-gguf:Model Ministral3ForCausalLM is not supported

I was using script convert_hf_to_gguf.py from llama.cpp build version b7342 which should support the Mistral 3 architecture because on huggingface.co there are gguf files successfully converted using older versions, for example this page https://huggingface.co/bartowski/mistralai_Devstral-2-123B-Instruct-2512-GGUF says "Using llama.cpp release b7335 for quantization." and b7335 is older than mine b7342.

Then I have downloaded the latest llama.cpp build b7376 but its version of convert_hf_to_gguf.py also returns the same error.

If I add a "--mistral-format" option then the conversion script shows warning "WARNING:gguf.gguf_writer:Duplicated key name 'general.architecture', overwriting it with new value 'llama' of type STRING" and produces an incorrect file with size 8 MB

I guess I'm doing something wrong, please tell how to quantize the latest Mistral models correctly.

First Bad Commit

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions