kotoshu/grammar-es v0.1.0

Fully local Spanish 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,919 pieces, weight-truth-verified remap — int8 ONNX 197.6 MB.
  • Training: 150k GLM-5.3-Flash-verified Spanish corrections (ser/estar, por/para, gender/number agreement, accentuation); two-stage differential-LR, bf16.
  • Runtime: pure-Ruby tokenization (SpmBpe, fixture-frozen) + ONNX Runtime.

Evaluation (independently judged, no official benchmark claimed)

Measure (2,000 held-out clean sentences) Result
Left unchanged 78.5%
LLM-judge (500-sample): improved 2.6%
LLM-judge (500-sample): harmed 4.4%
Content edits judged beneficial 13/35 (37%)

Honest positioning: this is the weakest model in our catalog. Its corrections help more than they harm, but 22% of judged content edits were scored harmful — noticeably noisier than our French model (77% beneficial). We publish it because the catalog position (only fully-local ≤250MB Spanish corrector we know of) has standalone value, and because the judge protocol makes its weakness measurable. A retrain with the expanded corruption packs is queued; the judge study will be repeated and this card updated.

Files

All files ship in this repo: gec-tagger.int8.onnx (197.6 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