Instructions to use leslyarun/grammatical-error-correction-quantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leslyarun/grammatical-error-correction-quantized with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("leslyarun/grammatical-error-correction-quantized") model = AutoModelForSeq2SeqLM.from_pretrained("leslyarun/grammatical-error-correction-quantized") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,9 +19,9 @@ from optimum.pipelines import pipeline
|
|
| 19 |
|
| 20 |
tokenizer = AutoTokenizer.from_pretrained("leslyarun/grammatical-error-correction-quantized")
|
| 21 |
model = ORTModelForSeq2SeqLM.from_pretrained("leslyarun/grammatical-error-correction-quantized",
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
text2text_generator = pipeline("text2text-generation", model=model, tokenizer=tokenizer)
|
| 27 |
output = text2text_generator("grammar: " + sentence)
|
|
|
|
| 19 |
|
| 20 |
tokenizer = AutoTokenizer.from_pretrained("leslyarun/grammatical-error-correction-quantized")
|
| 21 |
model = ORTModelForSeq2SeqLM.from_pretrained("leslyarun/grammatical-error-correction-quantized",
|
| 22 |
+
encoder_file_name="encoder_model_quantized.onnx",
|
| 23 |
+
decoder_file_name="decoder_model_quantized.onnx",
|
| 24 |
+
decoder_with_past_file_name="decoder_with_past_model_quantized.onnx")
|
| 25 |
|
| 26 |
text2text_generator = pipeline("text2text-generation", model=model, tokenizer=tokenizer)
|
| 27 |
output = text2text_generator("grammar: " + sentence)
|