CoolFace
Modelpublic

meetfranz/franz-models

sourceHugging Facemitupdated 6mo agoView on Hugging Face
1likes
Model Card

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:

LabelMeaning
IS_URGENTNeeds attention today
NEEDS_REPLYDirect question or action request to the user
HAS_DEADLINEExplicit or relative deadline mentioned
IS_ACTIONABLEAny action required (broader than NEEDS_REPLY)
IS_INFORMATIONALFYI / status update, no action needed
IS_AUTOMATEDMachine-generated (CI/CD, monitoring, alerts)
IS_NEWSLETTERContent marketing / newsletter
IS_TRANSACTIONALReceipt, invoice, order confirmation

Priority Mapping

Labels are combined into priority tiers in the Franz app:

ConditionPriority
ISURGENT + NEEDSREPLYurgent
IS_URGENTimportant
NEEDSREPLY + ISACTIONABLEimportant
ISNEWSLETTER or ISTRANSACTIONALnoise
IS_AUTOMATED (not urgent)noise
IS_INFORMATIONAL (not urgent/reply)low
Everything elsenormal

Usage

With @huggingface/transformers (Node.js / Electron)

ts
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)

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

PropertyValue
ArchitectureBertForSequenceClassification
Base modelmicrosoft/Multilingual-MiniLM-L12-H384
Hidden size384
Layers12
Attention heads12
Max sequence length512
Vocab size250,037
TokenizerXLMRobertaTokenizer (SentencePiece BPE)
Problem typeMulti-label classification
QuantizationONNX INT8
Model size~113 MB (quantized)

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:

  1. 1.Stage 1 — Heuristics: Fast rules-based classification for obvious cases
  2. 2.Stage 2 — ML (this model): ONNX inference for ambiguous emails (confidence threshold: 0.75)
  3. 3.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