meetfranz/franz-models
Franz Email Classifier
Multi-label email classification model used by Franz to automatically prioritize emails.
Fine-tuned from `microsoft/Multilingual-MiniLM-L12-H384` and exported as ONNX INT8 for fast CPU inference in Electron.
Labels
The model predicts 8 binary labels per email:
Priority Mapping
Labels are combined into priority tiers in the Franz app:
Usage
With @huggingface/transformers (Node.js / Electron)
import { pipeline, env } from '@huggingface/transformers'
env.allowLocalModels = true
env.localModelPath = '/path/to/models' // parent dir
const classifier = await pipeline(
'text-classification',
'email-classifier', // subdirectory name
{ dtype: 'int8', device: 'cpu', multi_label: true }
)
const result = await classifier('Re: Urgent: Invoice #4521 due Friday')
// [
// { label: 'IS_URGENT', score: 0.94 },
// { label: 'NEEDS_REPLY', score: 0.12 },
// { label: 'HAS_DEADLINE', score: 0.91 },
// ...
// ]With transformers (Python)
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="meetfranz/franz-models",
top_k=None
)
result = classifier("Re: Urgent: Invoice #4521 due Friday")Model Details
Training
Trained on LLM-generated synthetic email data. No real user emails or personal data were used in training. Labels were bootstrapped via LLM annotation and human-reviewed for quality.
Fine-tuned with multi-label BCE loss, then exported to ONNX with INT8 dynamic quantization.
How Franz Uses This Model
This model is Stage 2 in Franz's three-stage email classification funnel:
- Stage 1 — Heuristics: Fast rules-based classification for obvious cases
- Stage 2 — ML (this model): ONNX inference for ambiguous emails (confidence threshold: 0.75)
- Stage 3 — LLM: Local or cloud LLM for emails below the ML confidence threshold
The model is downloaded on demand when a user first adds an email account to Franz. If unavailable, the app gracefully falls through to Stage 3.
License
MIT
