def _rotate_half(x):
    """
    change sign so the last dimension becomes [-odd, +even]
    """
    x1, x2 = torch.chunk(x, 2, dim=-1)
    return torch.cat((-x2, x1), dim=-1)

    change sign so the last dimension becomes [-odd, +even]
    
training/DeepSpeed-Domino/domino/modules/fused_func.py