structured-cpt / README.md
domofon's picture
Upload folder using huggingface_hub
4f5dacb verified
|
Raw History Blame Contribute Delete
1.97 kB
---
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`.