The optimizer will use the references to all passed parameters and update them in the step function.
You could check the id of each parameter in e.g. optimizer.param_groups[0]['params'] and will see that the ids match the parameter ids in the model.