ONNX Model Zoo

Meyssa/gector-base-2020

By Meyssa · ↓ 2 · ♥ 0 · Updated 2025-12-29

What's in this repo

This page lists the files in Meyssa/gector-base-2020, including model.onnx, model_quantized.onnx.

  • 2 ONNX models (.onnx files)
  • 12 files, including 6 .json, 2 .onnx, 1 .md, 1 .txt, 1 .data
  • Last updated 2025-12-29

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_quantized.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

GECToR Base 2020 (ONNX)

ONNX quantized version of the original GECToR model from Grammarly for browser-based grammatical error correction with Transformers.js.

Original Model

Conversion Details

  • Format: ONNX
  • Quantization: INT8 (dynamic quantization)
  • Size: ~125MB
  • Converted by: Manual export from PyTorch (AllenNLP format)

How It Works

GECToR uses a token classification approach - instead of generating corrected text, it predicts edit operations for each token:

  • $KEEP - Keep token unchanged
  • $DELETE - Remove token
  • $REPLACE_word - Replace with specific word
  • $APPEND_word - Append word after token
  • $TRANSFORM_* - Apply transformation (case, verb form, etc.)

The model runs iteratively (typically 2-3 passes) until no more edits are predicted.

Usage with Transformers.js

import { pipeline } from '@huggingface/transformers';

const classifier = await pipeline(
  'token-classification',
  'YOUR_USERNAME/gector-base-2020',
  { dtype: 'q8' }
);

const result = await classifier('He go to school yesterday.');
// Returns token predictions with edit tags

Performance

Faster than the 2024 version with slightly lower accuracy. Good balance of speed and quality.

License

Apache 2.0 (following original model license)

Model info

token-classification transformers.js
transformers.js onnx roberta token-classification grammatical-error-correction gector en arxiv:2005.12592 license:apache-2.0 region:us
↓ 2 ♥ 0

Created: 2025-12-29

Updated: 2025-12-29

View on Hugging Face

Files (12)

.gitattributes
README.md
config.json
id2label.json
merges.txt
onnx/model.onnx ONNX
onnx/model.onnx.data
onnx/model_quantized.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models