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
- 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 ·
e622421
1
Parent(s): 14e6c10
Add
Browse files- .gitattributes +14 -0
- config.json +3 -0
- generation_config.json +3 -0
- merges.txt +0 -0
- pytorch_model-00001-of-00007.bin +3 -0
- pytorch_model-00002-of-00007.bin +3 -0
- pytorch_model-00003-of-00007.bin +3 -0
- pytorch_model-00004-of-00007.bin +3 -0
- pytorch_model-00005-of-00007.bin +3 -0
- pytorch_model-00006-of-00007.bin +3 -0
- pytorch_model-00007-of-00007.bin +3 -0
- pytorch_model.bin.index.json +3 -0
- special_tokens_map.json +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +3 -0
- vocab.json +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,17 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer_config.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
vocab.json filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
config.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
generation_config.json filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
pytorch_model.bin.index.json filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
special_tokens_map.json filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
pytorch_model-00003-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
pytorch_model-00004-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
pytorch_model-00005-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
pytorch_model-00006-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
pytorch_model-00007-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
pytorch_model-00001-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
pytorch_model-00002-of-00007.bin filter=lfs diff=lfs merge=lfs -text
|
config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0dc5b8bf6be78dfacc1a5ddb7e2224b69dfbe0a30e632db4891784ce3340f9bb
|
| 3 |
+
size 1008
|
generation_config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:634b0b7323db9a5f1421a068af9f79c9a2b403496a74cd2ce44e6207af41d912
|
| 3 |
+
size 116
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model-00001-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e3be7ef755097a936f6134cd543ccb3ac80f641c882421dccb7906519f524b1
|
| 3 |
+
size 9904379303
|
pytorch_model-00002-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b7b8a5ee8e5c9141b9aff700b8c9ae1ce7ac8fc0169faa39bb073493d673fdfa
|
| 3 |
+
size 9860464915
|
pytorch_model-00003-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4c1c61abafb7d59a3a0d44bd8c8a8901cbfc67f40b61c5da1b08e5823e66326
|
| 3 |
+
size 9854246167
|
pytorch_model-00004-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7cc8d33c7b57f58ad31d1a0aef3f8e7f00fd3259a3278654315f4a26e45ad59d
|
| 3 |
+
size 9860464979
|
pytorch_model-00005-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d2b2177e79d0efd24ceca9678b5aa47fef3bbc262f23fae42834e65510313d72
|
| 3 |
+
size 9854246167
|
pytorch_model-00006-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e054051316d386683f3577f50551bdb3a6af3e13d3f2657fb87d35ec9ba478ba
|
| 3 |
+
size 9860464979
|
pytorch_model-00007-of-00007.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e6eb36a714f29b6f8004f17ac3c96407595cd5d2f580c05a23f43b095afdf26e
|
| 3 |
+
size 2875719771
|
pytorch_model.bin.index.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b217742d53295e992d923051a73d629425169b9088af65b76724d3b5195a3ac9
|
| 3 |
+
size 36278
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0823292e24ea07b89317e9ede9d08da2a1b6c014290c06908a7ad04f1efd6719
|
| 3 |
+
size 532
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9af07a3123a1f4d75dcb85fbdc4c62f9b7873d23fa39c449d2240c3e33eb3ab5
|
| 3 |
+
size 2057423
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d8a576be1b7a37446e07a524202302c08ddc116e68b2e042d9fe4eaef46192e
|
| 3 |
+
size 717
|
vocab.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20175afb9f164fad4829aca2279f8df7eeff1e2e3f671378aaa287a740aff09f
|
| 3 |
+
size 776993
|