How to get intermediate features from HF pretrained model?

I am trying to use the Wav2Vec2 conformer and instead of final layer outputs, I want to index the weights after 6th MultiHeadAttention Layer, how do I do that?