0C Japanese reranker, Mozc-pack variant

Cross-encoder reranker for Japanese kana-to-kanji conversion. It scores one candidate surface at a time against the decoded left and right context and lets the lattice decoder combine that score with the statistical word and connection costs.

This is the Mozc-pack variant (public-core weight path). The shipped jeffpeng3/0c-ja-reranker model is a different, CC BY-SA 4.0 artifact and is not replaced by this repository.

Files

File Bytes SHA-256
model.int8.onnx 34,268,584 dcc2f316ed003feb08191d2342921e4fed3dfcb255bbc61c561b0c2843c65343
model.onnx 135,613,414 cb43bb8d628108c4f2ed6944d36594c77f630173dfa675b01fd2a1caa1d0e3d8
tokenizer.model 614,451 b25260c9c3d90a754c719e62eea6b8125f08448d48dd4d1755c18edbd00e2078
manifest.json see the file verifies the ONNX graph, parity, latency and licence blocks

model.int8.onnx is dynamic-qint8 (no calibration); model.onnx is fp32. Both take input_ids and attention_mask as int64 [batch, seq] and return float32 [batch]. Batch and sequence axes are dynamic.

Architecture and deployment layout

family transformer encoder, 8 layers, d_model 512, 8 heads, FFN 1024
parameters 33,864,193
vocabulary 32,768 SentencePiece pieces (tokenizer.model)
trained positions 120 context tokens per side, seq 244, candidate at slot 122
deployed layout 60 tokens per side, seq 124, candidate at slot 62
absolute positions right-anchored: BOS 0, left 61..120, <eos> 121, candidate 122, <eos> 123, right 124..183
pooling scalar head reads the candidate slot

Keeping the trained absolute positions while shortening the context costs 0.15 points on the benchmark; feeding seq 124 with default arange positions does not.

Quality

Benchmark: homophone-mozc-v1, built from the public-core corpus and the Mozc lexicon pack. 8,000 validation and 8,000 test groups, real corpus contexts, 3 to 8 candidates per group, modern-500 and hard-cases held out.

split top-1 top-5 MRR
validation (deployment layout, seq 124) 83.96% 99.89% 0.9067
test (deployment layout, seq 124) 84.36% 99.76% 0.9090
validation (training layout, seq 244) 84.51% 99.90% 0.9098

The same benchmark scores the current CC BY-SA shipping checkpoint at 68.25% (validation, deployment layout), so the Mozc candidate set is what this model was trained for.

modern-500 conversion measurement (important)

Measured with jc-ime, --pack ja-lexicon-mozc-v2.pack, reranker on:

setting top-1 top-5 p50 timeout
--rerank off 86.0% 98.0% 3.5 ms 0%
this model, --rerank on 82.0% 95.0% 33.4 ms 0.2%
previous model, --rerank on 82.0% 95.2% 38.7 ms 4.4%

Reranking still regresses modern-500 top-1 (86.0% to 82.0%). Keep reranking opt-in and off by default. hard-cases is unchanged at 54.3% top-1 (top-5 91.4%, p50 24.1 ms).

The reason is on the decoder side: the cost delta added to the lattice is the raw score gap with scale 1.0, while dictionary costs are in the thousands. Only nearly tied candidate groups can change the Viterbi path, and the model's accuracy on those groups is not yet better than the statistical order. The report in the training repository (docs/reports/P2-26-mozc-rerank.md) has the full analysis.

Use with jc-ime

export JC_JA_MODELS=/path/to/model-set   # manifest.json -> ja-rerank dir
export ORT_DYLIB_PATH=/path/to/libonnxruntime.so.1.32.0
jc-cli eval ja --corpus modern-500 --rerank on \
  --pack /path/to/ja-lexicon-mozc-v2.pack

The model-set manifest:

{
  "schema": "jc.model-set/1",
  "models": {
    "ja-rerank": { "dir": "reranker-mozc", "vocab": "tokenizer.model" }
  }
}

--pack is the lexicon pack; the reranker itself is selected through JC_JA_MODELS.

Training

  • Initial weights: P2-23E public-core pilot, 6,000 steps.
  • Finetune: 2,000 steps, batch 64, lr 6e-4 (cosine, 300 warmup), bf16, listwise loss, seed 20261118, 128,000 groups.
  • Data: homophone-mozc-v1 train split, 120,000 groups. Corpus text is public-core only; candidate readings and costs are Mozc. No CC BY-SA text, no modern-500, no hard-cases.
  • Hardware: NVIDIA GB10, 18 minutes.

Licence

CC BY 4.0, https://creativecommons.org/licenses/by/4.0/

Attribution and source hashes are in NOTICE. The Mozc dictionary is BSD 3-Clause (Copyright 2010-2018 Google Inc.) and is used as the candidate reading/cost source, not as training text.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support