leslyarun/grammatical-error-correction-quantized
By leslyarun · ↓ 1 · ♥ 1 · Updated 2022-10-28
What's in this repo
This page lists the files in leslyarun/grammatical-error-correction-quantized, including decoder_model_quantized.onnx, decoder_with_past_model_quantized.onnx, encoder_model_quantized.onnx.
- 3 ONNX models (.onnx files)
- 11 files, including 5 .json, 3 .onnx, 1 .md, 1 .model
- Last updated 2022-10-28
ONNX files
| File | Size | Download |
|---|---|---|
| decoder_model_quantized.onnx | — | Download |
| decoder_with_past_model_quantized.onnx | — | Download |
| encoder_model_quantized.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
Get Grammatical corrections on your English text, trained on a subset of c4-200m dataset - ONNX Quantized Model
Use the below code for running the model
from transformers import AutoTokenizer
from optimum.onnxruntime import ORTModelForSeq2SeqLM
from optimum.pipelines import pipeline
tokenizer = AutoTokenizer.from_pretrained("leslyarun/grammatical-error-correction-quantized")
model = ORTModelForSeq2SeqLM.from_pretrained("leslyarun/grammatical-error-correction-quantized",
encoder_file_name="encoder_model_quantized.onnx",
decoder_file_name="decoder_model_quantized.onnx",
decoder_with_past_file_name="decoder_with_past_model_quantized.onnx")
text2text_generator = pipeline("text2text-generation", model=model, tokenizer=tokenizer)
output = text2text_generator("grammar: " + sentence)
print(output[0]["generated_text"])
Model info
transformers
transformers
onnx
t5
text2text-generation
grammar
en
dataset:leslyarun/c4_200m_gec_train100k_test25k
endpoints_compatible
region:us
↓ 1
♥ 1
Created: 2022-10-28
Updated: 2022-10-28
View on Hugging FaceFiles (11)
.gitattributes
README.md
config.json
decoder_model_quantized.onnx
ONNX
decoder_with_past_model_quantized.onnx
ONNX
encoder_model_quantized.onnx
ONNX
ort_config.json
special_tokens_map.json
spiece.model
tokenizer.json
tokenizer_config.json
Related models
More from leslyarun
More models
No task type declared.