Text Generation
Transformers
starcoder
code
Eval Results
File size: 12,550 Bytes
2d4a522
18a28ec
 
 
 
2d4a522
 
 
 
 
18a28ec
 
 
 
 
 
 
 
 
 
 
2d4a522
 
 
18a28ec
 
 
2d4a522
 
 
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
18a28ec
2d4a522
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
---
license: bigcode-openrail-m
library_name: transformers
tags:
- code
datasets:
- bigcode/commitpackft
- bigcode/oasst-octopack
metrics:
- code_eval
inference: false
model_creator: BigCode
model_link: https://huggingface.co/bigcode/octocoder
model_type: starcoder
pipeline_tag: text-generation
quantized_by: TheBloke
widget:
- example_title: Bubble sort
  group: Python
  text: 'Question: Please write a function in Python that performs bubble sort.\n\nAnswer:'
base_model: bigcode/octocoder
model-index:
- name: OctoCoder
  results:
  - task:
      type: text-generation
    dataset:
      name: HumanEvalSynthesize Python
      type: bigcode/humanevalpack
    metrics:
    - type: pass@1
      value: 46.2
      name: pass@1
      verified: false
    - type: pass@1
      value: 39.2
      name: pass@1
      verified: false
    - type: pass@1
      value: 38.2
      name: pass@1
      verified: false
    - type: pass@1
      value: 30.4
      name: pass@1
      verified: false
    - type: pass@1
      value: 35.6
      name: pass@1
      verified: false
    - type: pass@1
      value: 23.4
      name: pass@1
      verified: false
    - type: pass@1
      value: 35.5
      name: pass@1
      verified: false
    - type: pass@1
      value: 30.4
      name: pass@1
      verified: false
    - type: pass@1
      value: 28.4
      name: pass@1
      verified: false
    - type: pass@1
      value: 30.6
      name: pass@1
      verified: false
    - type: pass@1
      value: 30.2
      name: pass@1
      verified: false
    - type: pass@1
      value: 26.1
      name: pass@1
      verified: false
    - type: pass@1
      value: 16.5
      name: pass@1
      verified: false
    - type: pass@1
      value: 27.0
      name: pass@1
      verified: false
    - type: pass@1
      value: 35.1
      name: pass@1
      verified: false
    - type: pass@1
      value: 24.5
      name: pass@1
      verified: false
    - type: pass@1
      value: 27.3
      name: pass@1
      verified: false
    - type: pass@1
      value: 21.1
      name: pass@1
      verified: false
    - type: pass@1
      value: 24.1
      name: pass@1
      verified: false
    - type: pass@1
      value: 14.8
      name: pass@1
      verified: false
    - type: pass@1
      value: 24.5
      name: pass@1
      verified: false
---

<!-- header start -->
<div style="width: 100%;">
    <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
</div>
<div style="display: flex; justify-content: space-between; width: 100%;">
    <div style="display: flex; flex-direction: column; align-items: flex-start;">
        <p><a href="https://discord.gg/theblokeai">Chat & support: my new Discord server</a></p>
    </div>
    <div style="display: flex; flex-direction: column; align-items: flex-end;">
        <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
    </div>
</div>
<!-- header end -->

# Octocoder - GGML
- Model creator: [BigCode](https://huggingface.co/bigcode)
- Original model: [Octocoder](https://huggingface.co/bigcode/octocoder)

## Description

This repo contains StarCoder GGML format model files for [BigCode's Octocoder](https://huggingface.co/bigcode/octocoder).

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.

## Repositories available

* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Octocoder-GPTQ)
* [2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/Octocoder-GGML)
* [BigCode's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/bigcode/octocoder)

## Prompt template: QA

```
Question: {prompt}
Answer:
```

<!-- compatibility_ggml start -->
## Compatibilty

These files are **not** compatible with llama.cpp, text-generation-webui or llama-cpp-python.

They can be used with:
* [KoboldCpp](https://github.com/LostRuins/koboldcpp), a powerful inference engine based on llama.cpp with full GPU acceleration and good UI.
* [LM Studio](https://lmstudio.ai/), a fully featured local GUI for GGML inference on Windows and macOS.
* [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.
* [ctransformers](https://github.com/marella/ctransformers): for use in Python code, including LangChain support.
* [rustformers' llm](https://github.com/rustformers/llm)
* The example `starcoder` binary provided with [ggml](https://github.com/ggerganov/ggml)

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!)

## Tutorial for using LoLLMs-WebUI:

* [Video tutorial, by LoLLMs-WebUI's author **ParisNeo**](https://youtu.be/vBU1b5n0GMU)
<!-- compatibility_ggml end -->

## Provided files
| Name | Quant method | Bits | Size | Max RAM required | Use case |
| ---- | ---- | ---- | ---- | ---- | ----- |
| [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. |
| [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. |
| [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. |
| [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. |
| [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. |

**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.

<!-- footer start -->
## Discord

For further support, and discussions on these models and AI in general, join us at:

[TheBloke AI's Discord server](https://discord.gg/theblokeai)

## Thanks, and how to contribute.

Thanks to the [chirper.ai](https://chirper.ai) team!

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.

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.

Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.

* Patreon: https://patreon.com/TheBlokeAI
* Ko-Fi: https://ko-fi.com/TheBlokeAI

**Special thanks to**: Aemon Algiz.

**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


Thank you to all my generous patrons and donaters!

<!-- footer end -->

# Original model card: BigCode's Octocoder


![Octopack](https://github.com/bigcode-project/octopack/blob/31f3320f098703c7910e43492c39366eeea68d83/banner.png?raw=true)

# Table of Contents

1. [Model Summary](#model-summary)
2. [Use](#use)
3. [Training](#training)
4. [Citation](#citation)

# Model Summary

> OctoCoder is an instruction tuned model with 15.5B parameters created by finetuning StarCoder on CommitPackFT & OASST as described in the OctoPack paper.

- **Repository:** [bigcode-project/octopack](https://github.com/bigcode-project/octopack)
- **Paper:** [OctoPack: Instruction Tuning Code Large Language Models](https://arxiv.org/abs/2308.07124)
- **Languages:** 80+ Programming languages
- **OctoPack🐙🎒:**
<table>
<tr>
<th>Data</t> 
<th><a href=https://huggingface.co/datasets/bigcode/commitpack>CommitPack</a></th>
<td>4TB of GitHub commits across 350 programming languages</td>
</tr>
<tr>
<th></t> 
<th><a href=https://huggingface.co/datasets/bigcode/commitpackft>CommitPackFT</a></th>
<td>Filtered version of CommitPack for high-quality commit messages that resemble instructions</td>
</tr>
<tr>
<th>Model</t> 
<th><a href=https://huggingface.co/bigcode/octocoder>OctoCoder</a></th>
<td>StarCoder (16B parameters) instruction tuned on CommitPackFT + OASST</td>
</tr>
<tr>
<th></t> 
<th><a href=https://huggingface.co/bigcode/octogeex>OctoGeeX</a></th>
<td>CodeGeeX2 (6B parameters) instruction tuned on CommitPackFT + OASST</td>
</tr>
<tr>
<th>Evaluation&nbsp;&nbsp;</t> 
<th><a href=https://huggingface.co/datasets/bigcode/humanevalpack>HumanEvalPack</a></th>
<td>Extension of OpenAI's HumanEval to cover 3 scenarios across 6 languages</td>
</tr>
</table>


# Use

## Intended use

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:"

**Feel free to share your generations in the Community tab!**

## Generation
```python
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer

checkpoint = "bigcode/octocoder"
device = "cuda" # for GPU usage or "cpu" for CPU usage

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)

inputs = tokenizer.encode("Question: Please write a function in Python that performs bubble sort.\n\nAnswer:", return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
```

# Training

## Model

- **Architecture:** GPT-2 model with multi-query attention and Fill-in-the-Middle objective
- **Steps:** 250k pretraining & 30 instruction tuning
- **Pretraining tokens:** 1 trillion pretraining & 2M instruction tuning
- **Precision:** bfloat16

## Hardware

- **Pretraining:**
  - **GPUs:** 512 Tesla A100
  - **Training time:** 24 days
- **Instruction tuning:**
  - **GPUs:** 8 Tesla A100
  - **Training time:** 4 hours

## Software

- **Orchestration:** [Megatron-LM/Transformers](https://github.com/bigcode-project/octopack#training)
- **Neural networks:** [PyTorch](https://github.com/pytorch/pytorch)

# Citation

```bibtex
@article{muennighoff2023octopack,
      title={OctoPack: Instruction Tuning Code Large Language Models}, 
      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},
      journal={arXiv preprint arXiv:2308.07124},
      year={2023}
}
```