Repository navigation
Fix: Use model-config dtype and disable remote code by default - #134
satheesh142002 wants to merge 5 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rs-loading-defaults
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
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!
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change Transformers inference to default to
dtype="auto"and disable remote code execution by default for both the model and tokenizer. Apply the sametrust_remote_code=Falsedefault to the vLLM API and CLI. Users can opt in with--trust-remote-codefor 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
Checklist
hf_token, tokenizer ignorestrust_remote_code, and kwargs precedence is documented backwards #110, as related context onlyclose #127