Add files
Browse files- .gitignore +7 -0
- Makefile +42 -0
- README.md +22 -0
- SHA256SUMS +6 -0
- open-llama-3b-v2-f16.bin +3 -0
- open-llama-3b-v2-q4_0.bin +3 -0
- open-llama-3b-v2-q4_1.bin +3 -0
- open-llama-3b-v2-q5_0.bin +3 -0
- open-llama-3b-v2-q5_1.bin +3 -0
- open-llama-3b-v2-q8_0.bin +3 -0
.gitignore
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
convert.py
|
2 |
+
llama.cpp*/
|
3 |
+
pytorch_model.bin
|
4 |
+
*.sha
|
5 |
+
*.tar.gz
|
6 |
+
tokenizer.model
|
7 |
+
config.json
|
Makefile
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
MODEL_NAME= open-llama-3b-v2
|
2 |
+
PYTHON?= python
|
3 |
+
LLAMA_TAG= 7487137
|
4 |
+
LLAMA_TAR= master-$(LLAMA_TAG).tar.gz
|
5 |
+
LLAMA_DIR= llama.cpp-master-$(LLAMA_TAG)
|
6 |
+
LLAMA_FLAGS= LLAMA_NO_K_QUANTS=1
|
7 |
+
HF_REPO= openlm-research/open_llama_3b_v2
|
8 |
+
HF_REF= main
|
9 |
+
HF_FILES= pytorch_model.bin \
|
10 |
+
tokenizer.model \
|
11 |
+
config.json
|
12 |
+
$(HF_FILES): SITE= https://huggingface.co/$(HF_REPO)/resolve/$(HF_REF)
|
13 |
+
$(LLAMA_TAR): SITE= https://github.com/ggerganov/llama.cpp/archive/refs/tags
|
14 |
+
|
15 |
+
FILES= $(HF_FILES) $(LLAMA_TAR)
|
16 |
+
|
17 |
+
QUANTS= f16 q4_0 q4_1 q5_0 q5_1 q8_0
|
18 |
+
MODEL_FILES= $(foreach q,$(QUANTS),$(MODEL_NAME)-$(q).bin)
|
19 |
+
|
20 |
+
.PHONY: all
|
21 |
+
all: $(MODEL_FILES) SHA256SUMS
|
22 |
+
|
23 |
+
$(FILES):
|
24 |
+
curl -L -o $@ --url $(SITE)/$@
|
25 |
+
|
26 |
+
$(LLAMA_DIR): | $(LLAMA_TAR)
|
27 |
+
tar -xf $(LLAMA_TAR)
|
28 |
+
|
29 |
+
$(LLAMA_DIR)/quantize: | $(LLAMA_DIR)
|
30 |
+
$(MAKE) -C $(LLAMA_DIR) $(LLAMA_FLAGS) quantize
|
31 |
+
|
32 |
+
$(MODEL_NAME)-f16.bin: $(HF_FILES) | $(LLAMA_DIR)
|
33 |
+
$(PYTHON) $(LLAMA_DIR)/convert.py --outtype f16 --outfile $@ .
|
34 |
+
|
35 |
+
$(MODEL_NAME)-q%.bin: $(MODEL_NAME)-f16.bin $(LLAMA_DIR)/quantize
|
36 |
+
$(LLAMA_DIR)/quantize $< $@ q$*
|
37 |
+
|
38 |
+
%.sha: %
|
39 |
+
sha256sum $< > $@
|
40 |
+
|
41 |
+
SHA256SUMS: $(addsuffix .sha,$(MODEL_FILES))
|
42 |
+
cat $^ > $@
|
README.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
|
5 |
+
# ggml versions of OpenLLaMa 3B v2
|
6 |
+
|
7 |
+
- Version: version 2 final
|
8 |
+
- Project: [OpenLLaMA: An Open Reproduction of LLaMA](https://github.com/openlm-research/open_llama)
|
9 |
+
- Model: [openlm-research/open_llama_3b_v2](https://huggingface.co/openlm-research/open_llama_3b_v2)
|
10 |
+
- [llama.cpp](https://github.com/ggerganov/llama.cpp): build 607(ffb06a3) or later
|
11 |
+
|
12 |
+
## Use with llama.cpp
|
13 |
+
|
14 |
+
Support is now merged to master branch.
|
15 |
+
|
16 |
+
## Newer quantizations
|
17 |
+
|
18 |
+
There are now more quantization types in llama.cpp, some lower than 4 bits.
|
19 |
+
Currently these are not well supported because of technical reasons.
|
20 |
+
If you want to use them, you have to build llama.cpp (from build 829 (ff5d58f)) with the `LLAMA_QKK_64` Make or CMake variable enabled (see PR [#2001](https://github.com/ggerganov/llama.cpp/pull/2001)).
|
21 |
+
Then you can quantize the F16 or maybe Q8_0 version to what you want.
|
22 |
+
|
23 |
+
## Perplexity on wiki.test.raw
|
24 |
+
|
25 |
+
Coming soon ...
|
SHA256SUMS
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
e89264d46a993cfc93551a90b053ffeab775d9c9ddaa5ce8d604209140fbc63d open-llama-3b-v2-f16.bin
|
2 |
+
06241981eab5d3a06949ad888b2da9dc4eb797e728be23e2bee7b3906454a4fe open-llama-3b-v2-q4_0.bin
|
3 |
+
b5176efb011e7eb78ee1d9d0c49134a3079c6ebc5e2b0bcb68fea21fbb3e2cad open-llama-3b-v2-q4_1.bin
|
4 |
+
da0b0d5c95579916e785441ea5b2d52cec136233c8a512d9200474f2800646aa open-llama-3b-v2-q5_0.bin
|
5 |
+
5f14e98356574f765374da1b8e25e7d1ced8db63ff2ed385215a94e08227ae45 open-llama-3b-v2-q5_1.bin
|
6 |
+
789b57bc3add266ffc165f02f5f002b731e8b19aa26d194c29392de1576ce58f open-llama-3b-v2-q8_0.bin
|
open-llama-3b-v2-f16.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e89264d46a993cfc93551a90b053ffeab775d9c9ddaa5ce8d604209140fbc63d
|
3 |
+
size 6853741856
|
open-llama-3b-v2-q4_0.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:06241981eab5d3a06949ad888b2da9dc4eb797e728be23e2bee7b3906454a4fe
|
3 |
+
size 1928429856
|
open-llama-3b-v2-q4_1.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b5176efb011e7eb78ee1d9d0c49134a3079c6ebc5e2b0bcb68fea21fbb3e2cad
|
3 |
+
size 2142573856
|
open-llama-3b-v2-q5_0.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:da0b0d5c95579916e785441ea5b2d52cec136233c8a512d9200474f2800646aa
|
3 |
+
size 2356717856
|
open-llama-3b-v2-q5_1.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f14e98356574f765374da1b8e25e7d1ced8db63ff2ed385215a94e08227ae45
|
3 |
+
size 2570861856
|
open-llama-3b-v2-q8_0.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:789b57bc3add266ffc165f02f5f002b731e8b19aa26d194c29392de1576ce58f
|
3 |
+
size 3641581856
|