Downloads · 30 days
9
41% of all-time downloads
sandyyuan/deberta-v3-xsmall-sequence-classification
deberta-v3-xsmall-sequence-classification is a machine learning model from sandyyuan. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A fine-tuned DeBERTa-v3-xsmall model for classifying text sequences into 7 categories related to sensitive data detection.
Downloads · 30 days
9
41% of all-time downloads
All-time downloads
22
Public
Parameters
70.8M
286 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors283 MB · 96%
From the Hugging Face model README
A fine-tuned DeBERTa-v3-xsmall model for classifying text sequences into 7 categories related to sensitive data detection.
This model achieves 95.9% macro F1 score for categorizing text sequences into:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import joblib
import torch
# Load model and tokenizer
model_name = "sandyyuan/deberta-v3-xsmall-sequence-classification"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# For the label encoder, you'll need to download it separately
# label_encoder = joblib.load("label_encoder.pkl")
# Example inference
text = "John Smith"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=64)
with torch.no_grad():
outputs = model(**inputs)
probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class_idx = torch.argmax(probabilities, dim=-1).item()
confidence = torch.max(probabilities).item()
print(f"Predicted class index: {predicted_class_idx}")
print(f"Confidence: {confidence:.3f}")
This model is designed for:
Based on DeBERTa-v3-xsmall architecture with:
If you use this model, please cite:
@misc{deberta-sequence-classification-2025,
title={DeBERTa-v3-xsmall for Sequence Classification},
author={Sandy Yuan},
year={2025},
url={https://huggingface.co/sandyyuan/deberta-v3-xsmall-sequence-classification}
}