Run this model with HF Jobs
Run bigcode/octocoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/bigcode/octocoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/bigcode/octocoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/bigcode/octocoder. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/bigcode/octocoder. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use bigcode/octocoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigcode/octocoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bigcode/octocoder")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigcode/octocoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bigcode/octocoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bigcode/octocoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigcode/octocoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bigcode/octocoder
- SGLang
How to use bigcode/octocoder with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bigcode/octocoder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigcode/octocoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bigcode/octocoder" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigcode/octocoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bigcode/octocoder with Docker Model Runner:
docker model run hf.co/bigcode/octocoder
Added Table 2
#1
by rootacess - opened
43 unmodified lines44454647484943 unmodified lines# OctoCoderPlay with the model on the [TODO Playground](https://huggingface.co/spaces/bigcode/bigcode-playground).## Table of Contents43 unmodified lines444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137243 unmodified lines# OctoCoderPlay with the model on the [TODO Playground](https://huggingface.co/spaces/bigcode/bigcode-playground).<style>table{border-collapse: collapse;}</style><table><tr><th>Model (↓)</th><th>Python</th><th>JavaScript</th><th>Java</th><th>Go</th><th>C++</th><th>Rust</th><th>Avg.</th></tr></table><hr style="background-color: black;"><center><strong>HumanEvalFix</strong></center><hr style="background-color: black;"><center>Non-permissive models</center><hr style="background-color: black;"><table><tr><td>WizardCoder</td><td>31.8</td><td>29.5</td><td>12.7</td><td>30.4</td><td>18.7</td><td>13.0</td><td>22.7</td></tr><tr><td>GPT-4</td><td>47.0 </td><td>48.2</td><td>50.0</td><td>50.6</td><td>47.6</td><td>43.3</td><td><u>47.8</u></td></tr></table><hr style="background-color: black;"><center>Permissive models</center><hr style="background-color: black;"><table><tr><td>InstructCodeT5+<sup>‡</sup></td><td>2.7</td><td>1.2</td><td>4.3</td><td>2.1</td><td>0.2</td><td>0.5</td><td>1.8</td></tr><tr><td>BLOOMZ<sup>+</sup></td><td>16.6</td><td>15.5</td><td>15.2</td><td>16.4</td><td>6.7</td><td>5.7</td><td>12.5</td></tr><tr><td>StarChat-β</td><td>18.1</td><td>18.1</td><td>24.1</td><td>18.1</td><td>8.2</td><td>3.6</td><td>11.2</td></tr><tr><td>CodeGeeX2<sup>*</sup></td><td>15.9</td><td>14.7</td><td>18.0</td><td>13.6</td><td>4.3</td><td>6.1</td><td>12.1</td></tr><tr><td>StarCoder</td><td>8.7</td><td>15.7</td><td>13.3</td><td>20.1</td><td>15.6</td><td>6.7</td><td>13.4</td></tr><tr><td>OctoGeeX<sup>*</sup></td><td>28.1</td><td>27.7</td><td>30.4</td><td>27.6</td><td>22.9</td><td>9.6</td><td>24.4</td></tr><tr><td>OctoCoder</td><td><strong>30.2</strong></td><td><strong>28.4</strong></td><td><strong>30.6</strong></td><td><strong>30.2</strong></td><td><strong>26.1</strong></td><td><strong>16.5</strong></td><td><strong>27.0</strong></td></tr></table><hr style="background-color: black;"><center><h4>HumanEvalExplain</h4></center><hr style="background-color: black;"><center>Non-permissive models</center><hr style="background-color: black;"><table><tr><td>WizardCoder</td><td>32.5</td><td>33.0</td><td>27.4</td><td>26.7</td><td>28.2</td><td>16.9</td><td>27.5</td></tr><tr><td>GPT-4</td><td>64.6</td><td>57.3</td><td>51.2</td><td>58.5</td><td>38.4</td><td>42.7</td><td><u>52.1</u></td></tr></table><hr style="background-color: black;"><center>Permissive models</center><hr style="background-color: black;"><table><tr><td>InstructCodeT5+<sup>‡</sup></td><td>20.8</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.1</td><td>0.0</td><td>3.5</td></tr><tr><td>BLOOMZ<sup>+</sup></td><td>14.7</td><td>8.8</td><td>12.1</td><td>8.5</td><td>0.6</td><td>0.0</td><td>7.5</td></tr><tr><td>StarChat-β</td><td>25.4</td><td>21.5</td><td>24.5</td><td>18.4</td><td>17.6</td><td>13.2</td><td>20.1</td></tr><tr><td>CodeGeeX2<sup>*</sup></td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td></tr><tr><td>StarCoder</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td></tr><tr><td>OctoGeeX<sup>*</sup></td><td>30.4</td><td>24.0</td><td>24.7</td><td><strong>21.7</strong></td><td>21.0</td><td><strong>15.9</strong></td><td>22.9</td></tr><tr><td>OctoCoder</td><td><strong>35.1</strong></td><td><strong>24.5</strong></td><td><strong>27.3</strong></td><td>21.1</td><td><strong>24.1</strong></td><td>14.8</td><td><strong>24.5</strong></td></tr></table><hr style="background-color: black;"><center><h4>HumanEvalSynthesize</h4></center><hr style="background-color: black;"><center>Non-permissive models</center><hr style="background-color: black;"><table><tr><td>WizardCoder</td><td>57.3</td><td>49.5</td><td>36.1</td><td>36.4</td><td>40.9</td><td>20.2</td><td>40.1</td></tr><tr><td>GPT-4</td><td>86.6</td><td>82.9</td><td>81.7</td><td>72.6</td><td>78.7</td><td>67.1</td><td><u>78.3</u></td></tr></table><hr style="background-color: black;"><center>Permissive models</center><hr style="background-color: black;"><table><tr><td>InstructCodeT5+<sup>‡</sup></td><td>37.0</td><td>18.9</td><td>17.4</td><td>9.5</td><td>19.8</td><td>0.3</td><td>17.1</td></tr><tr><td>BLOOMZ<sup>+</sup></td><td>15.6</td><td>14.8</td><td>18.4</td><td>8.4</td><td>6.5</td><td>5.5</td><td>11.5</td></tr><tr><td>StarChat-β</td><td>33.5</td><td>31.4</td><td>26.7</td><td>25.5</td><td>26.6</td><td>14.0</td><td>26.3</td></tr><tr><td>CodeGeeX2<sup>*</sup></td><td>35.9</td><td>32.2</td><td>30.8</td><td>22.5</td><td>29.3</td><td>18.1</td><td>28.1</td></tr><tr><td>StarCoder</td><td>33.6</td><td>30.8</td><td>30.2</td><td>17.6</td><td>31.6</td><td>21.8</td><td>27.6</td></tr><tr><td>OctoGeeX<sup>*</sup></td><td>44.7</td><td>33.8</td><td>36.9</td><td>21.9</td><td>32.3</td><td>15.7</td><td>30.9</td></tr><tr><td>OctoCoder</td><td><strong>46.2</strong></td><td><strong>39.2</strong></td><td><strong>38.2</strong></td><td><strong>30.4</strong></td><td><strong>35.6</strong></td><td><strong>23.4</strong></td><td><strong>35.5</strong></td></tr></table>## Table of Contents
README.md+323