Text Generation
Transformers
PyTorch
code
gpt2
custom_code
Eval Results (legacy)
text-generation-inference
Run this model with HF Jobs
Run bigcode/santacoder 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/santacoder. 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/santacoder 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/santacoder. 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/santacoder. 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/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)# pip install -U transformers accelerate # 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, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Commit ·
d3c3868
1
Parent(s): e02c7b7
Update README.md
Browse files19 unmodified lines20212223242526272829303132333435363738394041424344454647484950515253545556572 unmodified lines6061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512619 unmodified lines- task:type: text-generationdataset:type: openai_humanevalname: HumanEval (Python)metrics:- name: pass@1type: pass@1value: 0.0verified: false- name: pass@10type: pass@10value: 0.0verified: false- name: pass@100type: pass@100value: 0.0verified: false- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL HumanEval (Java)metrics:- name: pass@1type: pass@1value: 0.0verified: false- name: pass@10type: pass@10value: 0.0verified: false- name: pass@100type: pass@100value: 0.41- task:type: text-generationdataset:2 unmodified linesmetrics:- name: pass@1type: pass@1value: 0.0verified: false- name: pass@10type: pass@10value: 0.0verified: false- name: pass@100type: pass@100value: 0.47- task:type: text-generationdataset:type: openai_humanevalname: MBPP (Python)metrics:- name: pass@1type: pass@1value: 0.0verified: false- name: pass@10type: pass@10value: 0.0verified: false- name: pass@100type: pass@100value: 0.49verified: false- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL MBPP (Java)metrics:- name: pass@1type: pass@1value: 0.0verified: false- name: pass@10type: pass@10value: 0.0verified: false- name: pass@100type: pass@100value: 0.0- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL MBPP (JavaScript)metrics:- name: pass@1type: pass@1value: 0.0verified: false- name: pass@10type: pass@10value: 0.0verified: false- name: pass@100type: pass@100value: 0.0- task:type: text-generationdataset:19 unmodified lines2021222324252627282930313233343536373839404142434445464748495051525354555657582 unmodified lines61626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913019 unmodified lines- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL HumanEval (Python)metrics:- name: pass@1type: pass@1value: 0.18verified: false- name: pass@10type: pass@10value: 0.29verified: false- name: pass@100type: pass@100value: 0.49verified: false- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL MBPP (Python)metrics:- name: pass@1type: pass@1value: 0.35verified: false- name: pass@10type: pass@10value: 0.58verified: false- name: pass@100type: pass@100value: 0.77verified: false- task:type: text-generationdataset:2 unmodified linesmetrics:- name: pass@1type: pass@1value: 0.16verified: false- name: pass@10type: pass@10value: 0.27verified: false- name: pass@100type: pass@100value: 0.47verified: false- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL MBPP (Javascript)metrics:- name: pass@1type: pass@1value: 0.28verified: false- name: pass@10type: pass@10value: 0.51verified: false- name: pass@100type: pass@100value: 0.70verified: false- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL HumanEval (Java)metrics:- name: pass@1type: pass@1value: 0.15verified: false- name: pass@10type: pass@10value: 0.26verified: false- name: pass@100type: pass@100value: 0.41verified: false- task:type: text-generationdataset:type: nuprl/MultiPL-Ename: MultiPL MBPP (Java)metrics:- name: pass@1type: pass@1value: 0.28verified: false- name: pass@10type: pass@10value: 0.44verified: false- name: pass@100type: pass@100value: 0.59verified: false- task:type: text-generationdataset:
README.md+28-24