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
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
Octocoder - GGML
Description
This repo contains StarCoder GGML format model files for BigCode's 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.
- 2, 3, 4, 5, 6 and 8-bit GGML models for CPU+GPU inference
- BigCode's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions
Prompt template: QA
Question: {prompt}
Answer:
Compatibilty
These files are not compatible with llama.cpp, text-generation-webui or llama-cpp-python.
They can be used with:
- KoboldCpp, a powerful inference engine based on llama.cpp with full GPU acceleration and good UI.
- LM Studio, a fully featured local GUI for GGML inference on Windows and macOS.
- LoLLMs-WebUI a web UI which supports nearly every backend out there. Use ctransformers backend for support for this model.
- ctransformers: for use in Python code, including LangChain support.
- rustformers' llm
- The example
starcoder
binary provided with 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:
Provided files
Name | Quant method | Bits | Size | Max RAM required | Use case |
---|---|---|---|---|---|
octocoder.ggmlv1.q4_0.bin | q4_0 | 4 | 10.75 GB | 13.25 GB | 4-bit. |
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 | q5_0 | 5 | 13.09 GB | 15.59 GB | 5-bit. Higher accuracy, higher resource usage and slower inference. |
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 | 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.
Discord
For further support, and discussions on these models and AI in general, join us at:
Thanks, and how to contribute.
Thanks to the 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!
Original model card: BigCode's Octocoder
Table of Contents
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
- Paper: OctoPack: Instruction Tuning Code Large Language Models
- Languages: 80+ Programming languages
- OctoPack🐙🎒:
Data CommitPack 4TB of GitHub commits across 350 programming languages CommitPackFT Filtered version of CommitPack for high-quality commit messages that resemble instructions Model OctoCoder StarCoder (16B parameters) instruction tuned on CommitPackFT + OASST OctoGeeX CodeGeeX2 (6B parameters) instruction tuned on CommitPackFT + OASST Evaluation HumanEvalPack Extension of OpenAI's HumanEval to cover 3 scenarios across 6 languages
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
# 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
- Neural networks: PyTorch
Citation
@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}
}