Since scaling doesn’t require gradients, you should register this tensor as a buffer via
self.register_buffer('scaling', torch.zeros(...))

This will make sure to push this tensor to the specified device(s).