7339b904ef
use WORLD_SIZE instead of device_count, supports both the case where the number of gpus we train on is smaller than gpus available, and also multinode training may be a bugfix
Andrej Karpathy2023-06-14 23:33:07 +00:00
f08abb45bd
Merge pull request #274 from apivovarov/gelu
Andrej2023-06-14 16:25:15 -07:00
18ee6b62b6
Merge pull request #275 from apivovarov/rm_unsqueeze
Andrej2023-06-14 15:38:45 -07:00
ed7887c888
Merge pull request #270 from LaihoE/master
Andrej2023-06-14 15:36:26 -07:00
8020bb582b
Merge pull request #276 from apivovarov/gitign
Andrej2023-06-14 15:30:39 -07:00
0f06d9b889
Merge pull request #277 from apivovarov/is_bf16_supported
Andrej2023-06-14 15:29:50 -07:00
cf4835ed6f
Merge pull request #286 from ctjlewis/master
Andrej2023-06-14 15:21:04 -07:00
196160b849
Merge pull request #247 from gnobre/macbook-run-instructions
Andrej2023-04-17 20:16:31 -07:00
21f9bff7e4
Merge pull request #225 from otaviogood/grad_accum
Andrej2023-04-17 20:11:25 -07:00
a6a708c7f1
Merge branch 'master' into grad_accum
Andrej2023-04-17 20:11:00 -07:00
e30c8fda23
Merge branch 'karpathy:master' into macbook-run-instructions
Guilherme Nobre2023-04-15 09:50:58 +01:00
4732c43af3
add macbook specific instructions to generate samples
Guilherme2023-04-15 09:49:38 +01:00
d9f4735f5e
Merge pull request #10 from LaihoE/master
Andrej2023-04-13 00:39:41 -07:00
b288f4cfb2
Merge pull request #146 from lutzroeder/master
Andrej2023-04-12 22:48:37 -07:00
079df20748
Merge pull request #74 from venusatuluri/fix_decode
Andrej2023-04-12 22:45:01 -07:00
01e48ec1ab
Merge pull request #240 from YassineYousfi/master
Andrej2023-04-12 22:43:59 -07:00
7840a66859
Merge pull request #54 from MicroPanda123/luv
Andrej2023-04-12 22:25:18 -07:00
8abe215fba
Merge pull request #128 from abrahamsangha/fix-typo
Andrej2023-04-12 22:24:41 -07:00
ad62003d7a
Merge pull request #142 from kovkev/patch-1
Andrej2023-04-12 22:24:06 -07:00
ea24604b29
Merge pull request #220 from python273/patch-1
Andrej2023-04-12 22:13:01 -07:00
8aeea6d970
Merge pull request #224 from SnehalRaj/patch-1
Andrej2023-04-12 22:12:26 -07:00
2457471c9c
Merge pull request #236 from ymurenko/master
Andrej2023-04-12 22:09:42 -07:00
553f949f46
fix minor bug where we have to scale the loss to account for gradient accumulation, which sums before backprop. note that this is not a major bug because AdamW is scale invariant. however, this did affect gradient clipping
Andrej Karpathy2023-04-13 04:59:11 +00:00
8b1e43209e
small tweaks, make default WD be 0.1 as is often cited, and remove spurious init of LayerNorm, which is already initialized at 1,0
Andrej Karpathy2023-02-06 23:07:25 +00:00
ab21d6c15d
bugfix we have to call the raw_model's estimate_mfu ty @jprobichaud for original PR
Andrej Karpathy2023-02-06 19:55:35 +00:00
ab0718a7dd
add the estimation of model flops utilization (MFU), a very commonly looked at metric that estimates the token throughput in units of A100 bfloat16 peak flops (312 TFLOPS). this gives us a sense of the hardware utilization we're achieving
Andrej Karpathy2023-02-05 00:48:58 +00:00
34720df284
make more accurate the way in which we count parameters. previous count incorrectly included the positional encoding params, when typically only the number of weight parameters is reported for these models
Andrej Karpathy2023-02-04 23:51:18 +00:00
3341b4cecc
oops forgot to subtract embedding params, which don't enter the 6ND equation
Andrej Karpathy2023-02-04 22:33:35 +00:00
5a162bc773
fix silly error, i don't want to confuse a future GPT training on this notebook in the future
Andrej Karpathy2023-02-04 22:11:16 +00:00
25d95dbd65
mildly dramatic refactor for handing all these usage cases across all possible supported and unsupported devices for all the possible switches and flags
Andrej Karpathy2023-02-04 21:06:17 +00:00
dc149891b6
Merge pull request #120 from nynyg/remove_cpu_pin_mem
Andrej2023-02-04 11:28:08 -08:00
b8286f343e
Pin memory only when training on GPU
Nan Yang2023-02-04 11:16:26 -08:00
77e7e04c26
padding 50257 -> 50304 vocab_size, the nerest multiple of 64. the biggest deal smallest optimization i've made in recent past, about 25% faster. this is because the last layer is a major latency bottleneck consuming about 40% of latency due to the very high channel count.
Andrej Karpathy2023-02-04 16:06:18 +00:00
3fd4c0c5ef
who needs a dataloader? overlap the prefetching of the next batch with GPU compute, ehiding the data loading latency entirely. this saves about 1ms lol
Andrej Karpathy2023-02-04 02:52:48 +00:00
46428d3142
Merge pull request #115 from akashmjn/akashmjn/fix-notebook-stats
Andrej2023-02-03 17:23:44 -08:00