# Atlas with StarCoder2 (local via Ollama): Auditable Training Data in 2026

> StarCoder2 offers fully auditable training data via The Stack v2, with opt-out honored, and covers 600-plus programming languages.

StarCoder2 (local via Ollama) is the BigCode project's open code model, trained on The Stack v2 with full data provenance. It exists to answer the question of what your model was trained on, which no frontier lab will answer. StarCoder2 is free to self-host, covers 600-plus programming languages, and runs in three sizes. Its 16,384 token context and lack of instruction tuning mean it is a completion engine inside Atlas, not an agent.

## Key takeaways

- StarCoder2 has fully auditable training data via The Stack v2, with opt-out honored, the only real answer to license-contamination concerns in generated code.
- It covers 600-plus programming languages, far more breadth than the mainstream coding models.
- Three sizes (3b, 7b, 15b), with the 3B variant running on hardware where nothing else will.
- Free self-hosted through Ollama, with a 16,384 token context window.
- No instruction tuning in the base variants, so StarCoder2 is a completion engine and not viable as an Atlas build-agent model.

## Why does StarCoder2 have auditable training data?

StarCoder2 offers fully auditable training data via The Stack v2, with opt-out honored, which is the only real answer to license-contamination concerns in generated code. The BigCode project built StarCoder2 specifically so that the question of what the model was trained on has an answer.

No frontier lab will tell you what its coding model ingested. StarCoder2 will. The Stack v2 is published, opt-out is honored, and that provenance chain is the reason a legal team might approve StarCoder2 where it will not approve anything else. If your organization has been blocked on license contamination in generated code, StarCoder2 is the model that removes the blocker. Everything else on this page is secondary to that single property, because for the teams that need it, nothing else substitutes.

## How many programming languages does StarCoder2 cover?

StarCoder2 covers 600-plus programming languages, far more breadth than the mainstream coding models. For anyone working in a language the Qwen and Devstral lines barely saw during training, StarCoder2 is often the only local model that has meaningfully read the ecosystem at all.

Breadth is the second reason StarCoder2 survives in 2026. Mainstream coding models optimize for the top handful of languages, which is rational and leaves everyone else stranded. StarCoder2's 600-plus language coverage from The Stack v2 means a Fortran, Ada, or Verilog file is not a total blind spot. Atlas indexes code by AST declarations using tree-sitter, not blind line windows, so retrieval works across the tree regardless, but the model still has to recognize what it is looking at.

## What hardware does StarCoder2 need locally?

StarCoder2 comes in three sizes (3b, 7b, and 15b), with the 3B variant running on hardware where nothing else will. Pull the largest your machine supports with `ollama pull starcoder2:15b`, or drop to 3b or 7b for smaller hardware, all free to self-host.

The 3B StarCoder2 variant is the floor of the local model world. On a thin client, an old laptop, or a constrained container, StarCoder2 3b is often the only thing that will load. Register whichever size you pull under the ollama provider in atlas.json with "limit": { "context": 16384 }, then select it from /models for completion-style work. Set expectations accordingly: a 3B completion model on constrained hardware is a genuine tool, not a substitute for an agent.

## Can StarCoder2 drive the Atlas agent loop?

No. StarCoder2 is not viable as an Atlas build-agent model: it will not drive the plan, edit, and permission loop. With a 16,384 token context and no instruction tuning in the base variants, StarCoder2 is a completion engine, not an agent.

The Atlas agent loop demands specific behavior. Atlas drafts a plan in a read-only plan agent and asks before switching to a build agent, then computes a unified diff for every file edit and surfaces it for approval before writing. A base model with no instruction tuning does not participate in that. StarCoder2 will continue your code, not negotiate a plan with you. Do not put StarCoder2 in the `model` slot and expect a build session to complete.

## How do you use StarCoder2 alongside a real agent model?

For provenance-safe agentic work with StarCoder2, pair it with a stronger model in the `model` slot and keep StarCoder2 for inline completion. That split lets you get agent behavior from a capable model while keeping the auditable Stack v2 provenance where completions are generated.

The pairing is the practical StarCoder2 configuration inside Atlas. A stronger model handles the plan, the tool calls, and the diffs, all of which are reviewed by a human anyway, since every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs. StarCoder2, with its 600-plus language coverage and The Stack v2 provenance, handles completion-style work. Atlas lets you switch the active model and provider on the fly with favorites and recents, so moving between the two is immediate.

## Setup

1. Run `ollama pull starcoder2:15b` (or 3b, 7b for smaller hardware).
2. Register it under the ollama provider in atlas.json with "limit": { "context": 16384 }.
3. Select StarCoder2 from /models for completion-style work.
4. For provenance-safe agentic work, pair it with a stronger model in the `model` slot and keep StarCoder2 for inline completion.
5. Do not assign StarCoder2 to the build-agent role, since the base variants have no instruction tuning.

## FAQ

### which code model has auditable training data

StarCoder2. The BigCode project trained it on The Stack v2 with full data provenance and opt-out honored, which is the only real answer to license-contamination concerns in generated code.

### how many languages does starcoder2 support

StarCoder2 covers 600-plus programming languages, far more breadth than the mainstream coding models. That makes it useful for ecosystems the Qwen and Devstral lines barely saw.

### what is the context window of starcoder2

StarCoder2 has a 16,384 token context window. Combined with no instruction tuning in the base variants, that makes it a completion engine rather than an agent.

### can starcoder2 be the main model in atlas

No. StarCoder2 is not viable as an Atlas build-agent model: it will not drive the plan, edit, and permission loop. Pair it with a stronger model in the `model` slot and keep StarCoder2 for inline completion.

### what sizes does starcoder2 come in

StarCoder2 ships in three sizes: 3b, 7b, and 15b. The 3B variant runs on hardware where nothing else will. Pull one with `ollama pull starcoder2:15b` or a smaller tag.

### how do i avoid license contamination in ai generated code

Use a model with published provenance. StarCoder2 was trained on The Stack v2 with opt-out honored, so its training data is fully auditable, unlike frontier models whose training sets are undisclosed.

### how do i set up starcoder2 with atlas

Run `ollama pull starcoder2:15b`, register it under the ollama provider in atlas.json with "limit": { "context": 16384 }, then select it from /models for completion-style work.

---

Canonical HTML: https://runatlas.sh/resources/models/starcoder2-local
Source of truth: aeo_pages row `/resources/models/starcoder2-local` (segment: Models) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
