Skip to content

Fix: Use model-config dtype and disable remote code by default - #134

Open
satheesh142002 wants to merge 5 commits into
LLMSQL:mainfrom
satheesh142002:fix/safe-transformers-loading-defaults
Open

satheesh142002 wants to merge 5 commits into
LLMSQL:mainfrom
satheesh142002:fix/safe-transformers-loading-defaults

Conversation

@satheesh142002

Copy link
Copy Markdown
Contributor

Change Transformers inference to default to dtype="auto" and disable remote code execution by default for both the model and tokenizer. Apply the same trust_remote_code=False default to the vLLM API and CLI. Users can opt in with --trust-remote-code for models that need custom code.

Updated the API and CLI documentation. Related context: #110 concerns tokenizer argument forwarding; this change addresses the unsafe default, not that separate bug.

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Maintenance

Checklist

close #127

satheesh142002 and others added 3 commits October 7, 2026 22:14
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@DzmitryPihulski DzmitryPihulski left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @satheesh142002, thank you for your contribution.

There is one bug to fix: in inference_transformers.py the tokenizer now gets a hard-coded value instead of the function argument:

load_tok_args = {
    "trust_remote_code": False,   # should be: trust_remote_code
    ...
}

So inference_transformers(..., trust_remote_code=True) (or --trust-remote-code) loads the model with remote code but the tokenizer without it, and models with a custom tokenizer fail to load. We checked it with mocked loaders: passing trust_remote_code=True gives model=True, tokenizer=False.

Please use the trust_remote_code argument there, and extend your tokenizer test to cover trust_remote_code=True as well (the default-False case is already tested). Note that #119 touches the same line in the same way, so whichever is merged second will need a small rebase.

If you find LLMSQL useful, we'd be grateful if you could give the project a ⭐ on GitHub, it really helps us!

satheesh142002 and others added 2 commits October 10, 2026 10:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Inference] Unsafe transformers defaults: dtype=float16 and trust_remote_code=True

2 participants