llama.cpp/examples/model-conversion/scripts/utils
Daniel Bevenius 847c35f7d5
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.
2025-12-23 07:27:37 +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 : add verbose flag in run-org-model.py (#18194) 2025-12-19 08:43:16 +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 trust_remote_code for embedding scripts (#18288) 2025-12-23 07:27:37 +01:00