Downloads · 30 days
115
9% of all-time downloads
rabden/t5-tiny-gec-hone
t5-tiny-gec-hone is a machine learning model from rabden. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Tiny grammar correction model exported to ONNX for Transformers.js v3. Based on visheratin/t5-efficient-tiny-grammar-correction.
Downloads · 30 days
115
9% of all-time downloads
All-time downloads
1.2K
Public
Repo size
297 MB
Likes
1
Public
Click a slice to open those files.
.onnx161 MB · 99%
From the Hugging Face model README
Tiny grammar correction model exported to ONNX for Transformers.js v3. Based on visheratin/t5-efficient-tiny-grammar-correction.
d_model=256, num_heads=4import { pipeline } from '@huggingface/transformers';
const corrector = await pipeline('text2text-generation', 'rabden/t5-tiny-gec-hone', {
quantized: true,
dtype: 'q8',
});
const result = await corrector('he go to school yesterday', {
max_new_tokens: 64,
temperature: 0,
do_sample: false,
});
// "He went to school yesterday."
Measured on CPU (Node.js, ONNX Runtime, INT8 quantized):
| Input | Output | Time |
|---|---|---|
| he go to school yesterday | He went to school yesterday. | ~115ms |
| she dont like apples | She doesn't like apples. | ~47ms |
| i have went to the store | I have been to the store. | ~40ms |
| they was running fast | They were running fast. | ~30ms |
First-load from HuggingFace Hub: ~18s / Cached load: ~0.7s
| File | Size |
|---|---|
onnx/encoder_model.onnx | 43.5 MB |
onnx/encoder_model_quantized.onnx | 11.0 MB |
onnx/decoder_model_merged.onnx | 78.9 MB |
onnx/decoder_model_merged_quantized.onnx | 19.9 MB |
config.json | — |
tokenizer.json | 2.3 MB |
The ONNX export uses a custom NonGrowingCache for cross-attention to prevent KV cache doubling across decoder steps. Standard DynamicCache concatenates past and new encoder keys, causing a shape mismatch in cross-attention position bias on the second decoder step.