Downloads · 30 days
5
0% of all-time downloads
Ippoboi/email-summarizer-t5
email-summarizer-t5 is a machine learning model from Ippoboi. 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 apache-2.0.
A fine-tuned FLAN-T5-small model for email classification, optimized for on-device inference in mobile apps using ONNX Runtime.
Downloads · 30 days
5
0% of all-time downloads
All-time downloads
38.7K
Public
Parameters
77M
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.2 GB · 42%
From the Hugging Face model README
A fine-tuned FLAN-T5-small model for email classification, optimized for on-device inference in mobile apps using ONNX Runtime.
This model classifies emails into 5 categories and determines if action is required:
| Category | Description |
|---|---|
| PERSONAL | 1:1 human communication, social messages |
| NEWSLETTER | Marketing, promotions, subscribed content |
| TRANSACTION | Orders, receipts, payments, confirmations |
| ALERT | Security notices, important notifications |
| SOCIAL | Social network notifications, community updates |
CATEGORY | ACTION/NO_ACTION | Brief summary
Example:
Input: "Subject: Your order has shipped\n\nBody: Your order #12345 is on its way..."
Output: "TRANSACTION | NO_ACTION | Order shipment confirmation for #12345"
| Attribute | Value |
|---|---|
| Base Model | google/flan-t5-small |
| Parameters | ~80M |
| Architecture | T5 Encoder-Decoder |
| ONNX Size | 357 MB (encoder: 141 MB, decoder: 232 MB) |
| Latency | ~79ms (iPhone, CPU) |
| Max Sequence | 512 tokens |
import { InferenceSession } from 'onnxruntime-react-native';
const encoder = await InferenceSession.create('encoder_model.onnx');
const decoder = await InferenceSession.create('decoder_model.onnx');
// Tokenize input, run encoder, greedy decode
from transformers import T5ForConditionalGeneration, T5Tokenizer
model = T5ForConditionalGeneration.from_pretrained("ippoboi/gmail-classifier")
tokenizer = T5Tokenizer.from_pretrained("ippoboi/gmail-classifier")
input_text = "Classify this email: Subject: Meeting tomorrow\n\nBody: Can we reschedule?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: "PERSONAL | ACTION | Request to reschedule meeting"
| File | Size | Description |
|---|---|---|
encoder_model.onnx | 141 MB | ONNX encoder |
decoder_model.onnx | 232 MB | ONNX decoder |
tokenizer.json | 2.4 MB | SentencePiece tokenizer |
config.json | 2 KB | Model configuration |
Apache 2.0