TheBloke commited on
Commit
d4c3a95
1 Parent(s): 9f07ae0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -47
README.md CHANGED
@@ -1,6 +1,18 @@
1
  ---
 
 
 
 
 
 
 
 
2
  inference: false
3
- license: other
 
 
 
 
4
  ---
5
 
6
  <!-- header start -->
@@ -21,45 +33,47 @@ license: other
21
 
22
  These files are GGML format model files for [H2O's GPT-GM-OASST1-Falcon 40B v2](https://huggingface.co/h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2).
23
 
24
- GGML files are for CPU + GPU inference using [llama.cpp](https://github.com/ggerganov/llama.cpp) and libraries and UIs which support this format, such as:
25
- * [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
26
- * [KoboldCpp](https://github.com/LostRuins/koboldcpp)
27
- * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui)
28
- * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
29
- * [ctransformers](https://github.com/marella/ctransformers)
30
 
31
  ## Repositories available
32
 
33
  * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2-GPTQ)
34
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2-GGML)
35
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2)
36
-
37
  <!-- compatibility_ggml start -->
38
  ## Compatibility
39
 
40
- ### Original llama.cpp quant methods: `q4_0, q4_1, q5_0, q5_1, q8_0`
41
 
42
- I have quantized these 'original' quantisation methods using an older version of llama.cpp so that they remain compatible with llama.cpp as of May 19th, commit `2d5db48`.
43
 
44
- These are guaranteed to be compatbile with any UIs, tools and libraries released since late May.
45
 
46
- ### New k-quant methods: `q2_K, q3_K_S, q3_K_M, q3_K_L, q4_K_S, q4_K_M, q5_K_S, q6_K`
 
 
 
 
47
 
48
- These new quantisation methods are compatible with llama.cpp as of June 6th, commit `2d43387`.
49
 
50
- They are now also compatible with recent releases of text-generation-webui, KoboldCpp, llama-cpp-python and ctransformers. Other tools and libraries may or may not be compatible - check their documentation if in doubt.
 
 
 
 
 
51
 
52
- ## Explanation of the new k-quant methods
53
 
54
- The new methods available are:
55
- * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
56
- * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
57
- * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
58
- * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
59
- * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
60
- * GGML_TYPE_Q8_K - "type-0" 8-bit quantization. Only used for quantizing intermediate results. The difference to the existing Q8_0 is that the block size is 256. All 2-6 bit dot products are implemented for this quantization type.
61
 
62
- Refer to the Provided Files table below to see what files use which methods, and how.
63
  <!-- compatibility_ggml end -->
64
 
65
  ## Provided files
@@ -67,36 +81,17 @@ Refer to the Provided Files table below to see what files use which methods, and
67
  | ---- | ---- | ---- | ---- | ---- | ----- |
68
  | h2ogpt-falcon-40b.ggmlv3.q2_k.bin | q2_k | 2 | 13.74 GB | 16.24 GB | New k-quant method. Uses GGML_TYPE_Q5_K for the attention.vw and feed_forward.w2 tensors, GGML_TYPE_Q2_K for the other tensors. |
69
  | h2ogpt-falcon-40b.ggmlv3.q3_k.bin | q3_k | 3 | 17.98 GB | 20.48 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors |
70
- | h2ogpt-falcon-40b.ggmlv3.q4_0.bin | q4_0 | 4 | 23.54 GB | 26.04 GB | Original llama.cpp quant method, 4-bit. |
71
- | h2ogpt-falcon-40b.ggmlv3.q4_1.bin | q4_1 | 4 | 26.16 GB | 28.66 GB | Original llama.cpp quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
72
  | h2ogpt-falcon-40b.ggmlv3.q4_k.bin | q4_k | 4 | 23.54 GB | 26.04 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors |
73
- | h2ogpt-falcon-40b.ggmlv3.q5_0.bin | q5_0 | 5 | 28.77 GB | 31.27 GB | Original llama.cpp quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
74
- | h2ogpt-falcon-40b.ggmlv3.q5_1.bin | q5_1 | 5 | 31.38 GB | 33.88 GB | Original llama.cpp quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
75
  | h2ogpt-falcon-40b.ggmlv3.q5_k.bin | q5_k | 5 | 28.77 GB | 31.27 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors |
76
  | h2ogpt-falcon-40b.ggmlv3.q6_k.bin | q6_k | 6 | 34.33 GB | 36.83 GB | New k-quant method. Uses GGML_TYPE_Q8_K - 6-bit quantization - for all tensors |
77
- | h2ogpt-falcon-40b.ggmlv3.q8_0.bin | q8_0 | 8 | 44.46 GB | 46.96 GB | Original llama.cpp quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
78
 
79
  **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
80
 
81
- ## How to run in `llama.cpp`
82
-
83
- I use the following command line; adjust for your tastes and needs:
84
-
85
- ```
86
- ./main -t 10 -ngl 32 -m h2ogpt-gm-oasst1-en-2048-falcon-40b0v2.ggmlv3.q5_0.bin --color -c 2048 --temp 0.7 --repeat_penalty 1.1 -n -1 -p "### Instruction: Write a story about llamas\n### Response:"
87
- ```
88
- If you're able to use full GPU offloading, you should use `-t 1` to get best performance.
89
-
90
- If not able to fully offload to GPU, you should use more cores. Change `-t 10` to the number of physical CPU cores you have, or a lower number depending on what gives best performance.
91
-
92
- Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
93
-
94
- If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
95
-
96
- ## How to run in `text-generation-webui`
97
-
98
- Further instructions here: [text-generation-webui/docs/llama.cpp-models.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp-models.md).
99
-
100
  <!-- footer start -->
101
  ## Discord
102
 
 
1
  ---
2
+ language:
3
+ - en
4
+ library_name: transformers
5
+ tags:
6
+ - gpt
7
+ - llm
8
+ - large language model
9
+ - h2o-llmstudio
10
  inference: false
11
+ thumbnail: >-
12
+ https://h2o.ai/etc.clientlibs/h2o/clientlibs/clientlib-site/resources/images/favicon.ico
13
+ license: apache-2.0
14
+ datasets:
15
+ - OpenAssistant/oasst1
16
  ---
17
 
18
  <!-- header start -->
 
33
 
34
  These files are GGML format model files for [H2O's GPT-GM-OASST1-Falcon 40B v2](https://huggingface.co/h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2).
35
 
36
+ These GGML files will **not** work in llama.cpp, text-generation-webui or KoboldCpp.
37
+
38
+ They can be used from:
39
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui).
40
+ * The ctransformers Python library, which includes LangChain support: [ctransformers](https://github.com/marella/ctransformers).
41
+ * A new fork of llama.cpp that introduced this new Falcon GGML support: [cmp-nc/ggllm.cpp](https://github.com/cmp-nct/ggllm.cpp).
42
 
43
  ## Repositories available
44
 
45
  * [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2-GPTQ)
46
  * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2-GGML)
47
  * [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/h2oai/h2ogpt-gm-oasst1-en-2048-falcon-40b-v2)
48
+
49
  <!-- compatibility_ggml start -->
50
  ## Compatibility
51
 
52
+ The recommended UI for these GGMLs is [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui). Preliminary CUDA GPU acceleration is provided.
53
 
54
+ For use from Python code, use [ctransformers](https://github.com/marella/ctransformers). Again, with preliminary CUDA GPU acceleration
55
 
56
+ Or to build cmp-nct's fork of llama.cpp with Falcon 7B support plus preliminary CUDA acceleration, please try the following steps:
57
 
58
+ ```
59
+ git clone https://github.com/cmp-nct/ggllm.cpp
60
+ cd ggllm.cpp
61
+ rm -rf build && mkdir build && cd build && cmake -DGGML_CUBLAS=1 .. && cmake --build . --config Release
62
+ ```
63
 
64
+ Compiling on Windows: developer cmp-nct notes: 'I personally compile it using VScode. When compiling with CUDA support using the Microsoft compiler it's essential to select the "Community edition build tools". Otherwise CUDA won't compile.'
65
 
66
+ Once compiled you can then use `bin/falcon_main` just like you would use llama.cpp. For example:
67
+ ```
68
+ bin/falcon_main -t 8 -ngl 100 -b 1 -m falcon7b-instruct.ggmlv3.q4_0.bin -p "What is a falcon?\n### Response:"
69
+ ```
70
+
71
+ You can specify `-ngl 100` regardles of your VRAM, as it will automatically detect how much VRAM is available to be used.
72
 
73
+ Adjust `-t 8` (the number of CPU cores to use) according to what performs best on your system. Do not exceed the number of physical CPU cores you have.
74
 
75
+ `-b 1` reduces batch size to 1. This slightly lowers prompt evaluation time, but frees up VRAM to load more of the model on to your GPU. If you find prompt evaluation too slow and have enough spare VRAM, you can remove this parameter.
 
 
 
 
 
 
76
 
 
77
  <!-- compatibility_ggml end -->
78
 
79
  ## Provided files
 
81
  | ---- | ---- | ---- | ---- | ---- | ----- |
82
  | h2ogpt-falcon-40b.ggmlv3.q2_k.bin | q2_k | 2 | 13.74 GB | 16.24 GB | New k-quant method. Uses GGML_TYPE_Q5_K for the attention.vw and feed_forward.w2 tensors, GGML_TYPE_Q2_K for the other tensors. |
83
  | h2ogpt-falcon-40b.ggmlv3.q3_k.bin | q3_k | 3 | 17.98 GB | 20.48 GB | New k-quant method. Uses GGML_TYPE_Q3_K for all tensors |
84
+ | h2ogpt-falcon-40b.ggmlv3.q4_0.bin | q4_0 | 4 | 23.54 GB | 26.04 GB | Old quant method, 4-bit. |
85
+ | h2ogpt-falcon-40b.ggmlv3.q4_1.bin | q4_1 | 4 | 26.16 GB | 28.66 GB | Old quant method, 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
86
  | h2ogpt-falcon-40b.ggmlv3.q4_k.bin | q4_k | 4 | 23.54 GB | 26.04 GB | New k-quant method. Uses GGML_TYPE_Q4_K for all tensors |
87
+ | h2ogpt-falcon-40b.ggmlv3.q5_0.bin | q5_0 | 5 | 28.77 GB | 31.27 GB | Old quant method, 5-bit. Higher accuracy, higher resource usage and slower inference. |
88
+ | h2ogpt-falcon-40b.ggmlv3.q5_1.bin | q5_1 | 5 | 31.38 GB | 33.88 GB | Old quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
89
  | h2ogpt-falcon-40b.ggmlv3.q5_k.bin | q5_k | 5 | 28.77 GB | 31.27 GB | New k-quant method. Uses GGML_TYPE_Q5_K for all tensors |
90
  | h2ogpt-falcon-40b.ggmlv3.q6_k.bin | q6_k | 6 | 34.33 GB | 36.83 GB | New k-quant method. Uses GGML_TYPE_Q8_K - 6-bit quantization - for all tensors |
91
+ | h2ogpt-falcon-40b.ggmlv3.q8_0.bin | q8_0 | 8 | 44.46 GB | 46.96 GB | Old quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
92
 
93
  **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  <!-- footer start -->
96
  ## Discord
97