Model reference · open weights

starcoder2

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.

Licence fee required LLMs bigcode 3 variants 120k downloads/mo
Request a licence + hosting quote All served models Not on the shared API today — deployed on request.

About

What starcoder2 is

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

What it is

Makerbigcode
TypeLanguage models
Parameters (lead)3.0B
Context16k tokens
Variants3
Runs withtransformers
Released2023-11-29
Popularity120k downloads / month
Likes674
LicenceCommercial licence needed

How it works

How language models work

Your prompttext / messagesTransformerattention over tokensNext-token loopgenerate + streamResponsetext · tool callsA language model reads your tokens and predicts the next one, again and again, streaming the reply back.

Variants

Sizes & precisions

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.

VariantParamsPrecisionVRAMFits 16 GBWeights
starcoder2-3b3.0BBF16~7 GBWeights ↗
starcoder2-7b7.2BBF16~16.5 GBWeights ↗
starcoder2-15b16.0BBF16~36.7 GBWeights ↗

Benchmarks

Reported results

As published on the model card — the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
text-generationCruxEval-Ipass@132.7
text-generationDS-1000pass@125
text-generationGSM8K (PAL)accuracy27.7
text-generationHumanEval+pass@127.4
text-generationHumanEvalpass@131.7
text-generationRepoBench-v1.1edit-smiliarity71.19

Using it via the API

Call it like any OpenAI endpoint

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

Languages, data & research

Trained / evaluated on

bigcode/the-stack-v2-train bigcode/self-oss-instruct-sc2-exec-filter-50k

Tags

transformers safetensors starcoder2 text-generation code dataset:bigcode/the-stack-v2-train model-index text-generation-inference endpoints_compatible deploy:azure conversational dataset:bigcode/self-oss-instruct-sc2-exec-filter-50k

Papers

Licence

Commercial licence needed

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 ↗

Sources

Weights & code

Want starcoder2 on EU-owned hardware?

Request a licence + hosting quote See what’s served now

Explore

More language models

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms