]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model-conversion : add mmproj conversion target (#15628)
authorDaniel Bevenius <redacted>
Thu, 28 Aug 2025 07:26:48 +0000 (09:26 +0200)
committerGitHub <redacted>
Thu, 28 Aug 2025 07:26:48 +0000 (09:26 +0200)
commit46d9caa27a0281150e8cf082308c0f9e7576ebe5
treef8705b7615f088d13f70320d1de2a4c40193ef16
parent5a0e3ef6f00c658fbae53797f02d5a360ebf8fec
model-conversion : add mmproj conversion target (#15628)

This commit adds a new target to the Makefile for converting models that
are multimodal. This target will convert the original model and in
addition also create the mmproj GGUF model.

The motivation for this change is that for models that are multimodal,
for example those that contain a vision encoders, we will often want to
upload both the quantized model and the vision encoder model to
HuggingFace.

Example usage:
```console
$ make causal-convert-mm-model MODEL_PATH=~/work/ai/models/gemma-3-4b-it-qat-q4_0-unquantized/
...
The environment variable CONVERTED_MODEL can be set to this path using:
export CONVERTED_MODEL=/home/danbev/work/ai/llama.cpp/models/gemma-3-4b-it-qat-q4_0-unquantized.gguf
The mmproj model was created in /home/danbev/work/ai/llama.cpp/models/mmproj-gemma-3-4b-it-qat-q4_0-unquantized.gguf
```
The converted original model can then be quantized, and after that both
the quantized model and the mmproj file can then be uploaded to
HuggingFace.

Refs: https://huggingface.co/ggml-org/gemma-3-4b-it-qat-GGUF/tree/main
examples/model-conversion/Makefile
examples/model-conversion/scripts/causal/convert-model.sh