It's possible someone wants to use from_pretrained but have the ability to override the config stored in the model repository (see point 2 here for an example use case). In this case, they might want to use ModelCls.from_pretrained("hub/id", model_kwargs={"config": myconfig}). This PR makes sure that "config" is not overriden by from_pretrained
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.
It's possible someone wants to use
from_pretrained
but have the ability to override the config stored in the model repository (see point 2 here for an example use case). In this case, they might want to useModelCls.from_pretrained("hub/id", model_kwargs={"config": myconfig})
. This PR makes sure that "config" is not overriden byfrom_pretrained