Commit eab96f01 authored by Alexander's avatar Alexander
Browse files

Apply comment

parent 5ead99f2
......@@ -279,10 +279,7 @@ class OPTIMUMLM(BaseLM):
returns: a torch tensor of shape [batch, sequence, vocab] with the
logits returned from the model
"""
#with torch.no_grad():
attention_mask = inps.clone()
attention_mask[:] = 1.0
return self.gpt2(inps, attention_mask)[0]
return self.gpt2(inps)[0]
def _model_generate(self, context, max_length, eos_token_id):
generation_kwargs = {'do_sample': False, 'max_length': max_length}
......
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