Proximity Grammar Corrector (T5-small)

A small fine-tuned T5-small model for English grammar correction. Part of the Proximity project โ€” a lightweight background tool that fixes grammar via a global hotkey.

What this model does

Takes a sentence with grammar mistakes and outputs a corrected version. Examples:

Input Output
She dont like going to the store. She doesn't like going to the store.
He are moving here. He is moving here.
I has went to the market yesterday. I have gone to the market yesterday.
They was happy about they new house. They were happy about their new house.

What this model does NOT do

  • It is not a chat model. It will not hold a conversation or answer questions.
  • It is not a style/tone rewriter. It targets grammatical correctness, not voice or wording improvements.
  • It struggles with some irregular verb forms not well represented in training data (e.g. "drinked" instead of "drank" was not corrected in testing).
  • It is trained on a small dataset (~6,000 sentence pairs), so coverage of rare or complex grammatical errors is limited.

Training details

  • Base model: t5-small (~60M parameters)
  • Dataset: Owishiboo/grammar-correction (~6,000 ungrammatical โ†’ grammatical sentence pairs)
  • Epochs: 6
  • Final train loss: 0.1685
  • Final eval loss: ~0.186

Usage

from transformers import T5Tokenizer, T5ForConditionalGeneration

tokenizer = T5Tokenizer.from_pretrained("EnderAir/proximity")
model = T5ForConditionalGeneration.from_pretrained("EnderAir/proximity")

text = "grammar: He are moving here."
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=64, num_beams=5)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# "He is moving here."

Note: always prefix input text with "grammar: " โ€” this is the T5 task prefix convention used during training.

License

Apache 2.0

Downloads last month
27
Safetensors
Model size
60.5M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for EnderAir/proximity

Finetuned
(2304)
this model