94a3a5e0a5
Merge branch 'master' of github.com:karpathy/llama2.c
Andrej Karpathy
2023-08-14 14:52:15 +00:00
32c1ff97fb
missed p->dim to kv_dim for k,v vectors. we're not doing anything wrong we're just being wasteful with memory. thanks @xefoci7612 for pointing out
Andrej Karpathy
2023-08-14 14:52:07 +00:00
013e012b87
Merge pull request #286 from Nick-infinity/master
Andrej
2023-08-14 07:46:39 -07:00
50f970d170
Merge pull request #289 from chenyangMl/update_readme
Andrej
2023-08-14 07:41:13 -07:00
2a9a4c4e14
update readme wiht a simple line to introduce llama2.c-zh
chenyang
2023-08-14 15:12:30 +08:00
79900ff68e
update readme wiht a simple line to introduce llama2.c-zh
chenyang
2023-08-14 15:00:33 +08:00
82ad2ba34e
remove tiktoken as dependency
Andrej Karpathy
2023-08-14 05:53:57 +00:00
c39f19f1a9
[Feat]: Add support for meta llama hf model conversion
Nikhil Gupta
2023-08-14 10:18:51 +05:30
bae0bcf484
Small tweaks to Readme intro
Andrej
2023-08-13 20:03:00 -07:00
45afa91dca
the accum function has been bothering me, there is no real need to add a function here, it does something trivial and is only used twice, scrap
Andrej Karpathy
2023-08-14 02:54:27 +00:00
854c97b660
turn topp 0.9 back on by default thanks to recent PR contributions truncating before quicksort
Andrej Karpathy
2023-08-14 00:12:45 +00:00
4a2c375df9
Merge pull request #276 from jrudolph/improve-top-p
Andrej
2023-08-13 17:05:38 -07:00
b3d6a9e6b5
Merge pull request #285 from karpathy/feature/civ2
Andrej
2023-08-13 16:55:01 -07:00
091c799653
Merge branch 'master' into feature/civ2
Andrej
2023-08-13 16:54:24 -07:00
c970f69334
oops i should probably call this function lol
Andrej Karpathy
2023-08-13 23:48:01 +00:00
223a67048a
add optional manual dispatch of actions
Andrej Karpathy
2023-08-13 23:39:37 +00:00
86325bf7e8
attempt to upgrade the CI to run our pytest
Andrej Karpathy
2023-08-13 23:35:29 +00:00
b51c63b9f2
Merge pull request #283 from wizzard0/wizzard0-mention-1
Andrej
2023-08-13 14:36:10 -07:00
8506036185
remove 'revive tests' as a todo from the readme
Andrej Karpathy
2023-08-13 21:23:27 +00:00
f0024cfc88
revive tests. now that we have a tiny stories260K model this only requires a 2MB download. phew
Andrej Karpathy
2023-08-13 21:22:44 +00:00
0805cb2c31
tiny whitespace fix to try to eliminate scrollbar
Andrej
2023-08-13 13:40:09 -07:00
b2cce341e0
oops typo fix in readme
Andrej
2023-08-13 13:39:12 -07:00
3e989e21f2
link to stories260K model
Andrej Karpathy
2023-08-13 20:38:05 +00:00
58075b5ac5
update API of sample.py to be better, small changes here
Andrej Karpathy
2023-08-13 20:31:32 +00:00
36b54321e5
bugfix: allocate +1 in tokens buffer for dummy whitespace
atamyrat
2023-08-13 23:23:32 +03:00
1bcb2d18d6
Merge pull request #284 from karpathy/feature/customtokenizer
Andrej
2023-08-13 12:38:06 -07:00
38bfac90a8
bigchange: add multiquery support in run.c. we can now train and inference multiquery models (where n_kv_heads < n_heads). this also means that we, in principle, support Llama 2 34B and 70B models, which are multiquery
Andrej Karpathy
2023-08-13 19:34:05 +00:00
b28c1e26c5
Merge pull request #275 from icppWorld/webassembly-internet-computer
Andrej
2023-08-13 10:14:39 -07:00
5295cbb821
Merge pull request #281 from lintian06/original_llama2
Andrej
2023-08-13 10:14:00 -07:00
12dec61fbf
Merge pull request #282 from mihainadas/master-1
Andrej
2023-08-13 10:13:08 -07:00
0e6213c6e0
Mention I can run the full 7B model
Oleksandr Nikitin
2023-08-13 20:02:34 +03:00
1d68a36d14
Add TypeScript port
Oleksandr Nikitin
2023-08-13 19:10:07 +03:00
27adb082f1
Update README.md
Tian Lin
2023-08-13 21:58:14 +08:00
daa9fd9b8a
sort vocabulary for faster lookup with bsearch()
atamyrat
2023-08-12 23:12:35 +03:00
8b472ded1f
Merge pull request #272 from karpathy/feature/customtokenizer
Andrej
2023-08-12 20:31:21 -07:00
9ff459b925
todo changes
Andrej Karpathy
2023-08-13 03:24:31 +00:00
1d14cb8dd8
add note about 4096 vs 32000 token size on tinystories
Andrej Karpathy
2023-08-13 03:19:35 +00:00
fe49eb222c
readme for custom tokenizers
Andrej Karpathy
2023-08-13 03:16:18 +00:00
9c3cfb46a3
make default be the llama2 tokenizer
Andrej Karpathy
2023-08-13 03:08:07 +00:00
00a61dc7f9
remove the tinyshakespeare dataset until i can bring it back later in a nicer form, otherwise right now we just have a ton of copy paste code here
Andrej Karpathy
2023-08-13 02:18:30 +00:00
f5fc0c245f
final piece: run.c support for new tokenizer, super ez
Andrej Karpathy
2023-08-13 02:12:13 +00:00
ea4cedc588
add ability to export custom tokenizer to .bin format for run.c file
Andrej Karpathy
2023-08-13 02:00:19 +00:00
d421a95b2b
optimize sample_topp by filtering out small value elements up front
Johannes Rudolph
2023-08-12 20:31:19 +02:00
b0cfa2458d
ok i can train and sample a model with a custom tokenizer
Andrej Karpathy
2023-08-11 16:47:29 +00:00
f96c7afb2d
Notable fork section for WebAssembly
icpp
2023-08-11 10:11:32 -04:00
4c6f0af9ff
add the ability to train a custom sentencepiece tokenizer with a given vocab_size, and pretok with it. some more changes still needed to merge this branch, in train.py and ofc run.c. did this in a sadly bit ugly, but fully backwards compatible way. basically when we use custom tokenizer we create a whole new directory structure for that
Andrej Karpathy
2023-08-11 03:58:22 +00:00
c42641205f
turn off topp sampling by default because it is a bit too slow to be the default. it is likely that turning it on, e.g. -p 0.9 is midlly higher quality and safer samples, but this comes at a cost of too much performance in double digit percent sometimes, for it to be on by default i think...
Andrej Karpathy
2023-08-10 15:23:05 +00:00
3c3b19b14c
Merge pull request #242 from tairov/llama2-py
Andrej
2023-08-06 19:51:30 -07:00
f4f4cae4cb
Merge pull request #241 from danielgrittner/master
Andrej
2023-08-06 19:51:13 -07:00
09de2cc4ca
Merge pull request #250 from npinto/master-1
Andrej
2023-08-06 18:43:01 -07:00
98b515e44d
FIX: model.generate()
Nicolas Pinto
2023-08-06 14:48:47 -07:00
999b1bf776
Added conditinal include of the OpenMP header.
rdentato
2023-08-06 21:07:09 +00:00
2297d158e3
Fix link to a github profile
Aydyn Tairov
2023-08-06 21:47:05 +01:00
512f039d5d
Merge branch 'master' into master
Daniel Grittner
2023-08-06 19:55:43 +02:00
6734eaeff5
Rebase chanes to master
Aydyn Tairov
2023-08-06 18:47:05 +01:00
7178facb75
Rebase changes to master
Aydyn Tairov
2023-08-06 18:45:47 +01:00
a7a3aa09b8
Merge branch 'master' of github.com:karpathy/llama2.c
Andrej Karpathy
2023-08-06 16:33:36 +00:00
79791f39b4
let's start respecting the BOS token. Don't print it explicitly, and terminate sequence if it appears. This makes sense especially after the recent addition of prompting. Also be careful with timings and making sure they come out right if we exit early in this data-dependent manner
Andrej Karpathy
2023-08-06 16:33:23 +00:00
4e8a3e8d5d
fix style issue space with stderr printing
Andrej Karpathy
2023-08-06 15:51:58 +00:00
7af81ded7e
Merge pull request #244 from madroidmaq/master
Andrej
2023-08-06 08:43:24 -07:00
a25958fd45
Merge pull request #245 from rdentato/patch-stderr
Andrej
2023-08-06 08:42:09 -07:00
1f53735d12
Merge branch 'karpathy:master' into master
Madroid Ma
2023-08-06 18:18:36 +08:00
9cfb7efb85
Changed all the printf() for error/info messages so that they print on stderr.
rdentato
2023-08-06 09:53:02 +00:00
fcb4cdef8b
add a Rust port
Daniel Grittner
2023-08-06 10:44:48 +02:00
623894f5da
fix bug, have to use raw_model not model to access the loss
Andrej Karpathy
2023-08-06 07:55:46 +00:00
65b0846637
error on seed=0
Andrej Karpathy
2023-08-06 07:31:21 +00:00
8931d5092e
add nucleus sampling. it costs lines of code, but i think thit is the default best way to sample, so it is important to have
Andrej Karpathy
2023-08-06 07:22:39 +00:00