shuttling the poor mans configurator aside into its own file and adding it to all of train,sample,bench. because i am leaving args in globals() so i can avoid having to prepend every single variable with an args., i have to exec the configurator and the optional configs. so we're left with something very gross by standard convention but also quite simple and functional. *ducks*

This commit is contained in:
Andrej Karpathy committed 2023-01-05 00:44:35 +00:00
1 parent ab04701f9f
commit d562b3e550
5 files changed
+59 -41

No files matched your search

+8 -5
View File
@@ -7,16 +7,19 @@ import time
import torch
from model import GPTConfig, GPT
# -----------------------------------------------------------------------------
device = 'cuda'
batch_size = 8
block_size = 1024
compile = True
exec(open('configurator.py').read()) # overrides from command line or config file
# -----------------------------------------------------------------------------
dtype = torch.bfloat16 # todo make configurable
torch.backends.cuda.matmul.allow_tf32 = True # allow tf32 on matmul
torch.backends.cudnn.allow_tf32 = True # allow tf32 on cudnn
torch.manual_seed(1337)
batch_size = 8
block_size = 1024
dtype = torch.bfloat16
compile = True
# data loading init
real_data = True
if real_data: