Commit Graph

32 Commits

Author SHA1 Message Date
Georgi Gerganov
758ff1bbb5
llama : refactor model loading code (#2620)
* llama : style formatting + remove helper methods

* llama : fix quantization using gguf tool

* llama : simplify gguf_file_saver

* llama : fix method names

* llama : simplify write_header()

* llama : no need to pass full file loader to the file saver

just gguf_ctx

* llama : gguf_file_saver write I32

* llama : refactor tensor names (#2622)

* gguf: update tensor names searched in quantization

* gguf : define tensor names as constants

* gguf : initial write API (not tested yet)

* gguf : write to file API (not tested)

* gguf : initial write API ready + example

* gguf : fix header write

* gguf : fixes + simplify example + add ggml_nbytes_pad()

* gguf : minor

* llama : replace gguf_file_saver with new gguf write API

* gguf : streaming support when writing files

* gguf : remove oboslete write methods

* gguf : remove obosolete gguf_get_arr_xxx API

* llama : simplify gguf_file_loader

* llama : move hparams and vocab from gguf_file_loader to llama_model_loader

* llama : merge gguf-util.h in llama.cpp

* llama : reorder definitions in .cpp to match .h

* llama : minor simplifications

* llama : refactor llama_model_loader (WIP)

wip : remove ggml_ctx from llama_model_loader

wip : merge gguf_file_loader in llama_model_loader

* llama : fix shape prints

* llama : fix Windows build + fix norm_rms_eps key

* llama : throw error on missing KV paris in model meta data

* llama : improve printing + log meta data

* llama : switch print order of meta data

---------

Co-authored-by: M. Yusuf Sarıgöz <yusufsarigoz@gmail.com>
2023-08-16 14:34:03 +03:00
klosax
ca4758290c
gguf-llama.cpp : fix n_head_kv 2023-08-14 23:18:41 +02:00
Georgi Gerganov
6c63550f63
llama : update tokenizer style 2023-08-14 22:11:57 +03:00
Georgi Gerganov
7494c78428
llama : sync gguf-llama with llama (#2613)
* llama : sync gguf-llama with llama

* tests : fix build + warnings (test-tokenizer-1 still fails)

* tests : fix wstring_convert

* convert : fix layer names

* llama : sync gguf-llama.cpp

* convert : update HF converter to new tokenizer voodoo magics
2023-08-14 21:33:33 +03:00
Georgi Gerganov
f00780b2ee
llama : sync gguf-llama.cpp with latest llama.cpp (#2608)
* llama : sync gguf-llama.cpp with latest llama.cpp

* minor : indentation + assert

* llama : refactor gguf_buffer and gguf_ctx_buffer

* llama : minor
2023-08-14 16:28:44 +03:00
Georgi Gerganov
62490f1380
gguf : use UNIX line ending 2023-08-14 13:04:35 +03:00
Georgi Gerganov
56a1f32072
Merge branch 'master' into gguf 2023-08-14 10:14:05 +03:00
M. Yusuf Sarıgöz
196b50fee7 gguf : add todos and comments 2023-08-14 08:50:47 +03:00
M. Yusuf Sarıgöz
202eab04d3 gguf : quantization is working 2023-08-12 16:39:05 +03:00
M. Yusuf Sarıgöz
1fc3d30b71 gguf : start implementing quantization (WIP) 2023-08-12 16:09:47 +03:00
M. Yusuf Sarıgöz
fa7c39540c gguf : start implementing quantization (WIP) 2023-08-12 15:55:58 +03:00
M. Yusuf Sarıgöz
b2571af255 gguf : start implementing quantization (WIP) 2023-08-12 14:28:17 +03:00
M. Yusuf Sarıgöz
c4f02b4f74 gguf : start implementing quantization (WIP) 2023-08-12 12:01:17 +03:00
M. Yusuf Sarıgöz
0e1a3c7e7d gguf : start implementing quantization (WIP) 2023-08-12 11:32:34 +03:00
M. Yusuf Sarıgöz
4fa017a1f9 gguf : start implementing quantization (WIP) 2023-08-12 10:40:56 +03:00
M. Yusuf Sarıgöz
2f52008b20 gguf : rm references to old file magics 2023-08-12 07:24:46 +03:00
M. Yusuf Sarıgöz
e732423280 gguf : get rid of n_mult, read n_ff from file 2023-08-11 23:50:38 +03:00
M. Yusuf Sarıgöz
f44bbd3d88 gguf : rm redundant method 2023-08-11 21:00:51 +03:00
M. Yusuf Sarıgöz
7009cf581c gguf : shorter name for member variable 2023-08-11 20:43:02 +03:00
M. Yusuf Sarıgöz
61919c1a8f gguf : rm references to old file formats 2023-08-11 20:36:11 +03:00
M. Yusuf Sarıgöz
d09fd10713 gguf : write metadata in gguf_file_saver 2023-08-11 20:07:43 +03:00
M. Yusuf Sarıgöz
781b9ec3f5 gguf : write metadata in gguf_file_saver (WIP) 2023-08-11 18:01:26 +03:00
M. Yusuf Sarıgöz
28abfc90fa gguf : write metadata in gguf_file_saver (WIP) 2023-08-11 13:27:58 +03:00
M. Yusuf Sarıgöz
e3a4960953 gguf : add gguf_get_kv_type 2023-08-11 13:03:23 +03:00
M. Yusuf Sarıgöz
eb8ca6996f gguf : add gguf_get_kv_type 2023-08-11 12:24:08 +03:00
M. Yusuf Sarıgöz
b2440f1943 gguf : start implementing gguf_file_saver (WIP) 2023-08-11 11:29:50 +03:00
M. Yusuf Sarıgöz
a356b0e228 gguf : start implementing gguf_file_saver (WIP) 2023-08-11 10:50:02 +03:00
M. Yusuf Sarıgöz
e7d346c37c gguf : start implementing gguf_file_saver (WIP) 2023-08-11 09:52:01 +03:00
M. Yusuf Sarıgöz
cfb8e35b73 gguf : inference with 7B model working (WIP) 2023-08-10 19:56:56 +03:00
M. Yusuf Sarıgöz
42cc04d11d gguf : calculate n_mult 2023-08-10 18:49:08 +03:00
M. Yusuf Sarıgöz
4f865181aa gguf : start implementing libllama in GGUF (WIP) 2023-08-10 17:49:31 +03:00
M. Yusuf Sarıgöz
1c4d8bf981 gguf : start implementing libllama in GGUF (WIP) 2023-08-10 16:52:08 +03:00