StarCoder
StarCoder is an open large language model for code from the BigCode project, an open scientific collaboration led jointly by Hugging Face and ServiceNow. The 15.5-billion-parameter model was trained on permissively licensed code from GitHub covering more than 80 programming languages, plus GitHub issues, commits and Jupyter notebooks. It generates and completes code, can be fine-tuned for specific tasks, and is available through a VS Code extension, a playground and a chat-tuned version; its successor family, StarCoder2, comes in 3B, 7B and 15B sizes.
Free - open-access model released under the BigCode OpenRAIL-M licence.
How to use StarCoder
- Go to hf.co/bigcode/starcoder, accept the agreement, and log in to the Hugging Face hub with huggingface-cli login.
- Install the libraries listed in requirements.txt with pip install -r requirements.txt.
- Load the model with the transformers library — checkpoint "bigcode/starcoder" — and generate or complete code from a prompt such as a function definition.
- Or skip the setup: try the Hugging Face playground or the chat-tuned version, use the VS Code extension, or fine-tune the model on your own task with the scripts in the finetune directory.
Frequently asked questions
Is StarCoder free?
Yes. StarCoder is an open-access model released under the BigCode OpenRAIL-M licence, from the BigCode project led jointly by Hugging Face and ServiceNow.
Do I need an account to use StarCoder?
Yes, for the model weights: you must accept the agreement at hf.co/bigcode/starcoder and be logged in to the Hugging Face hub before you can use the model.
What is StarCoder best for?
Code generation and completion across more than 80 programming languages, and fine-tuning for specific tasks — it was trained on permissively licensed GitHub code plus GitHub issues, commits and Jupyter notebooks.
Pros & cons
Pros
- Trained on more than 80 programming languages, plus GitHub issues, commits and notebooks, so it handles a very wide range of code.
- Free and open-access under the BigCode OpenRAIL-M licence, and built to be fine-tuned for specific tasks.
- Usable several ways: Python with transformers, a VS Code extension, a Hugging Face playground, and a chat-tuned version.
Cons
- The 15.5-billion-parameter model needs serious hardware: over 60GB of RAM in FP32, around 30GB in FP16 or BF16, or under 20GB in 8-bit.
- You must accept a licence agreement and log in to Hugging Face before you can download or use the model weights.
Related Coding & Development tools
- GitHub CopilotFreemium · ★4.7 · GitHub / Microsoft
- CursorFreemium · ★4.7 · Anysphere
- WindsurfFreemium · Cognition
- Replit AIFreemium · Replit
- Amazon Q DeveloperFreemium · Amazon
- Sourcegraph CodyPaid · Sourcegraph
- DevinFreemium · Cognition
- AiderFree · Aider