]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
model-conversion : add trust_remote_code for orig model run [no ci] (#16751)
authorDaniel Bevenius <redacted>
Fri, 24 Oct 2025 10:02:02 +0000 (12:02 +0200)
committerGitHub <redacted>
Fri, 24 Oct 2025 10:02:02 +0000 (12:02 +0200)
commit5a91109a5d7dab5d7adc40bedb397ede99a705b1
tree0a01b1ad903df63104bed3f55a3dcdc14e011da3
parentf8f071faddf32ea09f4234edb6e809b380a9ee26
model-conversion : add trust_remote_code for orig model run [no ci] (#16751)

This commit add the trust_remote_code=True argument when loading models
using AutoConfig, AutoTokenizer, and AutoModelForCausalLM for the run
original model script.

The motivation for this is that some models require custom code to be
loaded properly, and setting trust_remote_code=True avoids a prompt
asking for user confirmation:
```console
(venv) $ make causal-run-original-model
The repository /path/to/model contains custom code which must be
executed to correctly load the model. You can inspect the repository
content at /path/to/model.

Do you wish to run the custom code? [y/N] N
```

Having this as the default seems like a safe choice as we have to clone
or download the models we convert and would be expecting to run any
custom code they have.
examples/model-conversion/scripts/causal/run-org-model.py