chiboard-1-sft / README.md
johnbean393's picture
Update README.md (2026-07-09 build, empty-display serving contract)
c572093 verified
|
Raw
History Blame Contribute Delete
11.6 kB
---
language:
- zh
license:
- apache-2.0
- mit
- cc-by-sa-4.0
- other
license_note: >-
Aggregated from multiple sources (see "Source data"). Contains three
redistributable families — Apache-2.0, MIT, and cc-by-sa-4.0 (`cmrc2018`,
whose share-alike clause requires cc-by-sa-4.0 redistribution) — plus a
**research-only** component derived from PersonalDialog (Zheng et al. 2019).
Because of the research-only component, the aggregate is intended for
**research / non-commercial use**. Treat the whole dataset as research-only
and cc-by-sa-4.0 share-alike.
multilinguality:
- monolingual
size_categories:
- 10M<n<100M
task_categories:
- text-generation
tags:
- pinyin
- chinese
- ime
- input-method
- pinyin-to-hanzi
- sequence-to-sequence
- sft
- instruction-tuning
configs:
- config_name: default
data_files:
- split: train
path: train-*.parquet
- split: test
path: test.parquet
- split: dev
path: dev.parquet
dataset_info:
features:
- name: split
dtype: string
- name: committed_context
dtype: string
- name: raw_pinyin
dtype: string
- name: display
dtype: string
- name: target
dtype: string
- name: source_text
dtype: string
- name: source_pinyin
dtype: string
- name: source
dtype: string
- name: source_document_id
dtype: string
- name: variant
dtype: string
- name: noise
struct:
- name: types
sequence: string
- name: edit_count
dtype: int64
- name: hard_ambiguity_terms
sequence: string
- name: length_chars
dtype: int64
- name: id
dtype: string
splits:
- name: train
num_examples: 54535518
- name: test
num_examples: 1135059
- name: dev
num_examples: 1139609
download_size: 11000000000
num_examples: 56810186
---
# chiboard-1-sft
A large-scale supervised fine-tuning dataset for **Chinese IME (pinyin-to-Hanzi) text conversion**. Given a committed Chinese context plus a pinyin/mixed active buffer, the model must predict the Chinese target text. It is designed to train and evaluate models that power a rolling decode-window IME, where text is committed in chunks and the active region is retyped/edited as the user goes.
- **Total rows:** 56,810,186 (train 54,535,518 · test 1,135,059 · dev 1,139,609)
- **Built:** 2026-07-09 (seed `20260703`; rows globally shuffled)
- **Format:** Parquet — 30 train shards (~349 MB each) + 1 dev + 1 test (~11 GB total), plus JSONL inspection samples and a QA report
- **Tokenizer:** Loss-token metrics measured with `LiquidAI/LFM2.5-350M-Base`
- **Language:** Mandarin Chinese (`zh`) with romanized pinyin inputs
## Serving contract: empty `display` means `display == raw_pinyin`
For every pure-pinyin row (variants `joined_pinyin`, `noisy_pinyin`, `punctuation_removed`, `ascii_punctuation`, `syllable_spaced_pinyin`, and any other row whose on-screen state is identical to the raw buffer) the `display` column — and therefore the `<|reserved_7|>` slot in the serialized prompt — is **empty**. **79.7%** of rows use this convention.
**Consumers (training script, demo app, runtime) must send an empty `<|reserved_7|>` slot whenever the on-screen text equals the raw pinyin buffer.** A model trained on this build sees populated `display` only when it differs from `raw_pinyin` (mixed 汉字+pinyin, mid-syllable with 汉字 prefix, already-Chinese, and noisy rows whose screen state diverged). Sending the duplicated display string is **out-of-distribution**.
The reserved tokens are always emitted, so the frame layout is unchanged:
```
<|startoftext|>…<|reserved_6|>zhege<|reserved_7|><|reserved_8|>这个<|im_end|>
```
See also `metadata.json` → `serving_contract`.
## Scale
| Rows | Prompt tokens | Loss tokens | Loss fraction | Short token share (2–30 chars) | Empty `display` share |
|---:|---:|---:|---:|---:|---:|
| 56,810,186 | 3.89B | 1.29B | 34.6% | 49.4% | 79.7% |
Loss-token and prompt-token counts are for the SFT partition; measured with `LiquidAI/LFM2.5-350M-Base`. Empty-display rows save ~1.74B prompt tokens vs duplicating `raw_pinyin` in the display slot.
### Splits
| split | rows | share |
|---|---:|---:|
| train | 54,535,518 | 96.0% |
| dev | 1,139,609 | 2.0% |
| test | 1,135,059 | 2.0% |
## Prompt format
Rows are formatted into the following template before being fed to the model:
```
<|startoftext|>{committed_context}<|reserved_6|>{raw_pinyin}<|reserved_7|>{display}<|reserved_8|>{target}<|im_end|>
```
- `committed_context` — trailing (≤64 chars) fully-converted 汉字 retired by the rolling decode window; empty for most short rows.
- `raw_pinyin` — the raw typed bytes of the active region (source of truth).
- `display` — what is on screen: provisional 汉字 + unconverted tail. **Empty when identical to `raw_pinyin`** (see serving contract above).
- `target` — gold conversion of the active region (loss is computed on `target` + `<|im_end|>` only).
## Task formulation
Boundary semantics: the committed/active boundary follows *rolling decode-window retirement* — there are no explicit user-commit events. Retirement cuts are sentence-final only (`context_sentence_boundary_share = 1.0`). Deployment window sizes are 40–100 chars; **30.64%** of rows have `len(display)` in that range.
For each row the model receives `committed_context`, `raw_pinyin`, and `display` (possibly empty), and must produce `target`.
## Row schema
| field | type | description |
|---|---|---|
| `split` | string | `train` / `test` / `dev` |
| `committed_context` | string | Finalized Chinese text left of the cursor |
| `raw_pinyin` | string | Pure pinyin input buffer |
| `display` | string | Mixed pinyin+Chinese on-screen rendering; **empty when equal to `raw_pinyin`** |
| `target` | string | Ground-truth Chinese output |
| `source_text` | string | Original Chinese source text the row was derived from |
| `source_pinyin` | string | Pinyin of the source text |
| `source` | string | Source corpus id (see *Source data*) |
| `source_document_id` | string | Stable document id; used for split-leakage control |
| `variant` | string | Input transformation variant (see *Variants*) |
| `noise` | object | `{types: [...], edit_count: int}` — injected typos / mid-text edits |
| `hard_ambiguity_terms` | sequence[string] | Hard-ambiguity pinyin terms present |
| `length_chars` | int64 | Character length of the row |
| `id` | string | Unique row id |
### Variants
| variant | share | rows | noise rate |
|---|---|---|---|
| `joined_pinyin` | 0.5487 | 31,172,520 | 0.0 |
| `mixed_chinese_pinyin` | 0.1551 | 8,811,285 | 0.0994 |
| `noisy_pinyin` | 0.0771 | 4,380,150 | 1.0 |
| `mid_syllable` | 0.0681 | 3,869,283 | 0.1141 |
| `punctuation_removed` | 0.0613 | 3,480,239 | 0.0 |
| `ascii_punctuation` | 0.0431 | 2,449,231 | 0.0 |
| `syllable_spaced_pinyin` | 0.0280 | 1,589,316 | 0.0 |
| `already_chinese` | 0.0186 | 1,058,162 | 0.0 |
### Length distribution (chars)
| bucket | share | rows |
|---|---|---|
| 2–8 | 0.2560 | 14,541,379 |
| 9–30 | 0.6058 | 34,417,375 |
| 31–120 | 0.1115 | 6,334,422 |
| 121–500 | 0.0225 | 1,275,407 |
| 501–1500 | 0.0036 | 206,767 |
| 1501–3500 | 0.0006 | 34,836 |
### Active region length (`display`, chars)
| length (chars) | rows | share |
|---|---:|---:|
| 1–9 | 2,685,513 | 4.7% |
| 10–19 | 12,245,986 | 21.6% |
| 20–39 | 18,781,726 | 33.1% |
| 40–69 | 12,922,293 | 22.7% |
| 70–100 | 4,482,110 | 7.9% |
| 101–160 | 2,481,543 | 4.4% |
| 161–300 | 2,316,209 | 4.1% |
| 301+ | 894,806 | 1.6% |
### Hard-ambiguity coverage
| term | rows |
|---|---:|
| `de_di_de` | 22,485,533 |
| `shi` | 15,874,452 |
| `zai` | 7,761,233 |
| `yao` | 5,473,893 |
| `ta` | 3,325,425 |
| `zuo` | 3,081,187 |
| `jiao` | 1,659,343 |
| `xian` | 1,513,147 |
| `shijian` | 797,283 |
| `qishi` | 430,447 |
| `changshi` | 58,936 |
| `hangxing` | 39,425 |
8,194 contrastive near-pair groups mined for disambiguation stress-testing.
## Dataset properties
### Coverage
- Top-50,000 headwords: 50,000/50,000 meet ≥200 train-row quota.
- Top-10,000 headwords: 10,000/10,000 meet ≥1,000 train-row quota.
### Context & boundaries
- Rows with `committed_context`: 4,191,092 (7.38%).
- Context sentence/turn boundary alignment: 100%.
- Retirement cuts: 1,894,699 (all sentence-final).
- Intra-chunk retirement share: 27.19%.
- Conversational single-turn share: 99.45%.
### Mixed-mode & noise
- Mixed tail rows: 16,019,818 · mid-text edit rows: 3,291,800 (edit share 17.05%).
- Noisy rows (any injected edit): 5,697,476 (10.0%).
- ü→v vs ü→u: u-form 566,155 · v-form 5,098,493 (u-share 10.0%).
- All noise-free `mid_syllable` targets with a Latin tail end in a genuinely incomplete final syllable.
### Slicing & multiplicity
- Slice rows: 7,017,910 (cut from long formal entries at sentence-preferred boundaries).
- Up to 4 distinct rows per source pool entry (conversational-first assignment).
- 1,191,396 exact prompt+target duplicates dropped.
### Register (target char mass by source)
Conversational sources carry **43.0%** of target char mass.
| source | rows | target chars | char share |
|---|---:|---:|---:|
| `chinesewebtext2_hq` | 7,507,058 | 467.1M | 34.5% |
| `lccc_large` | 30,858,374 | 407.2M | 30.1% |
| `dureader_retrieval_corpus` | 4,311,996 | 260.0M | 19.2% |
| `personal_dialog` | 12,834,156 | 159.9M | 11.8% |
| all others | 1,298,602 | 59.5M | 4.4% |
### Split integrity
- Doc-keyed splits: 0 document ids leak across train/dev/test.
- Rows globally shuffled within each split.
## Source data
| source | rows | license | url |
|---|---|---|---|
| `lccc_large` | 30,858,374 | mit | https://huggingface.co/datasets/thu-coai/lccc |
| `personal_dialog` | 12,834,156 | other (research-only) | https://huggingface.co/datasets/silver/personal_dialog |
| `chinesewebtext2_hq` | 7,507,058 | apache-2.0 | https://huggingface.co/datasets/Morton-Li/ChineseWebText2.0-HighQuality |
| `dureader_retrieval_corpus` | 4,311,996 | apache-2.0 | https://huggingface.co/datasets/zyznull/dureader-retrieval-corpus |
| `clapai_sentiment_zh` | 578,628 | apache-2.0 | https://huggingface.co/datasets/clapAI/MultiLingualSentiment |
| `somebreeze_news` | 286,070 | apache-2.0 | https://huggingface.co/datasets/somebreeze/Chinese-news-summery |
| `lccc_dialogue` | 154,574 | mit (derived) | https://huggingface.co/datasets/thu-coai/lccc |
| `dureader_retrieval_queries` | 85,120 | apache-2.0 | https://huggingface.co/datasets/zyznull/dureader-retrieval-corpus |
| `pd_dialogue` | 88,778 | other (research-only) | https://huggingface.co/datasets/silver/personal_dialog |
| `feilongfl_news` | 54,260 | apache-2.0 | https://huggingface.co/datasets/feilongfl/ChineseNewsSummary |
| `cmrc2018` | 51,172 | cc-by-sa-4.0 | https://huggingface.co/datasets/hfl/cmrc2018 |
## Files
- `train-00000.parquet` … `train-00029.parquet` — train split (30 shards, ~349 MB each)
- `dev.parquet` — dev split (~218 MB)
- `test.parquet` — test split (~217 MB)
- `metadata.json` — build metadata, distributions, `serving_contract`, and source manifest
- `qa_report.md` — QA report
- `sample_500.jsonl` — 500-row inspection sample
- `polyphone_sample_500.jsonl` — 500 rows with polyphone characters for manual verification
## Citation
If you use this dataset, please cite the underlying sources listed above, with particular attention to PersonalDialog (Zheng et al., 2019) for the research-only conversational component.