candidate changes to apis, have to think through more
This commit is contained in:
1 parent
7c6ea8409e
commit
2febf4463c
8 files changed
+111
-19
No files matched your search
@@ -42,6 +42,16 @@ $ python sample.py
|
||||
|
||||
Training on 1 A100 40GB GPU overnight currently gets loss ~3.74, training on 4 gets ~3.60. Random chance at init is -ln(1/50257) = 10.82. Which brings us to baselines:
|
||||
|
||||
## finetuning
|
||||
|
||||
For an example of how to finetune a GPT on new text go to `data/shakespeare` and look at `prepare.py` to download the tiny shakespeare dataset and render it into a `train.bin` and `val.bin`. Unlike OpenWebText this will run in seconds. Finetuning takes very little time, e.g. on a single GPT just a few minutes. Run an example finetuning like:
|
||||
|
||||
```
|
||||
$ python train.py finetune_shakespeare
|
||||
```
|
||||
|
||||
This will load the config parameter overrides in `config/finetune_shakespeare.py` (I didn't tune them much though). Basically, we initialize from a GPT2 checkpoint with `init_from` and train as normal, except shorter and with a small learning rate. The best checkpoint (lowest validation loss) will be in the `out_dir` directory, e.g. in `out-shakespeare` by default, per the config file. You can then run the code in `sample.py` to generate infinite Shakespeare. Note that you'll have to edit it to point to the correct `out_dir`.
|
||||
|
||||
## baselines
|
||||
|
||||
OpenAI GPT-2 checkpoints allow us to get some baselines in place for openwebtext. We can get the numbers as follows:
|
||||
|
||||
Reference in new issue
Block a user