def make_input_output_pair(tokenizer, x):
    """Tokenize the text, then construct input and output for GPT2."""
    toks = tokenizer.encode(x, add_special_tokens=True)
    return [tokenizer.bos_token_id] + toks[:-1], toks