Text Generation
Transformers
starcoder
code
Eval Results
TheBloke commited on
Commit
2d4a522
1 Parent(s): d41f7c6

Initial GGML model commit

Browse files
Files changed (1) hide show
  1. README.md +439 -0
README.md ADDED
@@ -0,0 +1,439 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - bigcode/commitpackft
4
+ - bigcode/oasst-octopack
5
+ inference: false
6
+ library_name: transformers
7
+ license: bigcode-openrail-m
8
+ metrics:
9
+ - code_eval
10
+ model-index:
11
+ - name: OctoCoder
12
+ results:
13
+ - dataset:
14
+ name: HumanEvalSynthesize Python
15
+ type: bigcode/humanevalpack
16
+ metrics:
17
+ - name: pass@1
18
+ type: pass@1
19
+ value: 46.2
20
+ verified: false
21
+ task:
22
+ type: text-generation
23
+ - dataset:
24
+ name: HumanEvalSynthesize JavaScript
25
+ type: bigcode/humanevalpack
26
+ metrics:
27
+ - name: pass@1
28
+ type: pass@1
29
+ value: 39.2
30
+ verified: false
31
+ task:
32
+ type: text-generation
33
+ - dataset:
34
+ name: HumanEvalSynthesize Java
35
+ type: bigcode/humanevalpack
36
+ metrics:
37
+ - name: pass@1
38
+ type: pass@1
39
+ value: 38.2
40
+ verified: false
41
+ task:
42
+ type: text-generation
43
+ - dataset:
44
+ name: HumanEvalSynthesize Go
45
+ type: bigcode/humanevalpack
46
+ metrics:
47
+ - name: pass@1
48
+ type: pass@1
49
+ value: 30.4
50
+ verified: false
51
+ task:
52
+ type: text-generation
53
+ - dataset:
54
+ name: HumanEvalSynthesize C++
55
+ type: bigcode/humanevalpack
56
+ metrics:
57
+ - name: pass@1
58
+ type: pass@1
59
+ value: 35.6
60
+ verified: false
61
+ task:
62
+ type: text-generation
63
+ - dataset:
64
+ name: HumanEvalSynthesize Rust
65
+ type: bigcode/humanevalpack
66
+ metrics:
67
+ - name: pass@1
68
+ type: pass@1
69
+ value: 23.4
70
+ verified: false
71
+ task:
72
+ type: text-generation
73
+ - dataset:
74
+ name: HumanEvalSynthesize Average
75
+ type: bigcode/humanevalpack
76
+ metrics:
77
+ - name: pass@1
78
+ type: pass@1
79
+ value: 35.5
80
+ verified: false
81
+ task:
82
+ type: text-generation
83
+ - dataset:
84
+ name: HumanEvalFix Python
85
+ type: bigcode/humanevalpack
86
+ metrics:
87
+ - name: pass@1
88
+ type: pass@1
89
+ value: 30.4
90
+ verified: false
91
+ task:
92
+ type: text-generation
93
+ - dataset:
94
+ name: HumanEvalFix JavaScript
95
+ type: bigcode/humanevalpack
96
+ metrics:
97
+ - name: pass@1
98
+ type: pass@1
99
+ value: 28.4
100
+ verified: false
101
+ task:
102
+ type: text-generation
103
+ - dataset:
104
+ name: HumanEvalFix Java
105
+ type: bigcode/humanevalpack
106
+ metrics:
107
+ - name: pass@1
108
+ type: pass@1
109
+ value: 30.6
110
+ verified: false
111
+ task:
112
+ type: text-generation
113
+ - dataset:
114
+ name: HumanEvalFix Go
115
+ type: bigcode/humanevalpack
116
+ metrics:
117
+ - name: pass@1
118
+ type: pass@1
119
+ value: 30.2
120
+ verified: false
121
+ task:
122
+ type: text-generation
123
+ - dataset:
124
+ name: HumanEvalFix C++
125
+ type: bigcode/humanevalpack
126
+ metrics:
127
+ - name: pass@1
128
+ type: pass@1
129
+ value: 26.1
130
+ verified: false
131
+ task:
132
+ type: text-generation
133
+ - dataset:
134
+ name: HumanEvalFix Rust
135
+ type: bigcode/humanevalpack
136
+ metrics:
137
+ - name: pass@1
138
+ type: pass@1
139
+ value: 16.5
140
+ verified: false
141
+ task:
142
+ type: text-generation
143
+ - dataset:
144
+ name: HumanEvalFix Average
145
+ type: bigcode/humanevalpack
146
+ metrics:
147
+ - name: pass@1
148
+ type: pass@1
149
+ value: 27.0
150
+ verified: false
151
+ task:
152
+ type: text-generation
153
+ - dataset:
154
+ name: HumanEvalExplain Python
155
+ type: bigcode/humanevalpack
156
+ metrics:
157
+ - name: pass@1
158
+ type: pass@1
159
+ value: 35.1
160
+ verified: false
161
+ task:
162
+ type: text-generation
163
+ - dataset:
164
+ name: HumanEvalExplain JavaScript
165
+ type: bigcode/humanevalpack
166
+ metrics:
167
+ - name: pass@1
168
+ type: pass@1
169
+ value: 24.5
170
+ verified: false
171
+ task:
172
+ type: text-generation
173
+ - dataset:
174
+ name: HumanEvalExplain Java
175
+ type: bigcode/humanevalpack
176
+ metrics:
177
+ - name: pass@1
178
+ type: pass@1
179
+ value: 27.3
180
+ verified: false
181
+ task:
182
+ type: text-generation
183
+ - dataset:
184
+ name: HumanEvalExplain Go
185
+ type: bigcode/humanevalpack
186
+ metrics:
187
+ - name: pass@1
188
+ type: pass@1
189
+ value: 21.1
190
+ verified: false
191
+ task:
192
+ type: text-generation
193
+ - dataset:
194
+ name: HumanEvalExplain C++
195
+ type: bigcode/humanevalpack
196
+ metrics:
197
+ - name: pass@1
198
+ type: pass@1
199
+ value: 24.1
200
+ verified: false
201
+ task:
202
+ type: text-generation
203
+ - dataset:
204
+ name: HumanEvalExplain Rust
205
+ type: bigcode/humanevalpack
206
+ metrics:
207
+ - name: pass@1
208
+ type: pass@1
209
+ value: 14.8
210
+ verified: false
211
+ task:
212
+ type: text-generation
213
+ - dataset:
214
+ name: HumanEvalExplain Average
215
+ type: bigcode/humanevalpack
216
+ metrics:
217
+ - name: pass@1
218
+ type: pass@1
219
+ value: 24.5
220
+ verified: false
221
+ task:
222
+ type: text-generation
223
+ model_creator: BigCode
224
+ model_link: https://huggingface.co/bigcode/octocoder
225
+ model_name: Octocoder
226
+ model_type: starcoder
227
+ pipeline_tag: text-generation
228
+ quantized_by: TheBloke
229
+ tags:
230
+ - code
231
+ widget:
232
+ - example_title: Bubble sort
233
+ group: Python
234
+ text: 'Question: Please write a function in Python that performs bubble sort.\n\nAnswer:'
235
+ ---
236
+
237
+ <!-- header start -->
238
+ <div style="width: 100%;">
239
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
240
+ </div>
241
+ <div style="display: flex; justify-content: space-between; width: 100%;">
242
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
243
+ <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
244
+ </div>
245
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
246
+ <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
247
+ </div>
248
+ </div>
249
+ <!-- header end -->
250
+
251
+ # Octocoder - GGML
252
+ - Model creator: [BigCode](https://huggingface.co/bigcode)
253
+ - Original model: [Octocoder](https://huggingface.co/bigcode/octocoder)
254
+
255
+ ## Description
256
+
257
+ This repo contains StarCoder GGML format model files for [BigCode's Octocoder](https://huggingface.co/bigcode/octocoder).
258
+
259
+ Please note that these GGMLs are **not compatible with llama.cpp, text-generation-webui or llama-cpp-python**. Please see below for a list of tools that work with this GGML model.
260
+
261
+ ## Repositories available
262
+
263
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Octocoder-GPTQ)
264
+ * [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Octocoder-GGML)
265
+ * [BigCode's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bigcode/octocoder)
266
+
267
+ ## Prompt template: QA
268
+
269
+ ```
270
+ Question: {prompt}
271
+ Answer:
272
+ ```
273
+
274
+ <!-- compatibility_ggml start -->
275
+ ## Compatibilty
276
+
277
+ These files are **not** compatible with llama.cpp, text-generation-webui or llama-cpp-python.
278
+
279
+ They can be used with:
280
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a powerful inference engine based on llama.cpp with full GPU acceleration and good UI.
281
+ * [LM Studio](https://lmstudio.ai/), a fully featured local GUI for GGML inference on Windows and macOS.
282
+ * [LoLLMs-WebUI](https://github.com/ParisNeo/LoLLMs-WebUI) a web UI which supports nearly every backend out there. Use ctransformers backend for support for this model.
283
+ * [ctransformers](https://github.com/marella/ctransformers): for use in Python code, including LangChain support.
284
+ * [rustformers' llm](https://github.com/rustformers/llm)
285
+ * The example `starcoder` binary provided with [ggml](https://github.com/ggerganov/ggml)
286
+
287
+ 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!)
288
+
289
+ ## Tutorial for using LoLLMs-WebUI:
290
+
291
+ * [Video tutorial, by LoLLMs-WebUI's author **ParisNeo**](https://youtu.be/vBU1b5n0GMU)
292
+ <!-- compatibility_ggml end -->
293
+
294
+ ## Provided files
295
+ | Name | Quant method | Bits | Size | Max RAM required | Use case |
296
+ | ---- | ---- | ---- | ---- | ---- | ----- |
297
+ | [octocoder.ggmlv1.q4_0.bin](https://huggingface.co/TheBloke/Octocoder-GGML/blob/main/octocoder.ggmlv1.q4_0.bin) | q4_0 | 4 | 10.75 GB| 13.25 GB | 4-bit. |
298
+ | [octocoder.ggmlv1.q4_1.bin](https://huggingface.co/TheBloke/Octocoder-GGML/blob/main/octocoder.ggmlv1.q4_1.bin) | q4_1 | 4 | 11.92 GB| 14.42 GB | 4-bit. Higher accuracy than q4_0 but not as high as q5_0. However has quicker inference than q5 models. |
299
+ | [octocoder.ggmlv1.q5_0.bin](https://huggingface.co/TheBloke/Octocoder-GGML/blob/main/octocoder.ggmlv1.q5_0.bin) | q5_0 | 5 | 13.09 GB| 15.59 GB | 5-bit. Higher accuracy, higher resource usage and slower inference. |
300
+ | [octocoder.ggmlv1.q5_1.bin](https://huggingface.co/TheBloke/Octocoder-GGML/blob/main/octocoder.ggmlv1.q5_1.bin) | q5_1 | 5 | 14.26 GB| 16.76 GB | 5-bit. Even higher accuracy, resource usage and slower inference. |
301
+ | [octocoder.ggmlv1.q8_0.bin](https://huggingface.co/TheBloke/Octocoder-GGML/blob/main/octocoder.ggmlv1.q8_0.bin) | q8_0 | 8 | 20.11 GB| 22.61 GB | 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users. |
302
+
303
+ **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.
304
+
305
+ <!-- footer start -->
306
+ ## Discord
307
+
308
+ For further support, and discussions on these models and AI in general, join us at:
309
+
310
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
311
+
312
+ ## Thanks, and how to contribute.
313
+
314
+ Thanks to the [chirper.ai](https://chirper.ai) team!
315
+
316
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
317
+
318
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
319
+
320
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
321
+
322
+ * Patreon: https://patreon.com/TheBlokeAI
323
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
324
+
325
+ **Special thanks to**: Aemon Algiz.
326
+
327
+ **Patreon special mentions**: Ajan Kanaga, David Ziegler, Raymond Fosdick, SuperWojo, Sam, webtim, Steven Wood, knownsqashed, Tony Hughes, Junyu Yang, J, Olakabola, Dan Guido, Stephen Murray, John Villwock, vamX, William Sang, Sean Connelly, LangChain4j, Olusegun Samson, Fen Risland, Derek Yates, Karl Bernard, transmissions 11, Trenton Dambrowitz, Pieter, Preetika Verma, Swaroop Kallakuri, Andrey, Slarti, Jonathan Leane, Michael Levine, Kalila, Joseph William Delisle, Rishabh Srivastava, Deo Leter, Luke Pendergrass, Spencer Kim, Geoffrey Montalvo, Thomas Belote, Jeffrey Morgan, Mandus, ya boyyy, Matthew Berman, Magnesian, Ai Maven, senxiiz, Alps Aficionado, Luke @flexchar, Raven Klaugh, Imad Khwaja, Gabriel Puliatti, Johann-Peter Hartmann, usrbinkat, Spiking Neurons AB, Artur Olbinski, chris gileta, danny, Willem Michiel, WelcomeToTheClub, Deep Realms, alfie_i, Dave, Leonard Tan, NimbleBox.ai, Randy H, Daniel P. Andersen, Pyrater, Will Dee, Elle, Space Cruiser, Gabriel Tamborski, Asp the Wyvern, Illia Dulskyi, Nikolai Manek, Sid, Brandon Frisco, Nathan LeClaire, Edmond Seymore, Enrico Ros, Pedro Madruga, Eugene Pentland, John Detwiler, Mano Prime, Stanislav Ovsiannikov, Alex, Vitor Caleffi, K, biorpg, Michael Davis, Lone Striker, Pierre Kircher, theTransient, Fred von Graf, Sebastain Graf, Vadim, Iucharbius, Clay Pascal, Chadd, Mesiah Bishop, terasurfer, Rainer Wilmers, Alexandros Triantafyllidis, Stefan Sabev, Talal Aujan, Cory Kujawski, Viktor Bowallius, subjectnull, ReadyPlayerEmma, zynix
328
+
329
+
330
+ Thank you to all my generous patrons and donaters!
331
+
332
+ <!-- footer end -->
333
+
334
+ # Original model card: BigCode's Octocoder
335
+
336
+
337
+ ![Octopack](https://github.com/bigcode-project/octopack/blob/31f3320f098703c7910e43492c39366eeea68d83/banner.png?raw=true)
338
+
339
+ # Table of Contents
340
+
341
+ 1. [Model Summary](#model-summary)
342
+ 2. [Use](#use)
343
+ 3. [Training](#training)
344
+ 4. [Citation](#citation)
345
+
346
+ # Model Summary
347
+
348
+ > OctoCoder is an instruction tuned model with 15.5B parameters created by finetuning StarCoder on CommitPackFT & OASST as described in the OctoPack paper.
349
+
350
+ - **Repository:** [bigcode-project/octopack](https://github.com/bigcode-project/octopack)
351
+ - **Paper:** [OctoPack: Instruction Tuning Code Large Language Models](https://arxiv.org/abs/2308.07124)
352
+ - **Languages:** 80+ Programming languages
353
+ - **OctoPack🐙🎒:**
354
+ <table>
355
+ <tr>
356
+ <th>Data</t>
357
+ <th><a href=https://huggingface.co/datasets/bigcode/commitpack>CommitPack</a></th>
358
+ <td>4TB of GitHub commits across 350 programming languages</td>
359
+ </tr>
360
+ <tr>
361
+ <th></t>
362
+ <th><a href=https://huggingface.co/datasets/bigcode/commitpackft>CommitPackFT</a></th>
363
+ <td>Filtered version of CommitPack for high-quality commit messages that resemble instructions</td>
364
+ </tr>
365
+ <tr>
366
+ <th>Model</t>
367
+ <th><a href=https://huggingface.co/bigcode/octocoder>OctoCoder</a></th>
368
+ <td>StarCoder (16B parameters) instruction tuned on CommitPackFT + OASST</td>
369
+ </tr>
370
+ <tr>
371
+ <th></t>
372
+ <th><a href=https://huggingface.co/bigcode/octogeex>OctoGeeX</a></th>
373
+ <td>CodeGeeX2 (6B parameters) instruction tuned on CommitPackFT + OASST</td>
374
+ </tr>
375
+ <tr>
376
+ <th>Evaluation&nbsp;&nbsp;</t>
377
+ <th><a href=https://huggingface.co/datasets/bigcode/humanevalpack>HumanEvalPack</a></th>
378
+ <td>Extension of OpenAI's HumanEval to cover 3 scenarios across 6 languages</td>
379
+ </tr>
380
+ </table>
381
+
382
+
383
+ # Use
384
+
385
+ ## Intended use
386
+
387
+ The model follows instructions provided in the input. We recommend prefacing your input with "Question: " and finishing with "Answer:", for example: "Question: Please write a function in Python that performs bubble sort.\n\nAnswer:"
388
+
389
+ **Feel free to share your generations in the Community tab!**
390
+
391
+ ## Generation
392
+ ```python
393
+ # pip install -q transformers
394
+ from transformers import AutoModelForCausalLM, AutoTokenizer
395
+
396
+ checkpoint = "bigcode/octocoder"
397
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
398
+
399
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
400
+ model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
401
+
402
+ inputs = tokenizer.encode("Question: Please write a function in Python that performs bubble sort.\n\nAnswer:", return_tensors="pt").to(device)
403
+ outputs = model.generate(inputs)
404
+ print(tokenizer.decode(outputs[0]))
405
+ ```
406
+
407
+ # Training
408
+
409
+ ## Model
410
+
411
+ - **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
412
+ - **Steps:** 250k pretraining & 30 instruction tuning
413
+ - **Pretraining tokens:** 1 trillion pretraining & 2M instruction tuning
414
+ - **Precision:** bfloat16
415
+
416
+ ## Hardware
417
+
418
+ - **Pretraining:**
419
+ - **GPUs:** 512 Tesla A100
420
+ - **Training time:** 24 days
421
+ - **Instruction tuning:**
422
+ - **GPUs:** 8 Tesla A100
423
+ - **Training time:** 4 hours
424
+
425
+ ## Software
426
+
427
+ - **Orchestration:** [Megatron-LM/Transformers](https://github.com/bigcode-project/octopack#training)
428
+ - **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)
429
+
430
+ # Citation
431
+
432
+ ```bibtex
433
+ @article{muennighoff2023octopack,
434
+ title={OctoPack: Instruction Tuning Code Large Language Models},
435
+ author={Niklas Muennighoff and Qian Liu and Armel Zebaze and Qinkai Zheng and Binyuan Hui and Terry Yue Zhuo and Swayam Singh and Xiangru Tang and Leandro von Werra and Shayne Longpre},
436
+ journal={arXiv preprint arXiv:2308.07124},
437
+ year={2023}
438
+ }
439
+ ```