Model reference · open weights
starcoder2 is an open-weight language model from bigcode, listed in the AxForge catalogue. AxForge can bring it up on EU-owned hardware for you on request — with the licence handled where one is required.
About
StarCoder2 Table of Contents 1. Model Summary 2. Use 3. Limitations 4. Training 5. License 6. Citation Model Summary StarCoder2-3B model is a 3B parameter model trained on 17 programming languages from The Stack v2, with opt-out requests excluded. The model uses Grouped Query Attention, a context window of 16,384 tokens with a sliding window attention of 4,096 tokens, and was trained using the Fill-in-the-Middle objective on 3+ trillion tokens. - Project Website: bigcode-project.org - Paper: Link - Point of Contact: contact@bigcode-project.org - Languages: 17 Programming languages Use Intended use The model was trained on GitHub code as well as additional selected data sources such as Arxiv and Wikipedia. As such it is not an instruction model and commands like "Write a function that computes the square root." do not work well. Generation Here are some examples to get started with the model. You can find a script for fine-tuning in StarCoder2's GitHub repository. First, make sure to install transformers from source: Running the model on CPU/GPU/multi GPU Using full precision Using torch.bfloat16 Quantized Versions through bitsandbytes Using 8-bit precision (int8) Attribution & Other Requirements The pretraining dataset of the model was filtered for permissive licenses and code with no license only. Nevertheless, the model can generate source code verbatim from the dataset. The code's license might require attribution and/or other specific requirements that must be respected. We provide a search index that lets you search through the pretraining data to identify where the generated code came from, and apply the proper attribution to your code. Limitations The model has been trained on source code from 600+ programming languages. The predominant language in source is English although other languages are also present. As such the model is capable to generate code snippets provided some context but the generated code is not guaranteed to work as intended. It can be inefficient, contain bugs or exploits. See the paper for an in-depth discussion of the model limitations. Training Model - Architecture: Transformer decoder with grouped-query and sliding window attention
Summarised from the published model card. Read the full card on the HuggingFace links below.
Specifications
| Maker | bigcode |
|---|---|
| Type | Language models |
| Parameters (lead) | 3.0B |
| Context | 16k tokens |
| Variants | 3 |
| Runs with | transformers |
| Released | 2023-11-29 |
| Popularity | 120k downloads / month |
| Likes | 674 |
| Licence | Commercial licence needed |
How it works
Variants
Open weights ship in several sizes and precisions. One page, all the variants — pick the one that fits your GPU. VRAM figures are estimates from model size.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| text-generation | CruxEval-I | pass@1 | 32.7 |
| text-generation | DS-1000 | pass@1 | 25 |
| text-generation | GSM8K (PAL) | accuracy | 27.7 |
| text-generation | HumanEval+ | pass@1 | 27.4 |
| text-generation | HumanEval | pass@1 | 31.7 |
| text-generation | RepoBench-v1.1 | edit-smiliarity | 71.19 |
Using it via the API
Once AxForge deploys starcoder2 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (starcoder2 below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"starcoder2","messages":[{"role":"user","content":"Hello"}]}'
Details
Trained / evaluated on
Tags
Papers
Licence
The weights are open but bigcode-openrail-m needs a commercial agreement for business use. AxForge can arrange that licence and host the model for you — you pay AxForge, we settle with the model’s maker. Ask us for a quote. Read the licence ↗