Fine-Tuned FLAN-T5 Seq2Seq Model
High-Precision Grammatical Error Correction
Trained on 100,000 sentence pairs (80k train / 10k val / 10k test) to automatically detect and rectify grammatical, structural, and agreement errors in English prose.
BLEU Score
0.6869
Test Set Evaluation
GLEU Score
0.8311
Grammar Error Metric
ROUGE-1
0.8819
Unigram Overlap
ROUGE-L
0.8748
Longest Common Seq
Dataset Size
100k
Sentence Pairs
Input Text
Try Pre-set Error Examples:
"She go to college..."
"He have a car..."
"Yesterday I go..."
"They is going..."
Corrected Output & Diff
Enter a sentence on the left and click "Correct Grammar" to view real-time correction & diff.
Developer API Integration
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("anuvid/ai-grammar-correction-model")
model = AutoModelForSeq2SeqLM.from_pretrained("anuvid/ai-grammar-correction-model")
prompt = "grammar: She go to college every day."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=128, num_beams=4)
corrected = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(corrected) # Output: "She goes to college every day."