Text Generation
Transformers
PyTorch
Safetensors
gpt_bigcode
code
Eval Results (legacy)
text-generation-inference
Instructions to use bigcode/starcoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigcode/starcoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bigcode/starcoder")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bigcode/starcoder") model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use bigcode/starcoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bigcode/starcoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bigcode/starcoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bigcode/starcoder
- SGLang
How to use bigcode/starcoder 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/starcoder" \ --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/starcoder", "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/starcoder" \ --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/starcoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bigcode/starcoder with Docker Model Runner:
docker model run hf.co/bigcode/starcoder
Batch generation with starcoder
2
#65 opened almost 3 years ago
by
YoungEver
Error when finetuning on windows
4
#64 opened almost 3 years ago
by
rachelshalom
finetuning for autocompletion?
10
#63 opened almost 3 years ago
by
rachelshalom
How to train with long inputs (Training memory requirement)
2
#62 opened almost 3 years ago
by
jiang719
How to handle the truncate part when concating multiple sequences in pretraining phrase?
#61 opened almost 3 years ago
by
feiyulv
Any suggestions for loading checkpoint shards incrementally
1
#59 opened almost 3 years ago
by
satsat
Error while defining the model
#58 opened almost 3 years ago
by
dharma7900
How to stop the prediction once the model is generated a sufficient solution for the asked prompt ?
9
#49 opened almost 3 years ago
by
MukeshSharma
Unable to Deploy to Amazon SageMaker using Supplied Deploy Code
👍 2
11
#48 opened almost 3 years ago
by
garystafford
I wrote a CLI wrapper for this model with Node JS and the Hugging Face JS inference library
#44 opened about 3 years ago
by
akraieski
Using starcoder in question answering pipeline
1
#42 opened about 3 years ago
by
liukuo99
StarCoder in AWS Sagemaker? Error "gpt_bigcode" for not supporting Transformers last version
👍 3
2
#41 opened about 3 years ago
by
apol
How to speed up inferring?
❤️👍 5
7
#21 opened about 3 years ago
by
merlinarer
May I ask if there are plans to provide 8-bit or 4-bit quantized versions?
10
#19 opened about 3 years ago
by
intelligencegear
Not able to run hello world example, bigcode/starcoder is not a valid model identifier
👍 3
14
#11 opened about 3 years ago
by
rameshn