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

+1 -1
View File
@@ -7,7 +7,6 @@ import tiktoken
from model import GPTConfig, GPT
# -----------------------------------------------------------------------------
# todo make these overridable like in train.py
out_dir = 'out'
device = 'cuda:2'
compile = False
@@ -17,6 +16,7 @@ max_new_tokens = 500 # number of tokens generated in each sample
temperature = 0.8 # higher temperature (up to 1) is more random, lower (down to 0) means more greedy
top_k = 200 # retain only the top_k most likely tokens, clamp others to have 0 probability
seed = 1337
exec(open('configurator.py').read()) # overrides from command line or config file
# -----------------------------------------------------------------------------
torch.manual_seed(seed)