CoolFace
Modelpublic

pszemraj/flan-t5-xl-grammar-synthesis

sourceHugging Facecc-by-nc-sa-4.0updated 9mo agoView on Hugging Face
10likes260downloads
Model Card

grammar-synthesis: flan-t5-xl

<a href="https://colab.research.google.com/gist/pszemraj/43fc6a5c5acd94a3d064384dd1f3654c/demo-flan-t5-xl-grammar-synthesis.ipynb"> <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/> </a>

This model is a fine-tuned version of google/flan-t5-xl on an extended version of the JFLEG dataset.

<br> <img src="https://i.imgur.com/5QGGF0Z.png" alt="ex"> <br>

Model description

The intent is to create a text2text language model that successfully performs "single-shot grammar correction" on a potentially grammatically incorrect text that could have many errors with the important qualifier that it does not semantically change text/information that IS grammatically correct..

Compare some of the more severe error examples on other grammar correction models to see the difference :)

Limitations

  • —Data set: cc-by-nc-sa-4.0
  • —Model: apache-2.0
  • —currently a work in progress! While probably useful for "single-shot grammar correction" in many cases, check the output for correctness, ok?.

Training procedure

Training hyperparameters

Session One
  • —TODO: add this. It was a single epoch at higher LR
Session Two

The following hyperparameters were used during training:

  • —learning_rate: 4e-05
  • —trainbatchsize: 4
  • —evalbatchsize: 1
  • —seed: 42
  • —distributed_type: multi-GPU
  • —gradientaccumulationsteps: 16
  • —totaltrainbatch_size: 64
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: cosine
  • —lrschedulerwarmup_ratio: 0.02
  • —num_epochs: 2.0