IBM / text-generation-inference

IBM development fork of https://github.com/huggingface/text-generation-inference
Apache License 2.0
57 stars 30 forks source link

fix: small improvement to convert-to-safetensors #69

Closed tjohnson31415 closed 7 months ago

tjohnson31415 commented 7 months ago

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.