CoolFace
Modelpublic

aryasuneesh-quilr/hybrid-intent-crossencoder-deberta-v3-base

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes60downloads
Model Card

hybrid-intent-crossencoder-deberta-v3-base

Cross-encoder reranker for enterprise intent detection (DLP / security). Fine-tuned from cross-encoder/nli-deberta-v3-base on a hybrid synthetic intent-detection dataset.

Input format

user_input [SEP] intent_description

Performance (held-out test set, threshold=0.3)

MetricValue
Recall0.9825
Precision0.9534
F10.9678
AUC-ROC0.9975
PR-AUC0.9969
Best threshold (F1-optimal)0.7188 → F1=0.9742

Training config

ParameterValue
Base modelcross-encoder/nli-deberta-v3-base
Batch size16
Grad accum steps4
Effective batch64
Learning rate1e-05
Label smoothing0.05
Warmup ratio0.06
Max sequence length256
Early stoppingrecall@0.3 (patience=3)
Epochs trained7
Training time13.5 min

Inference snippet

python
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_id  = "aryasuneesh-quilr/hybrid-intent-crossencoder-deberta-v3-base"
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.7188 for best F1

Files in this repo

FileDescription
model.safetensorsHF-native weights
best_model.ptRaw PyTorch state_dict (for resuming training)
training_config.jsonFull hyperparameter record
metrics/Per-epoch + test-set evaluation CSVs

Generated 2026-02-24 10:19 UTC by ablation_reranker_training.py