Datasets:
Generation And Structure
JSONL Schema
Minimal record:
{"text":"...","domain":"code_fim","difficulty":"medium","meta":{"lang":"python"}}
Recommended metadata:
{
"text": "...",
"domain": "code_fim",
"difficulty": "hard",
"meta": {
"lang": "python",
"repo": "owner/name",
"path": "src/file.py",
"license": "Apache-2.0",
"source": "the-stack-v2",
"mode": "psm"
}
}
FIM Text Format
Primary order:
<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>{middle}
Secondary order:
<|fim_suffix|>{suffix}<|fim_prefix|>{prefix}<|fim_middle|>{middle}
Use primary order for most records and keep a smaller secondary slice for model robustness.
Balance Targets
The long-term target mix is:
- FIM records: majority share.
- Continuation/code generation records: minority but substantial share.
- Languages: Python, Rust, C/C++, JavaScript/TypeScript, Java, Go.
- Lengths: short, medium, and long records.
- Difficulty: easy, medium, hard.
Duplicate Policy
The duplicate key is a hash of normalized text content. A checkpoint is not
upload-ready unless the in-bundle duplicate count is zero.