]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984)
authorDaniel Bevenius <redacted>
Sat, 13 Dec 2025 07:34:26 +0000 (08:34 +0100)
committerGitHub <redacted>
Sat, 13 Dec 2025 07:34:26 +0000 (08:34 +0100)
commitfd1085ffb71dabf4490b428512d0fd6fdc637536
treeee6e03fa3cb42886a39588c4f4fcd40999450659
parent380b4c984e06f8d8381392d15814b3392e39560e
model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984)

* model-conversion : use CONVERTED_MODEL value for converted model [no ci]

This commit updates the model verification scripts to use the
CONVERTED_MODEL environment variable instead of using the MODEL_PATH
(the original model path) as the basis for the converted model file
name.

The motivation for this that currently if the converted model file name
differs from the original model directory/name the verification scripts
will look for the wrong .bin files that were generating when running the
models.
For example, the following steps were not possible:
```console
(venv) $ huggingface-cli download google/gemma-3-270m-it --local-dir ggml-org/gemma-3-270m
(venv) $ python3 convert_hf_to_gguf.py ggml-org/gemma-3-270m --outfile test-bf16.gguf --outtype bf16
(venv) $ cd examples/model-conversion/
(venv) $ export MODEL_PATH=../../ggml-org/gemma-3-270m
(venv) $ export CONVERTED_MODEL=../../test-bf16.gguf
(venv) $ make causal-verify-logits
...
Data saved to data/llamacpp-test-bf16.bin
Data saved to data/llamacpp-test-bf16.txt
Error: llama.cpp logits file not found: data/llamacpp-gemma-3-270m.bin
Please run scripts/run-converted-model.sh first to generate this file.
make: *** [Makefile:62: causal-verify-logits] Error 1
```

With the changes in this commit, the above steps will now work as
expected.
examples/model-conversion/scripts/causal/compare-logits.py
examples/model-conversion/scripts/utils/__init__.py [new file with mode: 0644]
examples/model-conversion/scripts/utils/check-nmse.py
examples/model-conversion/scripts/utils/common.py [new file with mode: 0644]
pyrightconfig.json