Commit Graph

5 Commits

Author SHA1 Message Date
Justine Tunney
cbddf4661b
Get mmap() working with WIN32 MSVC
- We have pretty high quality POSIX polyfills now
- We no longer need to override malloc()

Tracked by issue #91
Improves upon #341
2023-03-28 10:10:02 -07:00
oKatanaaa
e4881686b4
Make WIN32 mmap() improvements (#341)
Still not fully working yet.

Closes #341
2023-03-28 09:19:03 -07:00
Justine Tunney
5b8023d935
Implement prototype for instant mmap() loading
This change uses a custom malloc() implementation to transactionally
capture to a file dynamic memory created during the loading process.
That includes (1) the malloc() allocation for mem_buffer and (2) all
the C++ STL objects. On my $1000 personal computer, this change lets
me run ./main to generate a single token (-n 1) using the float16 7B
model (~12gb size) in one second. In order to do that, there's a one
time cost where a 13gb file needs to be generated. This change rocks
but it shouldn't be necessary to do something this heroic. We should
instead change the file format, so that tensors don't need reshaping
and realignment in order to be loaded.
2023-03-16 22:16:33 -07:00
Georgi Gerganov
f60fa9e50a
.gitignore models/ 2023-03-11 12:27:02 +02:00
Georgi Gerganov
26c0846629
Initial release 2023-03-10 20:56:40 +02:00