context = ["I", "love"] while not finished: probs = model(context) next_token = sample(probs) context.append(next_token)