BertOnlyMLMHead is a duplicate of BertLMPredictionHead
https://github.com/huggingface/pytorch-pretrained-BERT/blob/35becc6d84f620c3da48db460d6fb900f2451782/pytorch_pretrained_bert/modeling.py#L387-L394

I don't understand how it is useful to wrap the BertLMPredictionHead class like that, perhaps it was forgotten in some refactoring ? I can do a PR if you confirm me it can be replaced.

BertOnlyMLMHead is only used in BertForMaskedLM.
That's an heritage of how I converted the TF code (by reproducing the scope architecture in TF with PyTorch classes). We can't really change that now without re-converting all the TF code.
If you want a more concise version of PyTorch BERT, you can check [pytorchic-bert](https://github.com/dhlee347/pytorchic-bert).