You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Train a Transformer model on Wikitext-2 with CUDA.
12
12
13
-
python generate.py # Generate samples from the default model checkpoint.
13
+
python generate.py --accel# Generate samples from the default model checkpoint.
14
14
```
15
15
16
16
The model uses the `nn.RNN` module (and its sister modules `nn.GRU` and `nn.LSTM`) or Transformer module (`nn.TransformerEncoder` and `nn.TransformerEncoderLayer`) which will automatically use the cuDNN backend if run on CUDA with cuDNN installed.
@@ -35,8 +35,7 @@ optional arguments:
35
35
--dropout DROPOUT dropout applied to layers (0 = no dropout)
36
36
--tied tie the word embedding and softmax weights
37
37
--seed SEED random seed
38
-
--cuda use CUDA
39
-
--mps enable GPU on macOS
38
+
--accel activate support for an accelerator card
40
39
--log-interval N report interval
41
40
--save SAVE path to save the final model
42
41
--onnx-export ONNX_EXPORT
@@ -49,8 +48,8 @@ With these arguments, a variety of models can be tested.
49
48
As an example, the following arguments produce slower but better models:
0 commit comments