Haodu Punc 3.5M E6 / 好读中文阅读切分模型

A small character-level residual CNN for locating reading boundaries in Chinese text. These are the FP32 E6 weights deployed by Haodu, trained from scratch, with 3,496,329 parameters. This is a gap-scoring model, not a generative language model and not a standard Transformers architecture.

这个模型为中文长句中的相邻字符间隙打分。好读在此基础上结合自然标点、词语保护、 13 个视觉单位门槛、严格大于 45% 的置信度门槛及递归策略生成阅读意群。

Quick start: one boundary with PyTorch

Download the eight repository files using the Hugging Face web UI. Alternatively, install huggingface_hub and run hf download 77vincent/haodu-punc-3.5M-e6 --local-dir haodu-punc-3.5M-e6. From the downloaded directory, run:

python -m pip install -r requirements.txt
python predict.py '使用神经网络在长句中找到符合人类习惯的断句点'
from modeling_haodu import HaoduBoundaryModel

model = HaoduBoundaryModel.from_pretrained('.')
result = model.predict_boundary('使用神经网络在长句中找到符合人类习惯的断句点')
print(result['left'] + '|' + result['right'])

The helper accepts one already-delimited clause, normalizes with NFKC, folds within-line whitespace and predicts one gap. Its offset refers to normalized Unicode code points. It does not implement the browser's source-offset mapping, clause splitting, minimum-length gate, word protection or recursive decisions. It intentionally returns a single candidate without deciding whether to display it.

For complete reading segmentation, including clause splitting and recursion, see the public Haodu project. This repository provides the model scorer and a Python inference example.

Architecture and training

Property Value
Parameters 3,496,329
Vocabulary 8,192 Unicode characters, including pad and unknown tokens
Channels 192
Residual blocks / convolution layers 8 / 16
Convolution Kernel 3, stride 1, dilation 1
Normalization / activation LayerNorm / tanh-approximate GELU
Gap features left, right, right-minus-left, elementwise product
Weight dtype FP32
Prepared corpus policy unicode-context-v7
Input representation unicode-context-v1, character tokenization
Training optimizer AdamW, learning rate 0.0003
Training filters At least 2 code points on each target side, at most 256 total
Selection Overall validation accuracy; no position or corpus-source weighting
Selected checkpoint E6 at 350,028,702 retained examples within that epoch

Adjacent valid source fragments A and B are concatenated after hiding their separating punctuation. The model learns to recover the hidden gap. Proxy marks are the original source characters ,。;!?…, identified before NFKC. Other symbols can remain context. Numeric commas are protected. Filtering rejects formatting residue and broken fragments without joining across rejected content. These weights use the v7 preparation rules; later v8 filtering changes were not retroactively applied to them.

Training history uses Chinese CLUE TNEWS/CSL/CMRC2018/C3, Chinese Wikipedia, Chinese Multi-Style-Synthetic from Ultra-FineWeb-L3, and Chinese Ultra-FineWeb. The later continuation epochs use additional Chinese Ultra-FineWeb shards. Dataset names describe provenance, not semantic classes or training weights. Original corpora and processed training examples are not redistributed here. Upstream datasets and their component sources retain their own licenses and terms.

Evaluation

Evaluation Result
Complete retained validation examples 2,515,459
Hidden-punctuation top-1 accuracy 91.5428158% (2,302,722 correct)
Frozen 100-case human-reviewed regression, exact complete segmentation 63/100
Same regression, boundary precision / recall / F1 83.92% / 80.29% / 82.06%

The validation result exactly reproduces the selected E6 checkpoint. The 100-case regression uses the unchanged native JS backend at its 45% gate; its answers were frozen on 2026-10-23. These cases have been repeatedly reviewed and some answers informed by earlier model outputs, so this is regression evaluation, not an independent blind benchmark. The regression measures the full Haodu JavaScript pipeline, rather than the single-boundary Python helper. The source sentences are not redistributed in this model repository. The retained validation set has also been reused for model selection. Full E6 test-set evaluation was deferred; no E6 test accuracy is claimed.

Accuracy measures recovery of one hidden source punctuation boundary. It does not certify that all other boundaries are wrong, that a displayed cut is semantically correct, or that 45% softmax confidence is a calibrated probability of readability. Chinese names, technical terms, mixed-language text, unusual formatting and context-dependent syntax can cause poor cuts. A child below the confidence or word-protection gate can remain longer than 13 visual units. Use for reading assistance with human judgment; the scorer is not a general syntactic parser, tokenizer or factual verifier.

Files and license

File Purpose
model.safetensors The 61 FP32 model tensors in native PyTorch layout
config.json Network configuration and input limits
vocabulary.json Character-to-token-ID mapping
modeling_haodu.py Network structure, loading and single-boundary scoring
predict.py Runnable inference example
requirements.txt Python dependencies
README.md Model card and usage instructions
LICENSE Apache-2.0 license text

Optimizer state, training-resume checkpoints and training data are excluded.

Model weights and the accompanying inference code are released under Apache-2.0. Copyright 2026 77vincent. See LICENSE.

Downloads last month
10
Safetensors
Model size
3.5M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train 77vincent/haodu-punc-3.5M-e6