sub_group_size controls which parameters are updated during the optimizer step.