Downloads · 30 days
0
Vinuit/sentinelai-bert-filter
sentinelai-bert-filter is a machine learning model from Vinuit. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
LoRA fine-tuned BERT model for employee mental health classification in workplace messages. Part of the SentinelAI system for automated burnout detection via Slack message analysis.
Downloads · 30 days
0
Access
Public
Updated Mar 10, 2026
Repo size
440 MB
Likes
0
Public
Click a slice to open those files.
.pt439 MB · 100%
From the Hugging Face model README
LoRA fine-tuned BERT model for employee mental health classification in workplace messages. Part of the SentinelAI system for automated burnout detection via Slack message analysis.
Dual-Head Classifier:
LoRA Configuration:
r: 8
lora_alpha: 16
lora_dropout: 0.1
target_modules: ["query", "value"]
task_type: FEATURE_EXTRACTION
Training:
epochs: 3
batch_size: 16
learning_rate: 3e-4
optimizer: AdamW
scheduler: Linear warmup + decay
max_sequence_length: 128
loss_function: CrossEntropyLoss (category + severity summed)
| Metric | Score |
|---|---|
| Category Accuracy | 76.29% |
| Severity Accuracy | 78.29% |
| Test Loss | 1.1840 |
Performance Context:
The repository uses a centralised Model Factory to handle architecture initialisation and weight loading. It includes Auto-Download logic that pulls the latest checkpoint from Hugging Face Hub if it is not found locally.
import torch
from services.model_factory import load_production_model
# Inference
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# This will:
# 1. Initialise DualHeadBERTClassifier
# 2. Apply LoRA adapters
# 3. Check for 'dual_head_classifier.pt' locally
# 4. If missing, download latest from OguzhanKOG/sentinelai-bert-filter
# 5. Load trained weights and return model in eval mode
model = load_production_model(device=device)
# Model is ready for inference
message = "I'm completely overwhelmed with work and can't sleep anymore"
# ... standard tokenization using config.MODEL_NAME ...
All parameters (LoRA rank, Alpha, Model Backbone, Paths) are centralised in filter/config.py. To change the backbone or parameters across the entire service, update this file only.
Primary Use Case: Fast, cost-effective gatekeeper filter in SentinelAI architecture. Routes high-risk messages to expensive LLM agents for detailed analysis, while filtering out low-risk neutral messages.
Architecture Position:
Slack Message → BERT Filter (this model) → [if risk] → LLM Agent Analysis → HR Alert
Not Intended For:
Full training metrics available in training_log.json:
Full implementation available in the project repository (Private).
Branch: feature/filter