kotoshu/grammar-fr v0.1.0

Fully local French grammar correction model for the ≀250 MB weight class (run anywhere, CPU real-time, no network).

  • Architecture: GECToR-style token tagger (5,000-label closed vocab) with iterative apply-and-retag decoding, on a microsoft/mdeberta-v3-base encoder.
  • Vocab pruning: 251k β†’ 75,390 pieces (French corpus-active + specials + byte-fallback), weight-truth-verified remap β€” int8 ONNX 197.2 MB.
  • Training: 245k GLM-5.3-Flash-verified French corrections (exact-restore gate, 50.7% yield β€” our highest) from typed corruption packs (ser/estar-class auxiliary confusion is es-specific; fr packs: gender/number agreement, contractions, homophones, missing elisions); two-stage differential-LR, bf16.
  • Runtime: pure-Ruby tokenization (SpmBpe port, fixture-frozen) + ONNX Runtime; milliseconds per sentence on a laptop CPU.

Evaluation (independently judged, no official benchmark claimed)

No licensable public French GEC benchmark is available to us, so we report a held-out judge study:

Measure (2,000 held-out clean sentences) Result
Left unchanged 77.4%
LLM-judge (500-sample): improved 5.4%
LLM-judge (500-sample): harmed 1.6%
Content edits judged beneficial 27/35 (77%)

A notably active and accurate corrector: it changes more text than our German model and 77% of those content edits are judged genuine improvements.

Files

All files ship in this repo: gec-tagger.int8.onnx (197.2 MB), labels.json, pieces.json, charsmap.json.

License

CC-BY-NC-SA-4.0 (research line). Apache-2.0 commercial line for English: kotoshu/grammar-en-cc.

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