Because the optimizer is model-agnostic. It creates groups, one group per dictionary you pass.  I don’t know the details but it simply update parameters which are passed to that dictionary with the gradients those tensors contain. You can pass several model’s parameters to a single optimizer and it will work. You can pass random tensors as it grads for those tensors are None.