Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bigram.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
max_iters = 3000
eval_interval = 300
learning_rate = 1e-2
device = 'cuda' if torch.cuda.is_available() else 'cpu'
device = ('cuda' if torch.cuda.is_available()
else 'mps' if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available()
else 'cpu')
eval_iters = 200
# ------------

Expand Down
4 changes: 3 additions & 1 deletion gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
max_iters = 5000
eval_interval = 500
learning_rate = 3e-4
device = 'cuda' if torch.cuda.is_available() else 'cpu'
device = ('cuda' if torch.cuda.is_available()
else 'mps' if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available()
else 'cpu')
eval_iters = 200
n_embd = 384
n_head = 6
Expand Down