Skip to main content

Model guide

StarCoder2 15B

StarCoder2 15B is the larger code-completion checkpoint in this family, with a correspondingly larger local download. Consider it when you already have a completion workflow and want to test whether the additional memory improves useful completions. Use code prefixes or the documented infill format, then compile or run the result.

15BCode16,384 token contextView the model card →

At a glance

Parameters
15B
Accepts
Text
Returns
Text, including code
Published context limit
16,384 tokens
Model format
safetensors · GGUF
Software and download hosts
transformers · Ollama. Follow the exact setup below; this list does not establish support for every format, input type or software version.
Suggested compression
Q4_K_M
Model-weight download
Q4_K_M weights · 9.86 GBsecond-state (community conversion)starcoder2-15b-Q4_K_M.gguf
Languages
600+ programming languages

Will it fit?

StarCoder2 15B · Q4_K_M download. Fit depends on your computer, the app you run it in and the conversation length you need.

Check on your computer

Best for

  • Code completion — supply the code before and after the gap. Choose an Instruct checkpoint for chat.
  • Try the 15B checkpoint when a smaller StarCoder2 completion breaks a nearby test. Compare the actual inserted code at the same cursor.

Choose something else when

  • The listed 9.86 GB file is only the weights. Check loaded memory before keeping it as an always-on editor helper.

First setup

For fill-in-the-middle, supply the code before and after the missing section using the publisher’s <fim_prefix>, <fim_suffix> and <fim_middle> format. Prefix: def double(x): followed by an indented return. Suffix: assert double(3) == 6. Submit the prefix and suffix using the displayed infill tokens, then run the assembled function. See the model instructions.

For memory planning, load the linked quantization at 4,096-token context with one request at a time. Record available RAM and VRAM before loading, after loading and while completing a representative code prefix, using Task Manager on Windows, Activity Monitor on macOS or nvidia-smi for an NVIDIA GPU. Increase the context only after the short run leaves adequate memory for other programs. Weight size alone cannot establish fit.

Other models for this task