Comparing a huggingface config with a dictionary raises an error as the `__eq__` method relies on `other` having a `__dict__` method
`PreTrainedConfig`s inherit their `__eq__` methods from this:  https://github.com/huggingface/transformers/blob/3f936df66287f557c6528912a9a68d7850913b9b/src/transformers/configuration_utils.py#L736

This works fine for comparing two configs, but if you compare a config to something of a different type, (in particular a type without a `__dict__` attribute, like a pure `dict`), it throws an error. It would be easy to add a type check into the equals comparison to ensure that off-type comparisons return False instead.
Would you like to make a PR with such a change?