Jarvis Email Intelligence

Custom multi-head email classifier on microsoft/deberta-v3-small.

Heads:

  • category (11): finance, government, newsletters, other, personal, promotions, security, socials, spam, verification_codes, work
  • intent (10): financial_transaction, government_notice, information_update, meeting_request, other, promotional_offer, security_alert, social_notification, task_action, verification_code
  • actionability (5): needs_click, needs_payment, needs_reply, needs_scheduling, none_fyi
  • threat_verdict (5): fraud_bec, impersonated, legitimate, phishing, suspicious
  • attack_vector (6): credential_harvesting, fake_invoice, malicious_link, none, payment_diversion, social_engineering
  • binary: requires_response, display_name_mismatch, urgency_manipulation
  • scores 0-1: importance, urgency, threat, confidence

Files

  • pytorch_model.bin โ€” full state_dict (540MB, fp32)
  • modeling_jarvis.py โ€” model class JarvisEmailIntelligence
  • config.json โ€” dims + label lists
  • label_encoders.pkl โ€” sklearn LabelEncoders (sklearn 1.6.1)
  • label_mappings.json โ€” same labels as JSON

Quick use

import pickle, torch
from transformers import AutoTokenizer
from modeling_jarvis import JarvisEmailIntelligence

REPO = "patelkrish2727/jarvis-email"
tok = AutoTokenizer.from_pretrained("microsoft/deberta-v3-small")
encoders = pickle.load(open("label_encoders.pkl","rb"))

model = JarvisEmailIntelligence(
  model_name="microsoft/deberta-v3-small",
  n_category=len(encoders['category'].classes_),
  n_intent=len(encoders['intent'].classes_),
  n_actionability=len(encoders['actionability'].classes_),
  n_threat_verdict=len(encoders['threat_verdict'].classes_),
  n_attack_vector=len(encoders['attack_vector'].classes_),
)
state = torch.load("pytorch_model.bin", map_location="cpu")
model.load_state_dict(state); model.eval()

text = "Subject: Hello\n\nBody: test"
e = tok(text, truncation=True, padding='max_length', max_length=384, return_tensors='pt')
with torch.no_grad():
    print(model(e['input_ids'], e['attention_mask']))

Max length: 384. Input format: Subject: {subject}\n\nBody: {body}.

Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for patelkrish2727/jarvis-email

Finetuned
(215)
this model