RichardErkhov commited on
Commit
9913fe2
·
verified ·
1 Parent(s): dd2cca8

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +248 -0
README.md ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ starcoderbase-1b - bnb 8bits
11
+ - Model creator: https://huggingface.co/bigcode/
12
+ - Original model: https://huggingface.co/bigcode/starcoderbase-1b/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ pipeline_tag: text-generation
20
+ inference: true
21
+ widget:
22
+ - text: 'def print_hello_world():'
23
+ example_title: Hello world
24
+ group: Python
25
+ license: bigcode-openrail-m
26
+ datasets:
27
+ - bigcode/the-stack-dedup
28
+ metrics:
29
+ - code_eval
30
+ library_name: transformers
31
+ tags:
32
+ - code
33
+ model-index:
34
+ - name: StarCoderBase-1B
35
+ results:
36
+ - task:
37
+ type: text-generation
38
+ dataset:
39
+ type: openai_humaneval
40
+ name: HumanEval
41
+ metrics:
42
+ - name: pass@1
43
+ type: pass@1
44
+ value: 15.17
45
+ verified: false
46
+ - task:
47
+ type: text-generation
48
+ dataset:
49
+ type: nuprl/MultiPL-E
50
+ name: MultiPL-HumanEval (C++)
51
+ metrics:
52
+ - name: pass@1
53
+ type: pass@1
54
+ value: 11.68
55
+ verified: false
56
+ - task:
57
+ type: text-generation
58
+ dataset:
59
+ type: nuprl/MultiPL-E
60
+ name: MultiPL-HumanEval (Java)
61
+ metrics:
62
+ - name: pass@1
63
+ type: pass@1
64
+ value: 14.2
65
+ verified: false
66
+ - task:
67
+ type: text-generation
68
+ dataset:
69
+ type: nuprl/MultiPL-E
70
+ name: MultiPL-HumanEval (JavaScript)
71
+ metrics:
72
+ - name: pass@1
73
+ type: pass@1
74
+ value: 13.38
75
+ verified: false
76
+ - task:
77
+ type: text-generation
78
+ dataset:
79
+ type: nuprl/MultiPL-E
80
+ name: MultiPL-HumanEval (PHP)
81
+ metrics:
82
+ - name: pass@1
83
+ type: pass@1
84
+ value: 9.94
85
+ verified: false
86
+ - task:
87
+ type: text-generation
88
+ dataset:
89
+ type: nuprl/MultiPL-E
90
+ name: MultiPL-HumanEval (Lua)
91
+ metrics:
92
+ - name: pass@1
93
+ type: pass@1
94
+ value: 12.52
95
+ verified: false
96
+ - task:
97
+ type: text-generation
98
+ dataset:
99
+ type: nuprl/MultiPL-E
100
+ name: MultiPL-HumanEval (Rust)
101
+ metrics:
102
+ - name: pass@1
103
+ type: pass@1
104
+ value: 10.24
105
+ verified: false
106
+ - task:
107
+ type: text-generation
108
+ dataset:
109
+ type: nuprl/MultiPL-E
110
+ name: MultiPL-HumanEval (Swift)
111
+ metrics:
112
+ - name: pass@1
113
+ type: pass@1
114
+ value: 3.92
115
+ verified: false
116
+ - task:
117
+ type: text-generation
118
+ dataset:
119
+ type: nuprl/MultiPL-E
120
+ name: MultiPL-HumanEval (Julia)
121
+ metrics:
122
+ - name: pass@1
123
+ type: pass@1
124
+ value: 11.31
125
+ verified: false
126
+ - task:
127
+ type: text-generation
128
+ dataset:
129
+ type: nuprl/MultiPL-E
130
+ name: MultiPL-HumanEval (R)
131
+ metrics:
132
+ - name: pass@1
133
+ type: pass@1
134
+ value: 5.37
135
+ verified: false
136
+ extra_gated_prompt: >-
137
+ ## Model License Agreement
138
+
139
+ Please read the BigCode [OpenRAIL-M
140
+ license](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement)
141
+ agreement before accepting it.
142
+
143
+ extra_gated_fields:
144
+ I accept the above license agreement, and will use the Model complying with the set of use restrictions and sharing requirements: checkbox
145
+ duplicated_from: bigcode-data/starcoderbase-1b
146
+ ---
147
+
148
+
149
+ # StarCoderBase-1B
150
+
151
+ 1B version of [StarCoderBase](https://huggingface.co/bigcode/starcoderbase).
152
+
153
+ ## Table of Contents
154
+
155
+ 1. [Model Summary](##model-summary)
156
+ 2. [Use](##use)
157
+ 3. [Limitations](##limitations)
158
+ 4. [Training](##training)
159
+ 5. [License](##license)
160
+ 6. [Citation](##citation)
161
+
162
+ ## Model Summary
163
+
164
+ StarCoderBase-1B is a 1B parameter model trained on 80+ programming languages from [The Stack (v1.2)](https://huggingface.co/datasets/bigcode/the-stack), with opt-out requests excluded. The model uses [Multi Query Attention](https://arxiv.org/abs/1911.02150), [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 trillion tokens.
165
+
166
+ - **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
167
+ - **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
168
+ - **Paper:** [💫StarCoder: May the source be with you!](https://arxiv.org/abs/2305.06161)
169
+ - **Point of Contact:** [[email protected]](mailto:[email protected])
170
+ - **Languages:** 80+ Programming languages
171
+
172
+
173
+ ## Use
174
+
175
+ ### Intended use
176
+
177
+ The model was trained on 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, by using the [Tech Assistant prompt](https://huggingface.co/datasets/bigcode/ta-prompt) you can turn it into a capable technical assistant.
178
+
179
+ **Feel free to share your generations in the Community tab!**
180
+
181
+ ### Generation
182
+ ```python
183
+ # pip install -q transformers
184
+ from transformers import AutoModelForCausalLM, AutoTokenizer
185
+
186
+ checkpoint = "bigcode/starcoderbase-1b"
187
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
188
+
189
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
190
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
191
+
192
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
193
+ outputs = model.generate(inputs)
194
+ print(tokenizer.decode(outputs[0]))
195
+ ```
196
+
197
+ ### Fill-in-the-middle
198
+ Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
199
+
200
+ ```python
201
+ input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
202
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
203
+ outputs = model.generate(inputs)
204
+ print(tokenizer.decode(outputs[0]))
205
+ ```
206
+
207
+ ### Attribution & Other Requirements
208
+
209
+ The pretraining 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.
210
+
211
+ # Limitations
212
+
213
+ The model has been trained on source code from 80+ programming languages. The predominant natural language in source code is English although other languages are also present. As such the model is capable of generating code snippets provided some context but the generated code is not guaranteed to work as intended. It can be inefficient, contain bugs or exploits. See [the paper](https://drive.google.com/file/d/1cN-b9GnWtHzQRoE7M7gAEyivY0kl4BYs/view) for an in-depth discussion of the model limitations.
214
+
215
+ # Training
216
+
217
+ ## Model
218
+
219
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
220
+ - **Pretraining steps:** 500k
221
+ - **Pretraining tokens:** 1 trillion
222
+ - **Precision:** bfloat16
223
+
224
+ ## Hardware
225
+
226
+ - **GPUs:** 128 Tesla A100
227
+ - **Training time:** 11 days
228
+
229
+ ## Software
230
+
231
+ - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
232
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
233
+ - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
234
+
235
+ # License
236
+ 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).
237
+ # Citation
238
+ ```
239
+ @article{li2023starcoder,
240
+ title={StarCoder: may the source be with you!},
241
+ author={Raymond Li and Loubna Ben Allal and Yangtian Zi and Niklas Muennighoff and Denis Kocetkov and Chenghao Mou and Marc Marone and Christopher Akiki and Jia Li and Jenny Chim and Qian Liu and Evgenii Zheltonozhskii and Terry Yue Zhuo and Thomas Wang and Olivier Dehaene and Mishig Davaadorj and Joel Lamy-Poirier and João Monteiro and Oleh Shliazhko and Nicolas Gontier and Nicholas Meade and Armel Zebaze and Ming-Ho Yee and Logesh Kumar Umapathi and Jian Zhu and Benjamin Lipkin and Muhtasham Oblokulov and Zhiruo Wang and Rudra Murthy and Jason Stillerman and Siva Sankalp Patel and Dmitry Abulkhanov and Marco Zocca and Manan Dey and Zhihan Zhang and Nour Fahmy and Urvashi Bhattacharyya and Wenhao Yu and Swayam Singh and Sasha Luccioni and Paulo Villegas and Maxim Kunakov and Fedor Zhdanov and Manuel Romero and Tony Lee and Nadav Timor and Jennifer Ding and Claire Schlesinger and Hailey Schoelkopf and Jan Ebert and Tri Dao and Mayank Mishra and Alex Gu and Jennifer Robinson and Carolyn Jane Anderson and Brendan Dolan-Gavitt and Danish Contractor and Siva Reddy and Daniel Fried and Dzmitry Bahdanau and Yacine Jernite and Carlos Muñoz Ferrandis and Sean Hughes and Thomas Wolf and Arjun Guha and Leandro von Werra and Harm de Vries},
242
+ year={2023},
243
+ eprint={2305.06161},
244
+ archivePrefix={arXiv},
245
+ primaryClass={cs.CL}
246
+ }
247
+ ```
248
+