Skip to content

Commit

Permalink
Fix typo in GPT2Model code sample
Browse files Browse the repository at this point in the history
Typo prevented code from running
  • Loading branch information
sam-writer authored Feb 18, 2019
1 parent a25d056 commit 1cb9c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ with torch.no_grad():
hidden_states_1, past = model(tokens_tensor_1)
# past can be used to reuse precomputed hidden state in a subsequent predictions
# (see beam-search examples in the run_gpt2.py example
hidden_states-2, past = model(tokens_tensor_2, past=past)
hidden_states_2, past = model(tokens_tensor_2, past=past)
```

And how to use `GPT2LMHeadModel`
Expand Down

0 comments on commit 1cb9c76

Please sign in to comment.