TheBloke commited on
Commit
43cbb91
1 Parent(s): 008efa3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +352 -2
README.md CHANGED
@@ -1,6 +1,256 @@
1
  ---
2
  inference: false
3
- license: other
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
5
 
6
  <!-- header start -->
@@ -145,4 +395,104 @@ Thank you to all my generous patrons and donaters!
145
 
146
  # Original model card: Bigcode's Starcoder
147
 
148
- No original model card was provided.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  inference: false
3
+ pipeline_tag: text-generation
4
+ license: bigcode-openrail-m
5
+ datasets:
6
+ - bigcode/the-stack-dedup
7
+ metrics:
8
+ - code_eval
9
+ library_name: transformers
10
+ tags:
11
+ - code
12
+ model-index:
13
+ - name: StarCoder
14
+ results:
15
+ - task:
16
+ type: text-generation
17
+ dataset:
18
+ type: openai_humaneval
19
+ name: HumanEval (Prompted)
20
+ metrics:
21
+ - name: pass@1
22
+ type: pass@1
23
+ value: 0.408
24
+ verified: false
25
+ - task:
26
+ type: text-generation
27
+ dataset:
28
+ type: openai_humaneval
29
+ name: HumanEval
30
+ metrics:
31
+ - name: pass@1
32
+ type: pass@1
33
+ value: 0.336
34
+ verified: false
35
+ - task:
36
+ type: text-generation
37
+ dataset:
38
+ type: mbpp
39
+ name: MBPP
40
+ metrics:
41
+ - name: pass@1
42
+ type: pass@1
43
+ value: 0.527
44
+ verified: false
45
+ - task:
46
+ type: text-generation
47
+ dataset:
48
+ type: ds1000
49
+ name: DS-1000 (Overall Completion)
50
+ metrics:
51
+ - name: pass@1
52
+ type: pass@1
53
+ value: 0.26
54
+ verified: false
55
+ - task:
56
+ type: text-generation
57
+ dataset:
58
+ type: nuprl/MultiPL-E
59
+ name: MultiPL-HumanEval (C++)
60
+ metrics:
61
+ - name: pass@1
62
+ type: pass@1
63
+ value: 0.3155
64
+ verified: false
65
+ - task:
66
+ type: text-generation
67
+ dataset:
68
+ type: nuprl/MultiPL-E
69
+ name: MultiPL-HumanEval (C#)
70
+ metrics:
71
+ - name: pass@1
72
+ type: pass@1
73
+ value: 0.2101
74
+ verified: false
75
+ - task:
76
+ type: text-generation
77
+ dataset:
78
+ type: nuprl/MultiPL-E
79
+ name: MultiPL-HumanEval (D)
80
+ metrics:
81
+ - name: pass@1
82
+ type: pass@1
83
+ value: 0.1357
84
+ verified: false
85
+ - task:
86
+ type: text-generation
87
+ dataset:
88
+ type: nuprl/MultiPL-E
89
+ name: MultiPL-HumanEval (Go)
90
+ metrics:
91
+ - name: pass@1
92
+ type: pass@1
93
+ value: 0.1761
94
+ verified: false
95
+ - task:
96
+ type: text-generation
97
+ dataset:
98
+ type: nuprl/MultiPL-E
99
+ name: MultiPL-HumanEval (Java)
100
+ metrics:
101
+ - name: pass@1
102
+ type: pass@1
103
+ value: 0.3022
104
+ verified: false
105
+ - task:
106
+ type: text-generation
107
+ dataset:
108
+ type: nuprl/MultiPL-E
109
+ name: MultiPL-HumanEval (Julia)
110
+ metrics:
111
+ - name: pass@1
112
+ type: pass@1
113
+ value: 0.2302
114
+ verified: false
115
+ - task:
116
+ type: text-generation
117
+ dataset:
118
+ type: nuprl/MultiPL-E
119
+ name: MultiPL-HumanEval (JavaScript)
120
+ metrics:
121
+ - name: pass@1
122
+ type: pass@1
123
+ value: 0.3079
124
+ verified: false
125
+ - task:
126
+ type: text-generation
127
+ dataset:
128
+ type: nuprl/MultiPL-E
129
+ name: MultiPL-HumanEval (Lua)
130
+ metrics:
131
+ - name: pass@1
132
+ type: pass@1
133
+ value: 0.2389
134
+ verified: false
135
+ - task:
136
+ type: text-generation
137
+ dataset:
138
+ type: nuprl/MultiPL-E
139
+ name: MultiPL-HumanEval (PHP)
140
+ metrics:
141
+ - name: pass@1
142
+ type: pass@1
143
+ value: 0.2608
144
+ verified: false
145
+ - task:
146
+ type: text-generation
147
+ dataset:
148
+ type: nuprl/MultiPL-E
149
+ name: MultiPL-HumanEval (Perl)
150
+ metrics:
151
+ - name: pass@1
152
+ type: pass@1
153
+ value: 0.1734
154
+ verified: false
155
+ - task:
156
+ type: text-generation
157
+ dataset:
158
+ type: nuprl/MultiPL-E
159
+ name: MultiPL-HumanEval (Python)
160
+ metrics:
161
+ - name: pass@1
162
+ type: pass@1
163
+ value: 0.3357
164
+ verified: false
165
+ - task:
166
+ type: text-generation
167
+ dataset:
168
+ type: nuprl/MultiPL-E
169
+ name: MultiPL-HumanEval (R)
170
+ metrics:
171
+ - name: pass@1
172
+ type: pass@1
173
+ value: 0.155
174
+ verified: false
175
+ - task:
176
+ type: text-generation
177
+ dataset:
178
+ type: nuprl/MultiPL-E
179
+ name: MultiPL-HumanEval (Ruby)
180
+ metrics:
181
+ - name: pass@1
182
+ type: pass@1
183
+ value: 0.0124
184
+ verified: false
185
+ - task:
186
+ type: text-generation
187
+ dataset:
188
+ type: nuprl/MultiPL-E
189
+ name: MultiPL-HumanEval (Racket)
190
+ metrics:
191
+ - name: pass@1
192
+ type: pass@1
193
+ value: 0.0007
194
+ verified: false
195
+ - task:
196
+ type: text-generation
197
+ dataset:
198
+ type: nuprl/MultiPL-E
199
+ name: MultiPL-HumanEval (Rust)
200
+ metrics:
201
+ - name: pass@1
202
+ type: pass@1
203
+ value: 0.2184
204
+ verified: false
205
+ - task:
206
+ type: text-generation
207
+ dataset:
208
+ type: nuprl/MultiPL-E
209
+ name: MultiPL-HumanEval (Scala)
210
+ metrics:
211
+ - name: pass@1
212
+ type: pass@1
213
+ value: 0.2761
214
+ verified: false
215
+ - task:
216
+ type: text-generation
217
+ dataset:
218
+ type: nuprl/MultiPL-E
219
+ name: MultiPL-HumanEval (Bash)
220
+ metrics:
221
+ - name: pass@1
222
+ type: pass@1
223
+ value: 0.1046
224
+ verified: false
225
+ - task:
226
+ type: text-generation
227
+ dataset:
228
+ type: nuprl/MultiPL-E
229
+ name: MultiPL-HumanEval (Swift)
230
+ metrics:
231
+ - name: pass@1
232
+ type: pass@1
233
+ value: 0.2274
234
+ verified: false
235
+ - task:
236
+ type: text-generation
237
+ dataset:
238
+ type: nuprl/MultiPL-E
239
+ name: MultiPL-HumanEval (TypeScript)
240
+ metrics:
241
+ - name: pass@1
242
+ type: pass@1
243
+ value: 0.3229
244
+ verified: false
245
+ extra_gated_prompt: >-
246
+ ## Model License Agreement
247
+
248
+ Please read the BigCode [OpenRAIL-M
249
+ license](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement)
250
+ agreement before accepting it.
251
+
252
+ extra_gated_fields:
253
+ I accept the above license agreement, and will use the Model complying with the set of use restrictions and sharing requirements: checkbox
254
  ---
255
 
256
  <!-- header start -->
 
395
 
396
  # Original model card: Bigcode's Starcoder
397
 
398
+ # StarCoder
399
+
400
+ ![banner](https://huggingface.co/datasets/bigcode/admin/resolve/main/StarCoderBanner.png)
401
+
402
+ Play with the model on the [StarCoder Playground](https://huggingface.co/spaces/bigcode/bigcode-playground).
403
+
404
+ ## Table of Contents
405
+
406
+ 1. [Model Summary](##model-summary)
407
+ 2. [Use](##use)
408
+ 3. [Limitations](##limitations)
409
+ 4. [Training](##training)
410
+ 5. [License](##license)
411
+ 6. [Citation](##citation)
412
+
413
+ ## Model Summary
414
+
415
+ The StarCoder 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.
416
+
417
+ - **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
418
+ - **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
419
+ - **Paper:** [💫StarCoder: May the source be with you!](https://arxiv.org/abs/2305.06161)
420
+ - **Point of Contact:** [contact@bigcode-project.org](mailto:contact@bigcode-project.org)
421
+ - **Languages:** 80+ Programming languages
422
+
423
+
424
+ ## Use
425
+
426
+ ### Intended use
427
+
428
+ 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.
429
+
430
+ **Feel free to share your generations in the Community tab!**
431
+
432
+ ### Generation
433
+ ```python
434
+ # pip install -q transformers
435
+ from transformers import AutoModelForCausalLM, AutoTokenizer
436
+
437
+ checkpoint = "bigcode/starcoder"
438
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
439
+
440
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
441
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
442
+
443
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
444
+ outputs = model.generate(inputs)
445
+ print(tokenizer.decode(outputs[0]))
446
+ ```
447
+
448
+ ### Fill-in-the-middle
449
+ Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
450
+
451
+ ```python
452
+ input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
453
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
454
+ outputs = model.generate(inputs)
455
+ print(tokenizer.decode(outputs[0]))
456
+ ```
457
+
458
+ ### Attribution & Other Requirements
459
+
460
+ 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.
461
+
462
+ # Limitations
463
+
464
+ 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.
465
+
466
+ # Training
467
+
468
+ ## Model
469
+
470
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
471
+ - **Pretraining steps:** 250k
472
+ - **Pretraining tokens:** 1 trillion
473
+ - **Precision:** bfloat16
474
+
475
+ ## Hardware
476
+
477
+ - **GPUs:** 512 Tesla A100
478
+ - **Training time:** 24 days
479
+
480
+ ## Software
481
+
482
+ - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
483
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
484
+ - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
485
+
486
+ # License
487
+ 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).
488
+ # Citation
489
+ ```
490
+ @article{li2023starcoder,
491
+ title={StarCoder: may the source be with you!},
492
+ 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},
493
+ year={2023},
494
+ eprint={2305.06161},
495
+ archivePrefix={arXiv},
496
+ primaryClass={cs.CL}
497
+ }
498
+ ```