def get_repeative_start(tokens):
    """
    tokens: torch.Tensor with repeative tokens
    """
    length = len(tokens)
    rep_start_id = tokens[:-1] != tokens[1:]
    return torch.cat([torch.tensor([True]), rep_start_id])

    tokens: torch.Tensor with repeative tokens
    
speechlm/speechlm/tasks/joint_sc2t_pretrain.py