nn.Parameter will enable gradients by default, so the right way to achieve the same thing is just a = nn.Parameter(torch.zeros(5)).
Your first variant works, but it is wrong - it pretends that by changing to requires_grad=False there would be a difference.
The second variant just spells out the default parameter.
Best regards
Thomas