Update README.md
Browse files
README.md
CHANGED
@@ -1,6 +1,81 @@
|
|
1 |
---
|
|
|
2 |
inference: false
|
3 |
-
license:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
---
|
5 |
|
6 |
<!-- header start -->
|
@@ -21,12 +96,7 @@ license: other
|
|
21 |
|
22 |
These files are GGML format model files for [Bigcode's StarcoderPlus](https://huggingface.co/bigcode/starcoderplus).
|
23 |
|
24 |
-
|
25 |
-
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
26 |
-
* [KoboldCpp](https://github.com/LostRuins/koboldcpp)
|
27 |
-
* [ParisNeo/GPT4All-UI](https://github.com/ParisNeo/gpt4all-ui)
|
28 |
-
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
|
29 |
-
* [ctransformers](https://github.com/marella/ctransformers)
|
30 |
|
31 |
## Repositories available
|
32 |
|
@@ -35,31 +105,23 @@ GGML files are for CPU + GPU inference using [llama.cpp](https://github.com/gger
|
|
35 |
* [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bigcode/starcoderplus)
|
36 |
|
37 |
<!-- compatibility_ggml start -->
|
38 |
-
##
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
They will NOT be compatible with koboldcpp, text-generation-ui, and other UIs and libraries yet. Support is expected to come over the next few days.
|
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
|
@@ -71,26 +133,6 @@ Refer to the Provided Files table below to see what files use which methods, and
|
|
71 |
| starcoderplus.ggmlv3.q5_1.bin | q5_1 | 5 | 14.26 GB | 16.76 GB | Original llama.cpp quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
|
72 |
| starcoderplus.ggmlv3.q8_0.bin | q8_0 | 8 | 20.11 GB | 22.61 GB | Original llama.cpp quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
|
73 |
|
74 |
-
|
75 |
-
**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.
|
76 |
-
|
77 |
-
## How to run in `llama.cpp`
|
78 |
-
|
79 |
-
I use the following command line; adjust for your tastes and needs:
|
80 |
-
|
81 |
-
```
|
82 |
-
./main -t 10 -ngl 32 -m starcoder-plus.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:"
|
83 |
-
```
|
84 |
-
Change `-t 10` to the number of physical CPU cores you have. For example if your system has 8 cores/16 threads, use `-t 8`.
|
85 |
-
|
86 |
-
Change `-ngl 32` to the number of layers to offload to GPU. Remove it if you don't have GPU acceleration.
|
87 |
-
|
88 |
-
If you want to have a chat-style conversation, replace the `-p <PROMPT>` argument with `-i -ins`
|
89 |
-
|
90 |
-
## How to run in `text-generation-webui`
|
91 |
-
|
92 |
-
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).
|
93 |
-
|
94 |
<!-- footer start -->
|
95 |
## Discord
|
96 |
|
@@ -121,4 +163,94 @@ Thank you to all my generous patrons and donaters!
|
|
121 |
|
122 |
# Original model card: Bigcode's StarcoderPlus
|
123 |
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
pipeline_tag: text-generation
|
3 |
inference: false
|
4 |
+
license: bigcode-openrail-m
|
5 |
+
datasets:
|
6 |
+
- bigcode/the-stack-dedup
|
7 |
+
- tiiuae/falcon-refinedweb
|
8 |
+
metrics:
|
9 |
+
- code_eval
|
10 |
+
- mmlu
|
11 |
+
- arc
|
12 |
+
- hellaswag
|
13 |
+
- truthfulqa
|
14 |
+
library_name: transformers
|
15 |
+
tags:
|
16 |
+
- code
|
17 |
+
model-index:
|
18 |
+
- name: StarCoderPlus
|
19 |
+
results:
|
20 |
+
- task:
|
21 |
+
type: text-generation
|
22 |
+
dataset:
|
23 |
+
type: openai_humaneval
|
24 |
+
name: HumanEval (Prompted)
|
25 |
+
metrics:
|
26 |
+
- name: pass@1
|
27 |
+
type: pass@1
|
28 |
+
value: 26.7
|
29 |
+
verified: false
|
30 |
+
- task:
|
31 |
+
type: text-generation
|
32 |
+
dataset:
|
33 |
+
type: MMLU (5-shot)
|
34 |
+
name: MMLU
|
35 |
+
metrics:
|
36 |
+
- name: Accuracy
|
37 |
+
type: Accuracy
|
38 |
+
value: 45.1
|
39 |
+
verified: false
|
40 |
+
- task:
|
41 |
+
type: text-generation
|
42 |
+
dataset:
|
43 |
+
type: HellaSwag (10-shot)
|
44 |
+
name: HellaSwag
|
45 |
+
metrics:
|
46 |
+
- name: Accuracy
|
47 |
+
type: Accuracy
|
48 |
+
value: 77.3
|
49 |
+
verified: false
|
50 |
+
- task:
|
51 |
+
type: text-generation
|
52 |
+
dataset:
|
53 |
+
type: ARC (25-shot)
|
54 |
+
name: ARC
|
55 |
+
metrics:
|
56 |
+
- name: Accuracy
|
57 |
+
type: Accuracy
|
58 |
+
value: 48.9
|
59 |
+
verified: false
|
60 |
+
- task:
|
61 |
+
type: text-generation
|
62 |
+
dataset:
|
63 |
+
type: ThrutfulQA (0-shot)
|
64 |
+
name: ThrutfulQA
|
65 |
+
metrics:
|
66 |
+
- name: Accuracy
|
67 |
+
type: Accuracy
|
68 |
+
value: 37.9
|
69 |
+
verified: false
|
70 |
+
extra_gated_prompt: >-
|
71 |
+
## Model License Agreement
|
72 |
+
|
73 |
+
Please read the BigCode [OpenRAIL-M
|
74 |
+
license](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement)
|
75 |
+
agreement before accepting it.
|
76 |
+
|
77 |
+
extra_gated_fields:
|
78 |
+
I accept the above license agreement, and will use the Model complying with the set of use restrictions and sharing requirements: checkbox
|
79 |
---
|
80 |
|
81 |
<!-- header start -->
|
|
|
96 |
|
97 |
These files are GGML format model files for [Bigcode's StarcoderPlus](https://huggingface.co/bigcode/starcoderplus).
|
98 |
|
99 |
+
Please note that these MPT GGMLs are **not compatible with llama.cpp**. Please see below for a list of tools known to work with these model files.
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
## Repositories available
|
102 |
|
|
|
105 |
* [Unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bigcode/starcoderplus)
|
106 |
|
107 |
<!-- compatibility_ggml start -->
|
108 |
+
## Compatibilty
|
109 |
|
110 |
+
These files are **not** compatible with llama.cpp.
|
111 |
|
112 |
+
Currently they can be used with:
|
113 |
+
* KoboldCpp, a powerful inference engine based on llama.cpp, with good UI: [KoboldCpp](https://github.com/LostRuins/koboldcpp)
|
114 |
+
* The ctransformers Python library, which includes LangChain support: [ctransformers](https://github.com/marella/ctransformers)
|
115 |
+
* The GPT4All-UI which uses ctransformers: [GPT4All-UI](https://github.com/ParisNeo/gpt4all-ui)
|
116 |
+
* [rustformers' llm](https://github.com/rustformers/llm)
|
117 |
+
* The example `mpt` binary provided with [ggml](https://github.com/ggerganov/ggml)
|
118 |
|
119 |
+
As other options become available I will endeavour to update them here (do let me know in the Community tab if I've missed something!)
|
120 |
|
121 |
+
## Tutorial for using GPT4All-UI
|
122 |
|
123 |
+
* [Text tutorial, written by **Lucas3DCG**](https://huggingface.co/TheBloke/MPT-7B-Storywriter-GGML/discussions/2#6475d914e9b57ce0caa68888)
|
124 |
+
* [Video tutorial, by GPT4All-UI's author **ParisNeo**](https://www.youtube.com/watch?v=ds_U0TDzbzI)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
<!-- compatibility_ggml end -->
|
126 |
|
127 |
## Provided files
|
|
|
133 |
| starcoderplus.ggmlv3.q5_1.bin | q5_1 | 5 | 14.26 GB | 16.76 GB | Original llama.cpp quant method, 5-bit. Even higher accuracy, resource usage and slower inference. |
|
134 |
| starcoderplus.ggmlv3.q8_0.bin | q8_0 | 8 | 20.11 GB | 22.61 GB | Original llama.cpp quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
<!-- footer start -->
|
137 |
## Discord
|
138 |
|
|
|
163 |
|
164 |
# Original model card: Bigcode's StarcoderPlus
|
165 |
|
166 |
+
# StarCoderPlus
|
167 |
+
|
168 |
+
Play with the instruction-tuned StarCoderPlus at [StarChat-Beta](https://huggingface.co/spaces/HuggingFaceH4/starchat-playground).
|
169 |
+
|
170 |
+
## Table of Contents
|
171 |
+
|
172 |
+
1. [Model Summary](##model-summary)
|
173 |
+
2. [Use](##use)
|
174 |
+
3. [Limitations](##limitations)
|
175 |
+
4. [Training](##training)
|
176 |
+
5. [License](##license)
|
177 |
+
6. [Citation](##citation)
|
178 |
+
|
179 |
+
## Model Summary
|
180 |
+
|
181 |
+
StarCoderPlus is a fine-tuned version of [StarCoderBase](https://huggingface.co/bigcode/starcoderbase) on 600B tokens from the English web dataset [RedefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb)
|
182 |
+
combined with [StarCoderData](https://huggingface.co/datasets/bigcode/starcoderdata) from [The Stack (v1.2)](https://huggingface.co/datasets/bigcode/the-stack) and a Wikipedia dataset.
|
183 |
+
It's a 15.5B parameter Language Model trained on English and 80+ programming languages. The model uses [Multi Query Attention](https://arxiv.org/abs/1911.02150),
|
184 |
+
[a context window of 8192 tokens](https://arxiv.org/abs/2205.14135), and was trained using the [Fill-in-the-Middle objective](https://arxiv.org/abs/2207.14255) on 1.6 trillion tokens.
|
185 |
+
|
186 |
+
- **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
|
187 |
+
- **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
|
188 |
+
- **Point of Contact:** [contact@bigcode-project.org](mailto:contact@bigcode-project.org)
|
189 |
+
- **Languages:** English & 80+ Programming languages
|
190 |
+
|
191 |
+
|
192 |
+
## Use
|
193 |
+
|
194 |
+
### Intended use
|
195 |
+
|
196 |
+
The model was trained on English and GitHub code. As such it is _not_ an instruction model and commands like "Write a function that computes the square root." do not work well. However, the instruction-tuned version in [StarChat](hhttps://huggingface.co/spaces/HuggingFaceH4/starchat-playground) makes a capable assistant.
|
197 |
+
|
198 |
+
**Feel free to share your generations in the Community tab!**
|
199 |
+
|
200 |
+
### Generation
|
201 |
+
```python
|
202 |
+
# pip install -q transformers
|
203 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
204 |
+
|
205 |
+
checkpoint = "bigcode/starcoderplus"
|
206 |
+
device = "cuda" # for GPU usage or "cpu" for CPU usage
|
207 |
+
|
208 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
|
209 |
+
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
|
210 |
+
|
211 |
+
inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
|
212 |
+
outputs = model.generate(inputs)
|
213 |
+
print(tokenizer.decode(outputs[0]))
|
214 |
+
```
|
215 |
+
|
216 |
+
### Fill-in-the-middle
|
217 |
+
Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
|
218 |
+
|
219 |
+
```python
|
220 |
+
input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
|
221 |
+
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
|
222 |
+
outputs = model.generate(inputs)
|
223 |
+
print(tokenizer.decode(outputs[0]))
|
224 |
+
```
|
225 |
+
|
226 |
+
### Attribution & Other Requirements
|
227 |
+
|
228 |
+
The training code dataset of the model was filtered for permissive licenses only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a [search index](https://huggingface.co/spaces/bigcode/starcoder-search) that let's you search through the pretraining data to identify where generated code came from and apply the proper attribution to your code.
|
229 |
+
|
230 |
+
# Limitations
|
231 |
+
|
232 |
+
The model has been trained on a mixture of English text from the web and GitHub code. Therefore it might encounter limitations when working with non-English text, and can carry the stereotypes and biases commonly encountered online.
|
233 |
+
Additionally, the generated code should be used with caution as it may contain errors, inefficiencies, or potential vulnerabilities. For a more comprehensive understanding of the base model's code limitations, please refer to See [StarCoder paper](hhttps://arxiv.org/abs/2305.06161).
|
234 |
+
|
235 |
+
# Training
|
236 |
+
StarCoderPlus is a fine-tuned version on 600B English and code tokens of StarCoderBase, which was pre-trained on 1T code tokens. Below are the fine-tuning details:
|
237 |
+
|
238 |
+
## Model
|
239 |
+
- **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
|
240 |
+
- **Finetuning steps:** 150k
|
241 |
+
- **Finetuning tokens:** 600B
|
242 |
+
- **Precision:** bfloat16
|
243 |
+
|
244 |
+
## Hardware
|
245 |
+
|
246 |
+
- **GPUs:** 512 Tesla A100
|
247 |
+
- **Training time:** 14 days
|
248 |
+
|
249 |
+
## Software
|
250 |
+
|
251 |
+
- **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
|
252 |
+
- **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
|
253 |
+
- **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
|
254 |
+
|
255 |
+
# License
|
256 |
+
The model is licensed under the BigCode OpenRAIL-M v1 license agreement. You can find the full agreement [here](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement).
|