pszemraj commited on
Commit
7b7a90f
·
1 Parent(s): 3197057

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -2
README.md CHANGED
@@ -90,7 +90,8 @@ print(results)
90
 
91
  **For Batch Inference:** see [this discussion thread](https://huggingface.co/pszemraj/flan-t5-large-grammar-synthesis/discussions/1) for details, but essentially the dataset consists of several sentences at a time, and so I'd recommend running inference **in the same fashion:** batches of 64-96 tokens ish (or, 2-3 sentences split with regex)
92
 
93
- - I made a simple notebook illustrating batch inference [here](https://colab.research.google.com/gist/pszemraj/b84298a6554673e7a3617f2399e44181/grammar-correction-in-batch-mode-flan-t5-l.ipynb)
 
94
 
95
 
96
 
@@ -124,7 +125,7 @@ Obviously, this section is quite general as there are many things one can use "g
124
  > An example of this model running on CPU with beam search:
125
 
126
  ```
127
- original response:
128
  ive heard it attributed to a bunch of different philosophical schools, including stoicism, pragmatism, existentialism and even some forms of post-structuralism. i think one of the most interesting (and most difficult) philosophical problems is trying to let dogs (or other animals) out of cages. the reason why this is a difficult problem is because it seems to go against our grain (so to
129
  synthesizing took 306.12 seconds
130
  Final response in 1294.857 s:
 
90
 
91
  **For Batch Inference:** see [this discussion thread](https://huggingface.co/pszemraj/flan-t5-large-grammar-synthesis/discussions/1) for details, but essentially the dataset consists of several sentences at a time, and so I'd recommend running inference **in the same fashion:** batches of 64-96 tokens ish (or, 2-3 sentences split with regex)
92
 
93
+ - it is also helpful to **first** check whether or not a given sentence needs grammar correction before using the text2text model. You can do this with BERT-type models fine-tuned on CoLA like `extattack/roberta-base-CoLA`
94
+ - I made a notebook demonstrating batch inference [here](https://colab.research.google.com/gist/pszemraj/6e961b08970f98479511bb1e17cdb4f0/batch-grammar-check-correct-demo.ipynb)
95
 
96
 
97
 
 
125
  > An example of this model running on CPU with beam search:
126
 
127
  ```
128
+ Original response:
129
  ive heard it attributed to a bunch of different philosophical schools, including stoicism, pragmatism, existentialism and even some forms of post-structuralism. i think one of the most interesting (and most difficult) philosophical problems is trying to let dogs (or other animals) out of cages. the reason why this is a difficult problem is because it seems to go against our grain (so to
130
  synthesizing took 306.12 seconds
131
  Final response in 1294.857 s: