Documentation fixes
# What does this PR do?

This PR fixes two issues with the documentation:
- wrong type annotation in the configurations (see #7559)
- wrong example for masked LM models (see this [froum post](https://discuss.huggingface.co/t/questions-on-the-bertmodellmheadmodel/1317/6))

Fixes #7559
