File size: 1,967 Bytes
4f5dacb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
license: mit
language:
- en
task_categories:
- text-generation
tags:
- pretrain
- continued-pretraining
- structured
- sql
- json
- smollm2
- domofon
pretty_name: Structured CPT (JSON + SQL)
size_categories:
- 1B<n<10B
configs:
- config_name: default
  data_files:
  - split: train
    path: data/*.parquet
---

# Structured CPT - JSON + SQL pretrain documents

SmolLM2-1.7B continued-pretraining shard of structured documents. Each document
is a `<task>` / `<input>` / `<output>` block whose `<output>` is a canonical
JSON object, terminated by the SmolLM2 end-of-text token ``.

Sources:

| source | description | rows | shards | repeat |
|---|---|---:|---:|---:|
| `sql_bmc2` | b-mc2 sql-create-context -> JSON (4 keys, stub explanation) | 392,885 | 1 | 5 |
| `sql_gretelai` | gretelai synthetic_text_to_sql -> JSON (4 keys) | 529,255 | 1 | 5 |
| `sql_hardikch` | hardikch05 100000_text_to_sql -> JSON (question/schema_ddl/sql) | 5,500,000 | 28 | 1 |
| `stackexchange_json` | Stack Exchange -> JSON (title/body/tags) | 836,000 | 5 | 1 |

**Totals:** 7,258,140 rows.

```python
from datasets import load_dataset
ds = load_dataset("domofon/structured-cpt", split="train")
print(ds[0]["text"])
```

## Document shape

```
<task>
...
</task>

<input>
...
</input>

<output>
{...canonical json...}
</output>

```

The JSON inside `<output>` keeps the documented key order and exact
(JSON-escaped) source values. SQL values are copied verbatim from the input.

## Columns

| column | description |
|---|---|
| `id` | unique id `{source}-{index}` |
| `text` | full structured document, trailing `` |
| `text_preview` | first 800 characters of `text` |
| `n_chars` | length of `text` |
| `source` | one of stackexchange_json / sql_gretelai / sql_bmc2 / sql_hardikch |

## Shards

35 parquet files under `data/` (zstd-compressed).

## Identity

Built for the Domofon CPT stack; see sibling datasets `domofon/worldsim-domofon-cpt`
and `domofon/domofon-identity-anchor`.