Text Generation
Transformers
PyTorch
code
gpt2
custom_code
Eval Results (legacy)
text-generation-inference
Instructions to use bigcode/santacoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigcode/santacoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bigcode/santacoder", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bigcode/santacoder", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("bigcode/santacoder", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use bigcode/santacoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bigcode/santacoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigcode/santacoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bigcode/santacoder
- SGLang
How to use bigcode/santacoder 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/santacoder" \ --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/santacoder", "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/santacoder" \ --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/santacoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bigcode/santacoder with Docker Model Runner:
docker model run hf.co/bigcode/santacoder
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: todo
|
| 3 |
+
language:
|
| 4 |
+
- code
|
| 5 |
+
programming_language:
|
| 6 |
+
- Java
|
| 7 |
+
- JavaScript
|
| 8 |
+
- Python
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
widget:
|
| 11 |
+
- text: 'def print_hello_world():'
|
| 12 |
+
example_title: Hello world
|
| 13 |
+
group: Python
|
| 14 |
+
|
| 15 |
+
model-index:
|
| 16 |
+
- name: SantaCoder
|
| 17 |
+
results:
|
| 18 |
+
- task:
|
| 19 |
+
type: text-generation
|
| 20 |
+
dataset:
|
| 21 |
+
type: openai_humaneval
|
| 22 |
+
name: HumanEval (Python)
|
| 23 |
+
metrics:
|
| 24 |
+
- name: pass@1
|
| 25 |
+
type: pass@1
|
| 26 |
+
value: 0.0
|
| 27 |
+
verified: false
|
| 28 |
+
- name: pass@10
|
| 29 |
+
type: pass@10
|
| 30 |
+
value: 0.0
|
| 31 |
+
verified: false
|
| 32 |
+
- name: pass@100
|
| 33 |
+
type: pass@100
|
| 34 |
+
value: 0.0
|
| 35 |
+
verified: false
|
| 36 |
+
dataset:
|
| 37 |
+
type: nuprl/MultiPL-E
|
| 38 |
+
name: MultiPL HumanEval (Java)
|
| 39 |
+
metrics:
|
| 40 |
+
- name: pass@1
|
| 41 |
+
type: pass@1
|
| 42 |
+
value: 0.0
|
| 43 |
+
verified: false
|
| 44 |
+
- name: pass@10
|
| 45 |
+
type: pass@10
|
| 46 |
+
value: 0.0
|
| 47 |
+
verified: false
|
| 48 |
+
- name: pass@100
|
| 49 |
+
type: pass@100
|
| 50 |
+
value: 0.0
|
| 51 |
+
dataset:
|
| 52 |
+
type: nuprl/MultiPL-E
|
| 53 |
+
name: MultiPL HumanEval (JavaScript)
|
| 54 |
+
metrics:
|
| 55 |
+
- name: pass@1
|
| 56 |
+
type: pass@1
|
| 57 |
+
value: 0.0
|
| 58 |
+
verified: false
|
| 59 |
+
- name: pass@10
|
| 60 |
+
type: pass@10
|
| 61 |
+
value: 0.0
|
| 62 |
+
verified: false
|
| 63 |
+
- name: pass@100
|
| 64 |
+
type: pass@100
|
| 65 |
+
value: 0.0
|
| 66 |
+
dataset:
|
| 67 |
+
type: openai_humaneval
|
| 68 |
+
name: MBPP (Python)
|
| 69 |
+
metrics:
|
| 70 |
+
- name: pass@1
|
| 71 |
+
type: pass@1
|
| 72 |
+
value: 0.0
|
| 73 |
+
verified: false
|
| 74 |
+
- name: pass@10
|
| 75 |
+
type: pass@10
|
| 76 |
+
value: 0.0
|
| 77 |
+
verified: false
|
| 78 |
+
- name: pass@100
|
| 79 |
+
type: pass@100
|
| 80 |
+
value: 0.0
|
| 81 |
+
verified: false
|
| 82 |
+
dataset:
|
| 83 |
+
type: nuprl/MultiPL-E
|
| 84 |
+
name: MultiPL MBPP (Java)
|
| 85 |
+
metrics:
|
| 86 |
+
- name: pass@1
|
| 87 |
+
type: pass@1
|
| 88 |
+
value: 0.0
|
| 89 |
+
verified: false
|
| 90 |
+
- name: pass@10
|
| 91 |
+
type: pass@10
|
| 92 |
+
value: 0.0
|
| 93 |
+
verified: false
|
| 94 |
+
- name: pass@100
|
| 95 |
+
type: pass@100
|
| 96 |
+
value: 0.0
|
| 97 |
+
dataset:
|
| 98 |
+
type: nuprl/MultiPL-E
|
| 99 |
+
name: MultiPL MBPP (JavaScript)
|
| 100 |
+
metrics:
|
| 101 |
+
- name: pass@1
|
| 102 |
+
type: pass@1
|
| 103 |
+
value: 0.0
|
| 104 |
+
verified: false
|
| 105 |
+
- name: pass@10
|
| 106 |
+
type: pass@10
|
| 107 |
+
value: 0.0
|
| 108 |
+
verified: false
|
| 109 |
+
- name: pass@100
|
| 110 |
+
type: pass@100
|
| 111 |
+
value: 0.0
|
| 112 |
+
dataset:
|
| 113 |
+
type: loubnabnl/humaneval_infilling
|
| 114 |
+
name: HumanEval FIM (Python)
|
| 115 |
+
metrics:
|
| 116 |
+
- name: pass@1
|
| 117 |
+
type: pass@1
|
| 118 |
+
value: 0.0
|
| 119 |
+
verified: false
|
| 120 |
+
- name: pass@10
|
| 121 |
+
type: pass@10
|
| 122 |
+
value: 0.0
|
| 123 |
+
verified: false
|
| 124 |
+
- name: pass@100
|
| 125 |
+
type: pass@100
|
| 126 |
+
value: 0.0
|
| 127 |
+
verified: false
|
| 128 |
+
dataset:
|
| 129 |
+
type: nuprl/MultiPL-E
|
| 130 |
+
name: MultiPL HumanEval FIM (Java)
|
| 131 |
+
metrics:
|
| 132 |
+
- name: pass@1
|
| 133 |
+
type: pass@1
|
| 134 |
+
value: 0.0
|
| 135 |
+
verified: false
|
| 136 |
+
- name: pass@10
|
| 137 |
+
type: pass@10
|
| 138 |
+
value: 0.0
|
| 139 |
+
verified: false
|
| 140 |
+
- name: pass@100
|
| 141 |
+
type: pass@100
|
| 142 |
+
value: 0.0
|
| 143 |
+
dataset:
|
| 144 |
+
type: nuprl/MultiPL-E
|
| 145 |
+
name: MultiPL HumanEval FIM (JavaScript)
|
| 146 |
+
metrics:
|
| 147 |
+
- name: pass@1
|
| 148 |
+
type: pass@1
|
| 149 |
+
value: 0.0
|
| 150 |
+
verified: false
|
| 151 |
+
- name: pass@10
|
| 152 |
+
type: pass@10
|
| 153 |
+
value: 0.0
|
| 154 |
+
verified: false
|
| 155 |
+
- name: pass@100
|
| 156 |
+
type: pass@100
|
| 157 |
+
value: 0.0
|
| 158 |
+
dataset:
|
| 159 |
+
type: code_x_glue_ct_code_to_text
|
| 160 |
+
name: CodeXGLUE code-to-text (Python)
|
| 161 |
+
metrics:
|
| 162 |
+
- name: BLEU
|
| 163 |
+
type: bleu
|
| 164 |
+
value: 0.0
|
| 165 |
+
verified: false
|
| 166 |
+
|
| 167 |
+
# SantaCoder
|
| 168 |
+
|