Chiboard-1 M2

Final 350M Chiboard M2 model for Chinese pinyin-to-Hanzi conversion and revision. It was initialized from johnbean393/chiboard-1-s1 and trained with correctness-gated, off-policy distillation from johnbean393/chiboard-1-t1.

This is the final M2 artifact and has completed the full validation protocol: one million training examples, integrity checks, and four frozen 140K SGLang evaluations. Validation-complete does not mean statistically proven superior to S1: its final point estimate is directionally better, but the predeclared 95% confidence interval includes zero and the superiority gate did not pass.

Prompt format

<|startoftext|>{committed_context}<|reserved_6|>{raw_pinyin}<|reserved_7|>{display}<|reserved_8|>{target}<|im_end|>

The tokenizer adds exactly one BOS. At inference time, stop the prompt after <|reserved_8|> and greedily generate through <|im_end|>.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "johnbean393/chiboard-1-m2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

committed_context = ""
raw_pinyin = "nihao"
display = ""
prompt = (
    f"{committed_context}<|reserved_6|>{raw_pinyin}"
    f"<|reserved_7|>{display}<|reserved_8|>"
)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=True).to(model.device)
outputs = model.generate(
    **inputs,
    do_sample=False,
    max_new_tokens=96,
    eos_token_id=tokenizer.convert_tokens_to_ids("<|im_end|>"),
    pad_token_id=tokenizer.pad_token_id,
)
completion = outputs[0, inputs.input_ids.shape[1]:]
print(tokenizer.decode(completion, skip_special_tokens=True))

For a pure-pinyin active buffer, display is empty. For revision use, display contains the currently displayed Hanzi text to be corrected.

Training

  • Student initialization and frozen retention reference: johnbean393/chiboard-1-s1 at ac4e8c3885ef1a0ad5b3f90a1e4c5639ae669edd.
  • Teacher: johnbean393/chiboard-1-t1 at 4086865d8813a01909a420579ee7b15821bf80b0.
  • Exposure: 500,000 plain + 500,000 revision examples, balanced and document-disjoint from the training shadow evaluation.
  • Gold NLL on every completion token, including EOS.
  • Teacher candidate-set forward KL only where T1's top token is gold and frozen S1's top token is not gold.
  • Frozen-S1 retention KL on S1-correct tokens.
  • Candidate/retention top-k 8; teacher temperature 2.0; teacher weight 1.0; retention temperature 1.0; retention weight 0.1.
  • Peak LR 3e-7, 2% warmup, cosine decay to 3e-8 over 30,000 examples, then held at 3e-8 through 1,000,000 examples.
  • 7,810 optimizer updates; three isolated clipped updates; no consecutive clipping or numerical instability.

The complete sanitized configuration and lineage are in training_summary.json.

Chiboard evaluation

The model was evaluated using the frozen johnbean393/chiboard-1-eval campaign sample: 100,000 plain and 40,000 revision rows, seed 20260714. Decoding used SGLang 0.5.9, BF16, greedy generation, the native model implementation, default FA3 attention, and shuffled request order.

Cohort Exact match CER Delta EM vs S1 Delta CER vs S1
Plain 54.9171% 0.133746 +0.0757 pp -0.0350 pp
Revision 54.6658% 0.076984 -0.0134 pp -0.0432 pp
Hard ambiguity 52.0561% 0.139144 +0.0839 pp -0.0337 pp

Combined utility versus S1 was +0.258 pp, with a 95% paired document-bootstrap CI of [-0.019, +0.546] pp. The gate verdict was FAIL because its lower bound did not exceed zero. There were no non-inferiority guard violations.

The exact SGLang manifest, report, and gate verdict are included under evaluation/.

Weights

  • Format: safetensors
  • Tensor file size: 708,984,464 bytes
  • SHA-256: 427331f979b1909bf400e94e43828bca397e97d03a0b68e103d3b2dd07ca85b8

Training telemetry: W&B run.

Downloads last month
108
Safetensors
Model size
0.4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for johnbean393/chiboard-1-m2

Finetuned
(1)
this model

Datasets used to train johnbean393/chiboard-1-m2