Text Generation
Transformers
code
Eval Results
Inference Endpoints
Sergey Kostyaev commited on
Commit
66a5b0f
1 Parent(s): e41023f

Update readme

Browse files

Add model card

Files changed (1) hide show
  1. README.md +353 -1
README.md CHANGED
@@ -1,3 +1,355 @@
1
  ---
2
- license: bigscience-openrail-m
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pipeline_tag: text-generation
3
+ inference: true
4
+ widget:
5
+ - text: 'def print_hello_world():'
6
+ example_title: Hello world
7
+ group: Python
8
+ license: bigcode-openrail-m
9
+ datasets:
10
+ - bigcode/the-stack-dedup
11
+ metrics:
12
+ - code_eval
13
+ library_name: transformers
14
+ tags:
15
+ - code
16
+ model-index:
17
+ - name: StarCoderBase
18
+ results:
19
+ - task:
20
+ type: text-generation
21
+ dataset:
22
+ type: openai_humaneval
23
+ name: HumanEval
24
+ metrics:
25
+ - name: pass@1
26
+ type: pass@1
27
+ value: 0.304
28
+ verified: false
29
+ - task:
30
+ type: text-generation
31
+ dataset:
32
+ type: mbpp
33
+ name: MBPP
34
+ metrics:
35
+ - name: pass@1
36
+ type: pass@1
37
+ value: 0.49
38
+ verified: false
39
+ - task:
40
+ type: text-generation
41
+ dataset:
42
+ type: ds1000
43
+ name: DS-1000 (Overall Completion)
44
+ metrics:
45
+ - name: pass@1
46
+ type: pass@1
47
+ value: 0.238
48
+ verified: false
49
+ - task:
50
+ type: text-generation
51
+ dataset:
52
+ type: nuprl/MultiPL-E
53
+ name: MultiPL-HumanEval (C++)
54
+ metrics:
55
+ - name: pass@1
56
+ type: pass@1
57
+ value: 0.3056
58
+ verified: false
59
+ - task:
60
+ type: text-generation
61
+ dataset:
62
+ type: nuprl/MultiPL-E
63
+ name: MultiPL-HumanEval (C#)
64
+ metrics:
65
+ - name: pass@1
66
+ type: pass@1
67
+ value: 0.2056
68
+ verified: false
69
+ - task:
70
+ type: text-generation
71
+ dataset:
72
+ type: nuprl/MultiPL-E
73
+ name: MultiPL-HumanEval (D)
74
+ metrics:
75
+ - name: pass@1
76
+ type: pass@1
77
+ value: 0.1001
78
+ verified: false
79
+ - task:
80
+ type: text-generation
81
+ dataset:
82
+ type: nuprl/MultiPL-E
83
+ name: MultiPL-HumanEval (Go)
84
+ metrics:
85
+ - name: pass@1
86
+ type: pass@1
87
+ value: 0.2147
88
+ verified: false
89
+ - task:
90
+ type: text-generation
91
+ dataset:
92
+ type: nuprl/MultiPL-E
93
+ name: MultiPL-HumanEval (Java)
94
+ metrics:
95
+ - name: pass@1
96
+ type: pass@1
97
+ value: 0.2853
98
+ verified: false
99
+ - task:
100
+ type: text-generation
101
+ dataset:
102
+ type: nuprl/MultiPL-E
103
+ name: MultiPL-HumanEval (Julia)
104
+ metrics:
105
+ - name: pass@1
106
+ type: pass@1
107
+ value: 0.2109
108
+ verified: false
109
+ - task:
110
+ type: text-generation
111
+ dataset:
112
+ type: nuprl/MultiPL-E
113
+ name: MultiPL-HumanEval (JavaScript)
114
+ metrics:
115
+ - name: pass@1
116
+ type: pass@1
117
+ value: 0.317
118
+ verified: false
119
+ - task:
120
+ type: text-generation
121
+ dataset:
122
+ type: nuprl/MultiPL-E
123
+ name: MultiPL-HumanEval (Lua)
124
+ metrics:
125
+ - name: pass@1
126
+ type: pass@1
127
+ value: 0.2661
128
+ verified: false
129
+ - task:
130
+ type: text-generation
131
+ dataset:
132
+ type: nuprl/MultiPL-E
133
+ name: MultiPL-HumanEval (PHP)
134
+ metrics:
135
+ - name: pass@1
136
+ type: pass@1
137
+ value: 0.2675
138
+ verified: false
139
+ - task:
140
+ type: text-generation
141
+ dataset:
142
+ type: nuprl/MultiPL-E
143
+ name: MultiPL-HumanEval (Perl)
144
+ metrics:
145
+ - name: pass@1
146
+ type: pass@1
147
+ value: 0.1632
148
+ verified: false
149
+ - task:
150
+ type: text-generation
151
+ dataset:
152
+ type: nuprl/MultiPL-E
153
+ name: MultiPL-HumanEval (Python)
154
+ metrics:
155
+ - name: pass@1
156
+ type: pass@1
157
+ value: 0.3035
158
+ verified: false
159
+ - task:
160
+ type: text-generation
161
+ dataset:
162
+ type: nuprl/MultiPL-E
163
+ name: MultiPL-HumanEval (R)
164
+ metrics:
165
+ - name: pass@1
166
+ type: pass@1
167
+ value: 0.1018
168
+ verified: false
169
+ - task:
170
+ type: text-generation
171
+ dataset:
172
+ type: nuprl/MultiPL-E
173
+ name: MultiPL-HumanEval (Ruby)
174
+ metrics:
175
+ - name: pass@1
176
+ type: pass@1
177
+ value: 0.1725
178
+ verified: false
179
+ - task:
180
+ type: text-generation
181
+ dataset:
182
+ type: nuprl/MultiPL-E
183
+ name: MultiPL-HumanEval (Racket)
184
+ metrics:
185
+ - name: pass@1
186
+ type: pass@1
187
+ value: 0.1177
188
+ verified: false
189
+ - task:
190
+ type: text-generation
191
+ dataset:
192
+ type: nuprl/MultiPL-E
193
+ name: MultiPL-HumanEval (Rust)
194
+ metrics:
195
+ - name: pass@1
196
+ type: pass@1
197
+ value: 0.2446
198
+ verified: false
199
+ - task:
200
+ type: text-generation
201
+ dataset:
202
+ type: nuprl/MultiPL-E
203
+ name: MultiPL-HumanEval (Scala)
204
+ metrics:
205
+ - name: pass@1
206
+ type: pass@1
207
+ value: 0.2879
208
+ verified: false
209
+ - task:
210
+ type: text-generation
211
+ dataset:
212
+ type: nuprl/MultiPL-E
213
+ name: MultiPL-HumanEval (Bash)
214
+ metrics:
215
+ - name: pass@1
216
+ type: pass@1
217
+ value: 0.1102
218
+ verified: false
219
+ - task:
220
+ type: text-generation
221
+ dataset:
222
+ type: nuprl/MultiPL-E
223
+ name: MultiPL-HumanEval (Swift)
224
+ metrics:
225
+ - name: pass@1
226
+ type: pass@1
227
+ value: 0.1674
228
+ verified: false
229
+ - task:
230
+ type: text-generation
231
+ dataset:
232
+ type: nuprl/MultiPL-E
233
+ name: MultiPL-HumanEval (TypeScript)
234
+ metrics:
235
+ - name: pass@1
236
+ type: pass@1
237
+ value: 0.3215
238
+ verified: false
239
+ extra_gated_prompt: >-
240
+ ## Model License Agreement
241
+
242
+ Please read the BigCode [OpenRAIL-M
243
+ license](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement)
244
+ agreement before accepting it.
245
+
246
+ extra_gated_fields:
247
+ I accept the above license agreement, and will use the Model complying with the set of use restrictions and sharing requirements: checkbox
248
  ---
249
+
250
+ # starcoderbase-GGML
251
+
252
+ This is GGML format quantised 4bit, 5bit and 8bit models of [StarCoderBase](https://huggingface.co/bigcode/starcoderbase).
253
+ This repo is the result of quantising to 4bit, 5bit and 8bit GGML for CPU inference using [ggml](https://github.com/ggerganov/ggml/tree/master/examples/starcoder).
254
+
255
+ # Original model card
256
+
257
+ ![banner](https://huggingface.co/datasets/bigcode/admin/resolve/main/StarCoderBanner.png)
258
+
259
+ Play with the model on the [StarCoder Playground](https://huggingface.co/spaces/bigcode/bigcode-playground).
260
+
261
+ ## Table of Contents
262
+
263
+ 1. [Model Summary](##model-summary)
264
+ 2. [Use](##use)
265
+ 3. [Limitations](##limitations)
266
+ 4. [Training](##training)
267
+ 5. [License](##license)
268
+ 6. [Citation](##citation)
269
+
270
+ ## Model Summary
271
+
272
+ The StarCoderBase models are 15.5B parameter models 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.
273
+
274
+ - **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
275
+ - **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
276
+ - **Paper:** [💫StarCoder: May the source be with you!](https://drive.google.com/file/d/1cN-b9GnWtHzQRoE7M7gAEyivY0kl4BYs/view)
277
+ - **Point of Contact:** [[email protected]](mailto:[email protected])
278
+ - **Languages:** 80+ Programming languages
279
+
280
+
281
+ ## Use
282
+
283
+ ### Intended use
284
+
285
+ 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.
286
+
287
+ **Feel free to share your generations in the Community tab!**
288
+
289
+ ### Generation
290
+ ```python
291
+ # pip install -q transformers
292
+ from transformers import AutoModelForCausalLM, AutoTokenizer
293
+
294
+ checkpoint = "bigcode/starcoderbase"
295
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
296
+
297
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
298
+ model = AutoModelForCausalLM.from_pretrained(checkpoint, trust_remote_code=True).to(device)
299
+
300
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
301
+ outputs = model.generate(inputs)
302
+ print(tokenizer.decode(outputs[0]))
303
+ ```
304
+
305
+ ### Fill-in-the-middle
306
+ Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
307
+
308
+ ```python
309
+ input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
310
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
311
+ outputs = model.generate(inputs)
312
+ print(tokenizer.decode(outputs[0]))
313
+ ```
314
+
315
+ ### Attribution & Other Requirements
316
+
317
+ 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.
318
+
319
+ # Limitations
320
+
321
+ The model has been trained on source code from 80+ programming languages. The predominant language in source is English although other languages are also present. As such the model is capable to generate 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.
322
+
323
+ # Training
324
+
325
+ ## Model
326
+
327
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
328
+ - **Pretraining steps:** 250k
329
+ - **Pretraining tokens:** 1 trillion
330
+ - **Precision:** bfloat16
331
+
332
+ ## Hardware
333
+
334
+ - **GPUs:** 512 Tesla A100
335
+ - **Training time:** 24 days
336
+
337
+ ## Software
338
+
339
+ - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
340
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
341
+ - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
342
+
343
+ # License
344
+ 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).
345
+ # Citation
346
+ ```
347
+ @article{li2023starcoder,
348
+ title={StarCoder: may the source be with you!},
349
+ 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},
350
+ year={2023},
351
+ eprint={2305.06161},
352
+ archivePrefix={arXiv},
353
+ primaryClass={cs.CL}
354
+ }
355
+ ```