Text Generation
Transformers
GGUF
code
Eval Results
Inference Endpoints
aashish1904 commited on
Commit
e0c0d24
1 Parent(s): 4bea0b0

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +240 -0
README.md ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+
4
+ pipeline_tag: text-generation
5
+ inference: true
6
+ widget:
7
+ - text: 'def print_hello_world():'
8
+ example_title: Hello world
9
+ group: Python
10
+ license: bigcode-openrail-m
11
+ datasets:
12
+ - bigcode/the-stack-dedup
13
+ metrics:
14
+ - code_eval
15
+ library_name: transformers
16
+ tags:
17
+ - code
18
+ model-index:
19
+ - name: StarCoder-7B
20
+ results:
21
+ - task:
22
+ type: text-generation
23
+ dataset:
24
+ type: openai_humaneval
25
+ name: HumanEval
26
+ metrics:
27
+ - name: pass@1
28
+ type: pass@1
29
+ value: 28.37
30
+ verified: false
31
+ - task:
32
+ type: text-generation
33
+ dataset:
34
+ type: nuprl/MultiPL-E
35
+ name: MultiPL-HumanEval (C++)
36
+ metrics:
37
+ - name: pass@1
38
+ type: pass@1
39
+ value: 23.3
40
+ verified: false
41
+ - task:
42
+ type: text-generation
43
+ dataset:
44
+ type: nuprl/MultiPL-E
45
+ name: MultiPL-HumanEval (Java)
46
+ metrics:
47
+ - name: pass@1
48
+ type: pass@1
49
+ value: 24.44
50
+ verified: false
51
+ - task:
52
+ type: text-generation
53
+ dataset:
54
+ type: nuprl/MultiPL-E
55
+ name: MultiPL-HumanEval (JavaScript)
56
+ metrics:
57
+ - name: pass@1
58
+ type: pass@1
59
+ value: 27.35
60
+ verified: false
61
+ - task:
62
+ type: text-generation
63
+ dataset:
64
+ type: nuprl/MultiPL-E
65
+ name: MultiPL-HumanEval (PHP)
66
+ metrics:
67
+ - name: pass@1
68
+ type: pass@1
69
+ value: 22.12
70
+ verified: false
71
+ - task:
72
+ type: text-generation
73
+ dataset:
74
+ type: nuprl/MultiPL-E
75
+ name: MultiPL-HumanEval (Lua)
76
+ metrics:
77
+ - name: pass@1
78
+ type: pass@1
79
+ value: 23.35
80
+ verified: false
81
+ - task:
82
+ type: text-generation
83
+ dataset:
84
+ type: nuprl/MultiPL-E
85
+ name: MultiPL-HumanEval (Rust)
86
+ metrics:
87
+ - name: pass@1
88
+ type: pass@1
89
+ value: 22.6
90
+ verified: false
91
+ - task:
92
+ type: text-generation
93
+ dataset:
94
+ type: nuprl/MultiPL-E
95
+ name: MultiPL-HumanEval (Swift)
96
+ metrics:
97
+ - name: pass@1
98
+ type: pass@1
99
+ value: 15.1
100
+ verified: false
101
+ - task:
102
+ type: text-generation
103
+ dataset:
104
+ type: nuprl/MultiPL-E
105
+ name: MultiPL-HumanEval (Julia)
106
+ metrics:
107
+ - name: pass@1
108
+ type: pass@1
109
+ value: 21.77
110
+ verified: false
111
+ - task:
112
+ type: text-generation
113
+ dataset:
114
+ type: nuprl/MultiPL-E
115
+ name: MultiPL-HumanEval (R)
116
+ metrics:
117
+ - name: pass@1
118
+ type: pass@1
119
+ value: 14.51
120
+ verified: false
121
+ extra_gated_prompt: >-
122
+ ## Model License Agreement
123
+
124
+ Please read the BigCode [OpenRAIL-M
125
+ license](https://huggingface.co/spaces/bigcode/bigcode-model-license-agreement)
126
+ agreement before accepting it.
127
+
128
+ extra_gated_fields:
129
+ I accept the above license agreement, and will use the Model complying with the set of use restrictions and sharing requirements: checkbox
130
+ duplicated_from: bigcode-data/starcoderbase-7b
131
+
132
+ ---
133
+
134
+ ![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ)
135
+
136
+ # QuantFactory/starcoderbase-7b-GGUF
137
+ This is quantized version of [bigcode/starcoderbase-7b](https://huggingface.co/bigcode/starcoderbase-7b) created using llama.cpp
138
+
139
+ # Original Model Card
140
+
141
+
142
+
143
+ # StarCoderBase-7B
144
+
145
+ 7B version of [StarCoderBase](https://huggingface.co/bigcode/starcoderbase).
146
+
147
+ ## Table of Contents
148
+
149
+ 1. [Model Summary](##model-summary)
150
+ 2. [Use](##use)
151
+ 3. [Limitations](##limitations)
152
+ 4. [Training](##training)
153
+ 5. [License](##license)
154
+ 6. [Citation](##citation)
155
+
156
+ ## Model Summary
157
+
158
+ StarCoderBase-7B is a 7B 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.
159
+
160
+ - **Repository:** [bigcode/Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
161
+ - **Project Website:** [bigcode-project.org](https://www.bigcode-project.org)
162
+ - **Paper:** [💫StarCoder: May the source be with you!](https://arxiv.org/abs/2305.06161)
163
+ - **Point of Contact:** [contact@bigcode-project.org](mailto:contact@bigcode-project.org)
164
+ - **Languages:** 80+ Programming languages
165
+
166
+
167
+ ## Use
168
+
169
+ ### Intended use
170
+
171
+ 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.
172
+
173
+ **Feel free to share your generations in the Community tab!**
174
+
175
+ ### Generation
176
+ ```python
177
+ # pip install -q transformers
178
+ from transformers import AutoModelForCausalLM, AutoTokenizer
179
+
180
+ checkpoint = "bigcode/starcoderbase-7b"
181
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
182
+
183
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
184
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
185
+
186
+ inputs = tokenizer.encode("def print_hello_world():", return_tensors="pt").to(device)
187
+ outputs = model.generate(inputs)
188
+ print(tokenizer.decode(outputs[0]))
189
+ ```
190
+
191
+ ### Fill-in-the-middle
192
+ Fill-in-the-middle uses special tokens to identify the prefix/middle/suffix part of the input and output:
193
+
194
+ ```python
195
+ input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
196
+ inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
197
+ outputs = model.generate(inputs)
198
+ print(tokenizer.decode(outputs[0]))
199
+ ```
200
+
201
+ ### Attribution & Other Requirements
202
+
203
+ 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.
204
+
205
+ # Limitations
206
+
207
+ 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.
208
+
209
+ # Training
210
+
211
+ ## Model
212
+
213
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
214
+ - **Pretraining steps:** 250k
215
+ - **Pretraining tokens:** 1 trillion
216
+ - **Precision:** bfloat16
217
+
218
+ ## Hardware
219
+
220
+ - **GPUs:** 512 Tesla A100
221
+
222
+ ## Software
223
+
224
+ - **Orchestration:** [Megatron-LM](https://github.com/bigcode-project/Megatron-LM)
225
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
226
+ - **BP16 if applicable:** [apex](https://github.com/NVIDIA/apex)
227
+
228
+ # License
229
+ 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).
230
+ # Citation
231
+ ```
232
+ @article{li2023starcoder,
233
+ title={StarCoder: may the source be with you!},
234
+ 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},
235
+ year={2023},
236
+ eprint={2305.06161},
237
+ archivePrefix={arXiv},
238
+ primaryClass={cs.CL}
239
+ }
240
+ ```