The set_to_none=True is just a way to speed-up the zeroing of your gradient attributes. So, it shouldn’t change anything to do with weight decay.
It’s quicker to set all your param.grad attributes to None rather than torch.zeros_like!