This is to align with the behavior of pipeline where users can pass strings like torch_dtype="float32" and it gets recognized as torch.float32. It now also happens for any PretrainedModel.from_pretrained.
Before submitting
[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.
What does this PR do?
This is to align with the behavior of
pipeline
where users can pass strings liketorch_dtype="float32"
and it gets recognized astorch.float32
. It now also happens for anyPretrainedModel.from_pretrained
.Before submitting
Who can review?
@amyeroberts