forked from karpathy/nanoGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tune the hyperparams a bit, in configs
- Loading branch information
Showing
2 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import time | ||
|
||
out_dir = 'out-shakespeare' | ||
eval_interval = 200 | ||
eval_interval = 5 | ||
eval_iters = 40 | ||
wandb_log = False # feel free to turn on | ||
wandb_project = 'shakespeare' | ||
wandb_run_name = 'ft-' + str(time.time()) | ||
compile = False # takes too little time to finetune, not worth it | ||
|
||
# save a nice and overfit checkpoint that | ||
# will only speak Shakespeare and forgets | ||
# everything else about the world #dark | ||
always_save_checkpoint = True | ||
|
||
dataset = 'shakespeare' | ||
init_from = 'gpt2-xl' | ||
init_from = 'gpt2-xl' # this is the largest GPT-2 model | ||
|
||
# only save checkpoints if the validation loss improves | ||
always_save_checkpoint = False | ||
|
||
# the number of examples per iter: | ||
# 1 batch_size * 32 grad_accum * 1024 tokens = 32,768 tokens/iter | ||
# shakespeare has 301,966 tokens, so 1 epoch ~= 9.2 iters | ||
batch_size = 1 | ||
block_size = 512 | ||
gradient_accumulation_steps = 32 | ||
max_iters = 20 | ||
|
||
learning_rate = 1e-5 | ||
max_iters = 1000 | ||
# finetune at constant LR | ||
learning_rate = 3e-5 | ||
decay_lr = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters