Last refreshed 2026-04-15. Next refresh: weekly.
Why use StarCoder2 7B on Fireworks AI?
Fireworks AI offers StarCoder2 7B with pay-as-you-go pricing at $0.20/1M input tokens. Fireworks AI offers a generative AI platform as a service, focusing on rapid product iteration and cost-efficient AI deployment.
Compare StarCoder2 7B across 2 providers to find the best fit for your use caseSetup recipe
Python + curlpip install openaiexport FIREWORKS_API_KEY=...import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FIREWORKS_API_KEY"],starcoder2-7bRequest example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FIREWORKS_API_KEY"],
base_url="https://api.fireworks.ai/inference/v1"
)
response = client.chat.completions.create(
model="starcoder2-7b",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Gotchas
- Fireworks model IDs use "accounts/fireworks/models/{model-name}" format, e.g. "accounts/fireworks/models/llama4-scout-instruct-basic" or "accounts/fireworks/models/deepseek-r1".
- The examples expect FIREWORKS_API_KEY; rename it only if your application config maps the new variable.
Compare StarCoder2 7B Across Providers
| Provider | Input (per 1M) | Output (per 1M) |
|---|---|---|
| Fireworks AI | $0.20 | $0.20 |
| NVIDIA NIM | — | — |
Pricing
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.20 |
| Output tokens | $0.20 |
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. It is built with responsible data usage in mind, designed to avoid directly copying copyrighted code, making it a reliable tool for developers 124.
FAQ
What does StarCoder2 7B cost on Fireworks AI?
On Fireworks AI, StarCoder2 7B costs $0.2 per 1M input tokens and $0.2 per 1M output tokens.
What is the context window for StarCoder2 7B on Fireworks AI?
StarCoder2 7B supports a 8,000 token context window on Fireworks AI.
How does Fireworks AI compare to other StarCoder2 7B providers?
StarCoder2 7B is available from 2 providers. The cheapest input pricing is $0.2/1M tokens from Fireworks AI.
Who created StarCoder2 7B?
StarCoder2 7B was created by ServiceNow Research as part of the StarCoder 2 model family.
Is StarCoder2 7B open source?
StarCoder2 7B is open source according to the seed data.