A fine-tuned FLAN-T5-small model for email classification, optimized for on-device inference in mobile apps using ONNX Runtime.
Model Description
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
Output Format
text
CATEGORY | ACTION/NO_ACTION | Brief summary
Example:
text
Input: "Subject: Your order has shipped\n\nBody: Your order #12345 is on its way..."
Output: "TRANSACTION | NO_ACTION | Order shipment confirmation for #12345"
Intended Use
Primary: On-device email triage in mobile apps (iOS/Android)
Runtime: ONNX Runtime React Native
Use case: Prioritizing inbox, filtering noise, surfacing actionable emails
Model Details
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
Training Data
Size: 2,043 training / 256 validation / 255 test examples
Source: Personal Gmail inboxes (anonymized)
Languages: English, French
Labeling: Human-annotated with category + action flag