YAML Metadata Warning: The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

Grammar Correction Model

This model is fine-tuned to correct grammatical errors in English text. It's based on T5 and specifically trained on essay correction data.

Model Description

  • Model Type: T5
  • Task: Grammar Correction
  • Training Data: Custom essay dataset with grammatical errors and corrections
  • Output: Grammatically corrected text

Usage

from transformers import T5ForConditionalGeneration, T5Tokenizer

# Load model and tokenizer
model = T5ForConditionalGeneration.from_pretrained("Tegence/grammar-correction-model")
tokenizer = T5Tokenizer.from_pretrained("Tegence/grammar-correction-model")

# Prepare input (add the prefix "correct grammar: ")
incorrect_text = "She dont like to eat vegetables but she like fruits."
input_text = f"correct grammar: {incorrect_text}"

# Tokenize and generate
input_ids = tokenizer(input_text, return_tensors="pt").input_ids
outputs = model.generate(input_ids)
corrected_text = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(corrected_text)
# Expected output: "She doesn't like to eat vegetables but she likes fruits."

Limitations

  • Works best with English text
  • Performance may vary for technical or domain-specific content
  • Very long or complex sentences may be challenging to correct

Citation

If you use this model in your research, please cite:

@misc{grammar-correction-model,
  author = {AdmitEase},
  title = {Grammar Correction Model},
  year = {2025},
  publisher = {Hugging Face},
  howpublished = {\url{https://huggingface.co/Tegence/grammar-correction-model}}
}
Downloads last month
18
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Tegence/grammar-correction-model