Would it make sense to use group norm with transformers? Transformers commonly use layer normalization, as explained here: Why do transformers use layer norm instead of batch norm?.
One of the arguments in that post is that batch normalization is not used in Transformers because sentence length might vary in a given batch.
However, group normalization also works on a single input (doesn't require a batch).
Would it be possible to use group normalization instead of layer normalization in a Transformer?

Transformer data is B x N x D, where B is batch size, N is the max sentence length in the batch, and D is the dimension. There is no equivalent of the channel you get in image data (B x C x W x H).
GroupNorm splits the channel dimension into groups, and finds the means and variance of each group. That pytorch doc page says:

num_channels must be divisible by num_groups

As num_channels is effectively 1 for a transformer, 1 is also the only possible value for num_groups, making it pointless.
