CoolFace
Modelpublic

akashsomanai/grammar-corrector-gemma-3-270m-it

sourceHugging Facegemmaupdated 7mo agoView on Hugging Face
1likes27downloads
Model Card

Grammar Corrector โ€“ Gemma 3 270M (IT)

This is a fine-tuned model based on google/gemma-3-270m-it, trained for grammatical error correction (GEC) in English text.

The model rewrites input sentences to correct grammatical mistakes while preserving the original meaning.


๐Ÿง  Model Details

  • โ€”Base model: google/gemma-3-270m-it
  • โ€”Task: Grammatical Error Correction
  • โ€”Fine-tuning method: QLoRA (parameter-efficient fine-tuning)
  • โ€”Framework: Hugging Face TRL (Supervised Fine-Tuning)

๐Ÿ“š Training Data

The model was fine-tuned on a grammar correction dataset containing pairs of:

  • โ€”grammatically incorrect input text
  • โ€”corrected target text

The data was formatted in a chat-style structure with system, user, and assistant roles.


๐Ÿš€ Usage

python
from transformers import pipeline

pipe = pipeline(
    "text-generation",
    model="akashsomanai/grammar-corrector-gemma-3-270m-it"
)

pipe("She go to office yesterday")