llmsql-benchmark
llmsql-benchmark copied to clipboard
[Inference] Unsafe transformers defaults: `dtype=float16` and `trust_remote_code=True`
Problem
inference_transformers() has two risky defaults:
dtype=torch.float16. Many current models are trained and shipped in bfloat16; running them in float16 can overflow and produce NaNs or garbage text without any error, which silently lowers the measured accuracy.trust_remote_code=Truefor the model. This executes arbitrary code from the model repo by default.inference_vllmalready defaults toFalse. (#110 covers the tokenizer ignoring the argument; this issue is about the default itself.)
Proposal
- Default
dtype="auto"(use the dtype from the model config); keep accepting explicit values. Same default in the CLI. - Default
trust_remote_code=Falsefor both model and tokenizer, matching vLLM; mention in the docs/CHANGELOG that models with custom code need--trust-remote-code.
Hi @DzmitryPihulski , I’d like to work on this issue. Would it be okay if I picked it up?
Thanks!
@satheesh142002 of cource, go ahead!
If you find LLMSQL useful, we'd be grateful if you could give the project a ⭐ on GitHub, it really helps us!