"packaging/pre_build_script_conda.sh" did not exist on "72404de901cdb47049d8f0383a4dc51a1b739317"
Unverified Commit e265bd7c authored by Jiwung Hyun's avatar Jiwung Hyun Committed by GitHub
Browse files

Update gpt2.py

remove vocab size slicing for korean gpt2 model
parent 3670b32e
......@@ -88,7 +88,7 @@ class HFLM(BaseLM):
logits returned from the model
"""
with torch.no_grad():
return self.gpt2(inps)[0][:, :, :50257]
return self.gpt2(inps)[0]
def _model_generate(self, context, max_length, eos_token_id):
return self.gpt2.generate(
......
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