| # Generation And Structure |
|
|
| ## JSONL Schema |
|
|
| Minimal record: |
|
|
| ```json |
| {"text":"...","domain":"code_fim","difficulty":"medium","meta":{"lang":"python"}} |
| ``` |
|
|
| Recommended metadata: |
|
|
| ```json |
| { |
| "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: |
|
|
| ```text |
| <|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>{middle} |
| ``` |
|
|
| Secondary order: |
|
|
| ```text |
| <|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. |
|
|