Text Classification
Transformers
Safetensors
GGUF
English
bert
email
triage
classification
specific-ai
text-embeddings-inference
feature-extraction
Instructions to use specific-AI/email-agent-triage with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use specific-AI/email-agent-triage with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="specific-AI/email-agent-triage")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("specific-AI/email-agent-triage") model = AutoModelForSequenceClassification.from_pretrained("specific-AI/email-agent-triage", device_map="auto") - llama-cpp-python
How to use specific-AI/email-agent-triage with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="specific-AI/email-agent-triage", filename="bert-base-only.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use specific-AI/email-agent-triage with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf specific-AI/email-agent-triage # Run inference directly in the terminal: llama cli -hf specific-AI/email-agent-triage
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf specific-AI/email-agent-triage # Run inference directly in the terminal: llama cli -hf specific-AI/email-agent-triage
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf specific-AI/email-agent-triage # Run inference directly in the terminal: ./llama-cli -hf specific-AI/email-agent-triage
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf specific-AI/email-agent-triage # Run inference directly in the terminal: ./build/bin/llama-cli -hf specific-AI/email-agent-triage
Use Docker
docker model run hf.co/specific-AI/email-agent-triage
- LM Studio
- Jan
- Ollama
How to use specific-AI/email-agent-triage with Ollama:
ollama run hf.co/specific-AI/email-agent-triage
- Unsloth Studio
How to use specific-AI/email-agent-triage with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for specific-AI/email-agent-triage to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for specific-AI/email-agent-triage to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for specific-AI/email-agent-triage to start chatting
- Atomic Chat new
- Docker Model Runner
How to use specific-AI/email-agent-triage with Docker Model Runner:
docker model run hf.co/specific-AI/email-agent-triage
- Lemonade
How to use specific-AI/email-agent-triage with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull specific-AI/email-agent-triage
Run and chat with the model
lemonade run user.email-agent-triage-{{QUANT_TAG}}List all available models
lemonade list
File size: 4,750 Bytes
d79406f 26dfb37 d79406f 26dfb37 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | ---
license: mit
language:
- en
library_name: transformers
pipeline_tag: text-classification
tags:
- email
- triage
- classification
- bert
- specific-ai
- gguf
base_model: google-bert/bert-base-uncased
---
# specific-AI/email-agent-triage
A compact **BERT** email triage classifier distilled with **[Specific AI](https://specific.ai)**.
It assigns each email to one of five action-oriented categories so agentic
workflows can decide whether to reply, archive, or take no action.
| | |
|---|---|
| **Task** | Single-label text classification |
| **Base model** | `bert-base-uncased` |
| **Training data** | ~15,000 examples |
| **License** | MIT |
## Input format
Examples were trained on emails formatted as plain text with `From`, `Subject`,
and body (blank line between the headers and the body):
```text
From: <from>
Subject: <subject>
<body>
```
Pass inputs in this same shape at inference time for best results.
## Labels
| Label | Meaning | Suggested next action |
|---|---|---|
| **URGENT** | Requires immediate attention (e.g. critical system failure, hard deadline right now). | Reply |
| **NEEDS_RESPONSE** | A task or response is owed, but it is not a drop-everything emergency. | Reply |
| **PROMOTIONAL** | Bulk mail, unsolicited promotions, or newsletters. | Archive |
| **PERSONAL** | Non-business, personal communications. | None |
| **FYI** | Informational only β the recipient should know, but no reply is required. | None |
## Evaluation
Compared against **gpt-5.4-mini** as a teacher / baseline on the same evaluation set:
| Metric | gpt-5.4-mini | SpecificAI |
|---|---:|---:|
| Accuracy | 0.693 | **0.720** |
| Precision | 0.810 | 0.763 |
| Recall | 0.693 | **0.720** |
| F1 score | 0.693 | **0.716** |
## Repository contents
This card ships both a full Hugging Face checkpoint and GGUF-ready artifacts:
- Full `BertForSequenceClassification` weights (`model.safetensors`) + tokenizer
- Head layers as NumPy files (`pooler_*.npy`, `classifier_*.npy`) for GGUF / Lemonade fusion
- Encoder GGUF: `bert-base-only.gguf` (CLS pooling; use with raw / unnormalized embeddings)
## Quick start β Transformers
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "specific-AI/email-agent-triage"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
text = """From: ops@example.com
Subject: Production outage
Production is down β please escalate immediately."""
inputs = tokenizer(text, return_tensors="pt", truncation=True)
with torch.no_grad():
logits = model(**inputs).logits
pred = model.config.id2label[int(logits.argmax(-1))]
print(pred)
```
## Quick start β Lemonade + specific-ai-tools
When running the GGUF encoder through Lemonade Server:
```bash
pip install specific-ai-tools
```
```python
from specific_ai_tools.embedding_heads import LemonadeEmbeddingClassifier
classifier = LemonadeEmbeddingClassifier(
lemonade_model_name="user.email-agent-triage",
checkpoint="specific-AI/email-agent-triage:bert-base-only.gguf",
lemonade_base_url="http://localhost:13305",
)
text = """From: user@example.com
Subject: Billing question
Please escalate this ticket to billing."""
result = classifier.predict_one(text)
print(result.predicted_labels, result.predicted_confidences)
```
See the Specific AI toolkit docs for llama-cpp and other embedding backends.
## Intended use
- Email / inbox agent triage in production or on-device / CPU deployments
- Routing messages into reply / archive / no-action queues
**Out of scope:** legal advice, medical triage, or safety-critical decisions without
human review. Labels reflect email workflow intent, not sender identity verification.
## About Us
**[Specific AI](https://specific.ai)** is the automatic SLM distillation platform
that turns task prompts into production-grade small language models in days β
not weeks β so your subject matter experts can ship models without waiting on
scarce data-science bandwidth.
We help enterprises move agentic AI from prototype to production with SLMs that
are typically **1,000Γβ10,000Γ smaller** than teacher LLMs, run in
**milliseconds** on CPUs or edge devices, and deliver the same or better
task quality at a fraction of the cost β self-hosted on your cloud or
downloaded for your own inference stack.
**Prompt β Distill β Deploy.** Bring your prompt and data, drop them into
Specific AI, and get a validated small model ready to test and ship.
Ready to create SLMs at scale? Visit **[specific.ai](https://specific.ai)**.
## License
MIT β see [LICENSE](LICENSE).
Copyright (C) 2026 Specific AI Inc. All rights reserved.
|