]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model-conversion : add device option to run-org-model.py (#18318)
authorDaniel Bevenius <redacted>
Tue, 23 Dec 2025 13:07:25 +0000 (14:07 +0100)
committerGitHub <redacted>
Tue, 23 Dec 2025 13:07:25 +0000 (14:07 +0100)
commit8e3ead6e4d1a4c455c8dac1b4690c49366769856
tree563889ae1535898ec03eb9c34be4c1d5d93a48c9
parent12ee1763a6f6130ce820a366d220bbadff54b818
model-conversion : add device option to run-org-model.py (#18318)

* model-conversion : add device option to run-org-model.py

This commit refactors the `run-org-model.py` script to include a
`--device` argument, to allow users to specify the device on which to
run the model (e.g., cpu, cuda, mps, auto).
It also extracts a few common functions to prepare for future changes
where some code duplication will be removed which there currently
exists in embedding scripts.

The Makefile is also been updated to pass the device argument, for
example:
```console
(venv) $ make causal-verify-logits DEVICE=cpu
```

* fix error handling and remove parser reference

This commit fixes the error handling which previously referenced an
undefined 'parser' variable.
examples/model-conversion/Makefile
examples/model-conversion/scripts/causal/run-org-model.py