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, workintent(10): financial_transaction, government_notice, information_update, meeting_request, other, promotional_offer, security_alert, social_notification, task_action, verification_codeactionability(5): needs_click, needs_payment, needs_reply, needs_scheduling, none_fyithreat_verdict(5): fraud_bec, impersonated, legitimate, phishing, suspiciousattack_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 classJarvisEmailIntelligenceconfig.jsonโ dims + label listslabel_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
Base model
microsoft/deberta-v3-small