Downloads · 30 days
19
11% of all-time downloads
aryasuneesh-quilr/intent-crossencoder-minilm-L6-v2
intent-crossencoder-minilm-L6-v2 is a text classification model from aryasuneesh-quilr. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
Cross-encoder reranker for enterprise intent detection (DLP / security). Fine-tuned from cross-encoder/ms-marco-MiniLM-L-6-v2 on a synthetic intent-detection dataset.
Downloads · 30 days
19
11% of all-time downloads
All-time downloads
176
Public
Parameters
22.7M
182 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt90.9 MB · 50%
From the Hugging Face model README
Cross-encoder reranker for enterprise intent detection (DLP / security).
Fine-tuned from cross-encoder/ms-marco-MiniLM-L-6-v2 on a synthetic intent-detection dataset.
Binary classification: given a (user_input, intent_description) pair,
predict whether the user input matches the intent.
Designed as Stage-2 in a cascading firewall:
Stage-1 (fast heuristic) → this model (reranker) → Stage-2 LLM (Qwen).
user_input [SEP] intent_description
| Metric | Value |
|---|---|
| Recall | 0.9921 |
| Precision | 0.9921 |
| F1 | 0.9921 |
| AUC-ROC | 0.9979 |
| PR-AUC | 0.9973 |
| Best threshold (F1-optimal) | 0.5983 → F1=0.9927 |
| Parameter | Value |
|---|---|
| Base model | cross-encoder/ms-marco-MiniLM-L-6-v2 |
| Batch size | 64 |
| Grad accum steps | 1 |
| Effective batch | 64 |
| Learning rate | 2e-05 |
| Label smoothing | 0.05 |
| Warmup ratio | 0.06 |
| Max sequence length | 256 |
| Early stopping | [email protected] (patience=3) |
| Epochs trained | 10 |
| Training time | 1.7 min |
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "aryasuneesh-quilr/intent-crossencoder-minilm-L6-v2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
model.eval()
def score(user_input: str, intent_description: str) -> float:
pair = f"{user_input} [SEP] {intent_description}"
enc = tokenizer(pair, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
logits = model(**enc).logits
return torch.softmax(logits, dim=1)[0, 1].item() # P(match)
# Example
s = score(
"Our AWS_SECRET_ACCESS_KEY was found in a public repo",
"Identify exposure of authentication credentials or API keys"
)
print(f"Match probability: {s:.4f}") # use threshold 0.5983 for best F1
| File | Description |
|---|---|
model.safetensors | HF-native weights |
best_model.pt | Raw PyTorch state_dict (for resuming training) |
training_config.json | Full hyperparameter record |
metrics/ | Per-epoch + test-set evaluation CSVs |
Generated 2026-02-23 08:36 UTC by ablation_reranker_training.py