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")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigcode/octocoder", dtype="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
Commit ·
5181078
1
Parent(s): 2c3af99
Update README.md
Browse files
README.md
CHANGED
|
@@ -231,20 +231,14 @@ model-index:
|
|
| 231 |
|
| 232 |

|
| 233 |
|
| 234 |
-
#
|
| 235 |
|
| 236 |
-
|
|
|
|
|
|
|
|
|
|
| 237 |
|
| 238 |
-
#
|
| 239 |
-
|
| 240 |
-
1. [Model Summary](##model-summary)
|
| 241 |
-
2. [Use](##use)
|
| 242 |
-
3. [Limitations](##limitations)
|
| 243 |
-
4. [Training](##training)
|
| 244 |
-
5. [License](##license)
|
| 245 |
-
6. [Citation](##citation)
|
| 246 |
-
|
| 247 |
-
## Model Summary
|
| 248 |
|
| 249 |
OctoCoder is an instruction tuned model with 15.5B parameters created by finetuning StarCoder on CommitPackFT & OASST as described in the OctoPack paper.
|
| 250 |
|
|
@@ -281,15 +275,15 @@ OctoCoder is an instruction tuned model with 15.5B parameters created by finetun
|
|
| 281 |
</table>
|
| 282 |
|
| 283 |
|
| 284 |
-
#
|
| 285 |
|
| 286 |
-
##
|
| 287 |
|
| 288 |
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:"
|
| 289 |
|
| 290 |
**Feel free to share your generations in the Community tab!**
|
| 291 |
|
| 292 |
-
##
|
| 293 |
```python
|
| 294 |
# pip install -q transformers
|
| 295 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
| 231 |
|
| 232 |

|
| 233 |
|
| 234 |
+
# Table of Contents
|
| 235 |
|
| 236 |
+
1. [Model Summary](#model-summary)
|
| 237 |
+
2. [Use](#use)
|
| 238 |
+
3. [Training](#training)
|
| 239 |
+
4. [Citation](#citation)
|
| 240 |
|
| 241 |
+
# Model Summary
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 242 |
|
| 243 |
OctoCoder is an instruction tuned model with 15.5B parameters created by finetuning StarCoder on CommitPackFT & OASST as described in the OctoPack paper.
|
| 244 |
|
|
|
|
| 275 |
</table>
|
| 276 |
|
| 277 |
|
| 278 |
+
# Use
|
| 279 |
|
| 280 |
+
## Intended use
|
| 281 |
|
| 282 |
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:"
|
| 283 |
|
| 284 |
**Feel free to share your generations in the Community tab!**
|
| 285 |
|
| 286 |
+
## Generation
|
| 287 |
```python
|
| 288 |
# pip install -q transformers
|
| 289 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|