llama.cpp/examples/model-conversion/scripts/utils
Daniel Bevenius fd1085ffb7
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.
2025-12-13 08:34:26 +01:00
..
__init__.py model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984) 2025-12-13 08:34:26 +01:00
check-nmse.py model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984) 2025-12-13 08:34:26 +01:00
common.py model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984) 2025-12-13 08:34:26 +01:00
create-collection-add-model.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
curl-embedding-server.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
hf-add-model-to-collection.py examples : add model conversion tool/example (#15455) 2025-08-21 12:16:54 +02:00
hf-create-collection.py examples : add model conversion tool/example (#15455) 2025-08-21 12:16:54 +02:00
hf-create-model.py model-conversion : add model card template for embeddings [no ci] (#15557) 2025-08-25 14:25:25 +02:00
hf-upload-gguf-model.py examples : add model conversion tool/example (#15455) 2025-08-21 12:16:54 +02:00
inspect-converted-model.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
inspect-org-model.py model-conversion : add embedding prompt file support (#15871) 2025-09-25 12:02:36 +02:00
perplexity-gen.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
perplexity-run-simple.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
perplexity-run.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
quantize.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
run-embedding-server.sh model-conversion : remove hardcoded /bin/bash shebangs [no ci] (#15765) 2025-09-03 12:50:47 +02:00
semantic_check.py model-conversion : add support for SentenceTransformers (#16387) 2025-10-09 14:35:22 +02:00