I think you can do it by defining two optimizers and passing the desired params to each one with different learning rates:
params1 = ...
params1 = ...
opt1 = torch.optim.Adam(params1, lr1)
opt2 = torch.optim.Adam(params2, lr2)

or you can also do it like this, from pytorch tutorials here 1:
optim.SGD([
                {'params': model.base.parameters()},
                {'params': model.classifier.parameters(), 'lr': 1e-3}
            ], lr=1e-2, momentum=0.9)

This means that  model.base ’s parameters will use the default learning rate of  1e-2 ,  model.classifier ’s parameters will use a learning rate of  1e-3 , and a momentum of  0.9  will be used for all parameters.