|
--- |
|
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 </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} |
|
} |
|
``` |
|
|