]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model-conversion : add trust_remote_code for embedding scripts (#18288)
authorDaniel Bevenius <redacted>
Tue, 23 Dec 2025 06:27:37 +0000 (07:27 +0100)
committerGitHub <redacted>
Tue, 23 Dec 2025 06:27:37 +0000 (07:27 +0100)
commit847c35f7d5cbc686dfd5ae70f5702bafb84a8be9
treefb101ef3be91c68ea737477318a0bd46c1a84575
parenta6a552e4ec43c2b6ed29b05d8da6921c59f05ed7
model-conversion : add trust_remote_code for embedding scripts (#18288)

This commit adds the trust_remote_code=True parameter when loading
models and configurations in the embedding model conversion scripts.
It also adds a cast to float for models that might use a data type that
is not supported by python, for example bfloat16.

The motivation for this is that some models may require custom code to
be executed during loading, and setting trust_remote_code to True avoids
getting prompted for confirmation.

Future work will consolidate the embedding conversion scripts with the
causal conversion scripts to avoid code duplication. But in the mean
time it would be nice to have this fix in place.
examples/model-conversion/scripts/embedding/run-original-model.py
examples/model-conversion/scripts/utils/semantic_check.py