Hi,
model = BertForSequenceClassification.from_pretrained('bert-base-uncased')
for param in model.bert.parameters():
    param.requires_grad = False

as far I understand, the code above is for ALL params
but you could easily limit to 3 elements :
model.bert.parameters() is a generator
i=0
for i,el in enumerate(model.parameters()):
  if i<3:
    el.requires_grad=False
  else:
    el.requires_grad=True

You can check the result with the result with:
for param in model.parameters():
    print(param)