-
Couldn't load subscription status.
- Fork 13.4k
model-conversion : add trust_remote_code for orig model run [no ci] #16751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
danbev
merged 1 commit into
ggml-org:master
from
danbev:model-conversion-trust-remove-code
Oct 24, 2025
Merged
model-conversion : add trust_remote_code for orig model run [no ci] #16751
danbev
merged 1 commit into
ggml-org:master
from
danbev:model-conversion-trust-remove-code
Oct 24, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
ggerganov
approved these changes
Oct 24, 2025
wqerrewetw
added a commit
to wqerrewetw/llama.cpp
that referenced
this pull request
Oct 25, 2025
* model-conversion : add trust_remote_code for orig model run [no ci] (ggml-org#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. * webui: support q URL parameter (ggml-org#16728) * webui: support q URL parameter Fixes ggml-org#16722 I’ve checked that it works with Firefox’s AI tools * webui: apply suggestions from code review Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * chore: update webui static build --------- Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> * CUDA: use CUB for arbitary size argsort (ggml-org#16754) * ggml: fix CUDA grid launch condition for large block_nums.y in binbcast (ggml-org#16742) * Fix CUDA grid launch condition for large block_nums.y * add backend ops test * reduce test repetitions * convert : avoid dequantizing mxfp4 for GPT-OSS (ggml-org#16756) * vulkan: Optimize SSM_SCAN (ggml-org#16645) * vulkan: delete dead code (ggml-org#16732) ggml_vk_create_buffer_temp is not used anywhere, and it is the only caller for ggml_vk_pool_malloc. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> * model : set res->t_embd in PLaMo2 models (ggml-org#16766) --------- Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com> Co-authored-by: Florian Badie <florianbadie@odrling.xyz> Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> Co-authored-by: Aman Gupta <amangupta052@gmail.com> Co-authored-by: leejet <leejet714@gmail.com> Co-authored-by: compilade <git@compilade.net> Co-authored-by: Jeff Bolz <jbolz@nvidia.com> Co-authored-by: Giuseppe Scrivano <gscrivan@redhat.com> Co-authored-by: Shunta Saito <shunta.saito@gmail.com>
wqerrewetw
added a commit
to wqerrewetw/llama.cpp
that referenced
this pull request
Oct 25, 2025
* qwen3-coder tool call parser
* reset template
* Fix grammar, hide tool_call from output
* Fix C++ compilation error in tests/test-chat.cpp
Add missing closing brace to terminate test_template_output_parsers() function. This resolves compilation errors that prevented successful build of the test-chat target.
* Update common/chat.cpp
Co-authored-by: Kashyap Jois <kjois@iprdgroup.com>
* Update common/chat.cpp
Co-authored-by: Kashyap Jois <kjois@iprdgroup.com>
* Fix for test
* revert
* Update common/chat.cpp
Co-authored-by: Marcel de Vries <marceldev89@gmail.com>
* Update common/chat.cpp
Co-authored-by: Marcel de Vries <marceldev89@gmail.com>
* removed test
* Qwen3-Coder XML: handle union schema types and sanitize unsupported branches; add tests
- chat-parser: support schema.type as array (e.g. ["number","null"]) in convert_qwen3_param_value()
- chat: resolve $refs; allow unions including "string" as freeform; sanitize empty {"not":{}} in anyOf/oneOf before add_schema
- tests: add Qwen3-Coder regression ensuring grammar builds with unions and ignores {"not":{}}
* Moved common_chat_parse_qwen3_coder_xml
* Fix merge oopsie
* Sync bundled template with upstream
See https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct/blob/main/chat_template.jinja
* Fix crash when tool call doesn't start with <tool_call>
* model-conversion : add trust_remote_code for orig model run [no ci] (ggml-org#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.
* webui: support q URL parameter (ggml-org#16728)
* webui: support q URL parameter
Fixes ggml-org#16722
I’ve checked that it works with Firefox’s AI tools
* webui: apply suggestions from code review
Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>
* chore: update webui static build
---------
Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>
---------
Co-authored-by: Benjamin Oldenburg <benjamin.oldenburg@ordis.co.th>
Co-authored-by: Marcel de Vries <marceldev89@gmail.com>
Co-authored-by: Kashyap Jois <kjois@iprdgroup.com>
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com>
Co-authored-by: Florian Badie <florianbadie@odrling.xyz>
Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.