def shift_tokens_left(input_ids, pad_token_id):
    """Shift input ids one token to the left"""
    prev_output_tokens = input_ids.clone()
    prev_output_tokens[:, :-1] = input_ids[:, 1:]
    prev_output_tokens[:, -1] = pad_token_id
    return prev_output_tokens