GECToR RoBERTa base (5k) โ ONNX export
ONNX exports of gotutiyan/gector-roberta-base-5k,
packaged for Silent Voice, a local-first
dictation app for Windows. It runs the model on CPU through ONNX Runtime to underline
grammar mistakes as you type.
โ ๏ธ Licence โ non-commercial only
The upstream model card for gotutiyan/gector-roberta-base-5k states:
Only non-commercial purposes.
That restriction carries over to these files. They are a format conversion of those weights, not a new model, so this repo cannot grant broader rights than the original. Do not use them commercially.
Note that Silent Voice itself is MIT-licensed. That covers the application code only โ this model is an optional download with its own terms, and is not bundled with the app.
Credit
- GECToR: Omelianchuk, Atrasevych, Chernodub & Skurzhanskyi, GECToR โ Grammatical Error Correction: Tag, Not Rewrite (BEA 2020) โ https://aclanthology.org/2020.bea-1.16/
- This checkpoint is an unofficial reimplementation by gotutiyan.
Variants
| File | Size | Notes |
|---|---|---|
gector-int8.onnx |
~122 MB | Dynamic INT8 (QUInt8) weights. Default. |
gector.onnx + gector.onnx.data |
~488 MB | FP32. External-data format โ both files required, kept side by side. |
Supporting files, needed by either variant:
| File | Size | Notes |
|---|---|---|
tokenizer.json |
~3.4 MB | RoBERTa BPE tokenizer |
labels.txt |
~85 KB | 5001 edit tags, index-aligned to the label head |
verb-form-vocab.txt |
~4.2 MB | verb inflection table for $TRANSFORM_VERB_* tags |
Signature
inputs input_ids [batch, sequence] int64
attention_mask [batch, sequence] int64
outputs label_logits [batch, sequence, 5001]
detect_logits [batch, sequence, 2]
labels.txt is ordered to match the label_logits axis, index 0 being <OOV> and index 1
$KEEP. Detection classes are $CORRECT (0) and $INCORRECT (1).
Reproducing
Exported with gector-work/export_gector.py in the Silent Voice repo: torch.onnx.export
for the FP32 graph, then onnxruntime.quantization.quantize_dynamic(weight_type=QUInt8)
for the INT8 build.