1
0
mirror of https://github.com/osmarks/nanogpt-experiments.git synced 2024-09-21 03:39:44 +00:00

oops optimizer now demands to know device_type

This commit is contained in:
Andrej Karpathy 2023-02-05 00:43:15 +00:00
parent 34720df284
commit 580902617c

View File

@ -57,7 +57,7 @@ gptconf = GPTConfig(
model = GPT(gptconf) model = GPT(gptconf)
model.to(device) model.to(device)
optimizer = model.configure_optimizers(weight_decay=1e-2, learning_rate=1e-4, betas=(0.9, 0.95)) optimizer = model.configure_optimizers(weight_decay=1e-2, learning_rate=1e-4, betas=(0.9, 0.95), device_type=device_type)
if compile: if compile:
print("Compiling model...") print("Compiling model...")