Hi,
If you use pytorch convolution with the group option, then the weights will be stored in the way you want.
If your original convolution was dense, I would says you can create a new group convolution, copy the weights in it and replace the dense convolution by the group one in your model. Then the regular saving/forwarding will work with the groups out of the box.