Small changes in perplexity.rstto make the notebook executable on google collaboratory (#13541)
* add imports * Update docs/source/perplexity.rst Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
@@ -110,6 +110,9 @@ available to condition on).
|
|||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
|
import torch
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
max_length = model.config.n_positions
|
max_length = model.config.n_positions
|
||||||
stride = 512
|
stride = 512
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user