Unverified Commit ebe9e6b9 authored by sdtblck's avatar sdtblck Committed by GitHub
Browse files

Update gpt2.py

parent a14adbe0
......@@ -71,10 +71,8 @@ class GPT2LM(LM):
loglikelihoods = []
with torch.no_grad():
for string, in tqdm(requests):
encoded = self.tokenizer.encode_plus(string)["input_ids"]
rolling_token_windows = list(map(utils.make_disjoint_window, utils.get_rolling_token_windows(
token_list=encoded,
token_list=self.tokenizer.encode(string),
prefix_token=self.EOT_TOKEN_ID,
max_seq_len=self.max_length,
context_len=1,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment