This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import GPT2Tokenizer, GPT2LMHeadModel | |
import torch | |
from torch.nn import CrossEntropyLoss | |
from tqdm import trange | |
max_length = 24 | |
batch_size = 200 | |