Skip to content

Commit

Permalink
oops optimizer now demands to know device_type
Browse files Browse the repository at this point in the history
  • Loading branch information
karpathy committed Feb 5, 2023
1 parent 34720df commit 5809026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def get_batch(split):
model = GPT(gptconf)
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:
print("Compiling model...")
Expand Down

0 comments on commit 5809026

Please sign in to comment.