When running text-generation-server convert-to-safetensors ./ on a local download of model files that have some remote code files, the AutoConfig.from_pretrained() call prints an interactive prompt:
The repository for ./ contains custom code which must be executed to correctly load the model. You can inspect the repository content at https://hf.co/./.
You can avoid this prompt in future by passing the argument `trust_remote_code=True`.
Do you wish to run the custom code? [y/N]
This PR enables the command to be executed non-interactively in this case. TRUST_REMOTE_CODE defaults to true.
Also made a small fix to a log message printed if the index file already exists to include the full name.
When running
text-generation-server convert-to-safetensors ./
on a local download of model files that have some remote code files, theAutoConfig.from_pretrained()
call prints an interactive prompt:This PR enables the command to be executed non-interactively in this case. TRUST_REMOTE_CODE defaults to true.
Also made a small fix to a log message printed if the index file already exists to include the full name.