Using StarCoder2 7B on NVIDIA NIM

Implementation guide · StarCoder 2 · ServiceNow Research

ProvisionedOpen Source

NVIDIA NIM exposes StarCoder2 7B through model ID starcoder2-7b. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.

Last refreshed 2026-05-19. Next refresh: weekly.

Quick Start

  1. 1
    Create an account at NVIDIA NIM and generate an API key.
  2. 2
    Use the NVIDIA NIM SDK or REST API to call starcoder2-7b — see the documentation for request format.
  3. 3
    You'll be billed . See full pricing.

Code Examples

See NVIDIA NIM documentation for integration details.

Pricing on NVIDIA NIM

Capabilities

No model capability flags are currently sourced.

About StarCoder2 7B

The StarCoder2 7B model is a large language model engineered for code generation tasks, containing 7 billion parameters. It is trained on a vast dataset of 3.5 trillion tokens known as The Stack v2, which includes diverse code samples from 17 programming languages such as Python, Java, and JavaScript. This model features Grouped Query Attention with a significant context window of 16,384 tokens and a sliding window attention of 4,096 tokens, enabling it to adeptly manage complex coding tasks. StarCoder2 7B excels in code completion, summarization, and generating code snippets from given prompts.

Model Specs

Released2024-07-04
Parameters7B
Context8k
ArchitectureDecoder Only

Provider

NVIDIA NIM

NVIDIA

Santa Clara, California, United States