TECHNOLOGY

The Stack v2: link code content to archival identity

In this article
THE QUICK TAKE

A content identifier identifies bytes; repository context and detected license metadata answer different questions.

Separate the archive corpus from a model mixture

The Stack v2 is a source-code resource built in collaboration with Software Heritage. The research paper describes both this archival foundation and additional sources selected for StarCoder2 training. Those scopes are different: a model’s training mixture can include pull requests, notebooks, or documentation beyond an archival code subset. Identify the exact dataset configuration and release before using a model report as a description of every row in a local corpus.

Keep content identity distinct from repository position

The owner card lists content, directory, revision, and snapshot identifiers alongside paths and repository metadata. The SWHID specification explains that contents are byte sequences, while directories and revisions describe other objects in the archival structure. Identical file bytes can occur in different locations and projects. A content-level duplicate is therefore not the same thing as duplicate repository context. Preserve both when analyzing reuse, instead of selecting one arbitrary repository name as the sole origin of shared code.

Do not confuse metadata visibility with content access

The card documents separately stored file contents and states that bulk access requires an agreement with Software Heritage and INRIA. Its example uses a blob identifier and source encoding to recover text. Reading a public metadata card does not demonstrate that a local environment can retrieve the corresponding content. This guide describes the structure without acquiring files. For an actual experiment, record access conditions and distinguish an unavailable content object from an empty source file; silently dropping failures can change the language and repository mixture.

Interpret license detection as evidence

Fields such as detected_licenses and license_type describe detection and inference. They do not independently establish permission for every downstream use. Keep those values connected to repository context, timestamps, and the original code rather than converting them into a blanket corpus-wide entitlement. A provenance record should also distinguish the original encoding from a normalized training string, whose bytes may no longer match an archival content identifier.

Design holdouts around software relationships

The hosted configurations are presented as training resources, not an independent execution-test benchmark. A local holdout needs an explicit grouping rule. Repository forks, vendored libraries, generated files, and repeated content can connect records that look separate by row identifier. Combine archival identity with document-level leakage analysis before calling a held-out file unseen. The Stack v2 is particularly useful for studying code provenance and preparing a defined code collection; successful access or broad language coverage alone says nothing about whether generated programs will execute correctly.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles