[Safetensors] Add explicit flag to from pretrained (#22083)
* [Safetensors] Add explicit flag to from pretrained
* add test
* remove @
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
---------
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>