accessing all the hidden-states of BERT/GPT/GPT-2,
accessing all the attention weights for each head of BERT/GPT/GPT-2,
retrieving heads output values and gradients to be able to compute head importance score and prune head as explained
  in https://arxiv.org/abs/1905.10650.

To help you understand and use these features, we have added a specific example script: bertology.py while extract information and prune a model pre-trained on
GLUE.