Unverified Commit 1cb9c76e authored by sam-qordoba's avatar sam-qordoba Committed by GitHub
Browse files

Fix typo in `GPT2Model` code sample

Typo prevented code from running
parent a25d056b
...@@ -428,7 +428,7 @@ with torch.no_grad(): ...@@ -428,7 +428,7 @@ with torch.no_grad():
hidden_states_1, past = model(tokens_tensor_1) hidden_states_1, past = model(tokens_tensor_1)
# past can be used to reuse precomputed hidden state in a subsequent predictions # past can be used to reuse precomputed hidden state in a subsequent predictions
# (see beam-search examples in the run_gpt2.py example # (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` And how to use `GPT2LMHeadModel`
......
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