An update: Currenlty, I’m annotating  the .from_pretrained() methods on AutoTokenizer, AutoModel and AutoConfig.
Using @overload, along with Literal[] in the arguments, allows one to specify whether  AutoConfig.from_pretrained(...) is a BertConfig, a T5Config, …etc. However, since there are dozens of pretrained models, all the overloads quickly get in the way of readability.
I think this issue must be addressed in one or more of the following ways.

Separate out annotations to a stub-only package(which IMO is less intrusive, and yet requires same level of maintainance as pyi files in the repo itself).
Just return a PretrainedConfig, and avoid the super-specific overloading.

I don’t think option 2 by itself is enough since, to the best of my knoweldge, it’s impossible to type AutoTokenizer.from_pretrained according to the docstring, without changing the actual signature(or having a “single” overload, which is not allowed, which means we have to create a “dummy” overload  whose only use is to fool mypy).
@sgugger , what do you think?