general-politeness-binary (intel)
Collection
Tiny guardrails for 'general-politeness-binary' trained on https://huggingface.co/datasets/Intel/polite-guard.
•
5 items
•
Updated
This model is a fine-tuned Model2Vec classifier based on minishlab/potion-multilingual-128M for the general-politeness-binary found in the Intel/polite-guard dataset.
pip install model2vec[inference]
from model2vec.inference import StaticModelPipeline
model = StaticModelPipeline.from_pretrained(
"enguard/medium-guard-128m-xx-general-politeness-binary-intel"
)
# Supports single texts. Format input as a single text:
text = "Example sentence"
model.predict([text])
model.predict_proba([text])
Below is a quick overview of the model variant and core metrics.
| Field | Value |
|---|---|
| Classifies | general-politeness-binary |
| Base Model | minishlab/potion-multilingual-128M |
| Precision | 0.9831 |
| Recall | 0.9901 |
| F1 | 0.9866 |
| True \ Predicted | FAIL | PASS |
|---|---|---|
| FAIL | 2507 | 25 |
| PASS | 43 | 7625 |
{
"FAIL": {
"precision": 0.9831372549019608,
"recall": 0.9901263823064771,
"f1-score": 0.9866194411648957,
"support": 2532.0
},
"PASS": {
"precision": 0.9967320261437909,
"recall": 0.9943922796035473,
"f1-score": 0.9955607781694739,
"support": 7668.0
},
"accuracy": 0.9933333333333333,
"macro avg": {
"precision": 0.9899346405228758,
"recall": 0.9922593309550122,
"f1-score": 0.9910901096671848,
"support": 10200.0
},
"weighted avg": {
"precision": 0.993357324106113,
"recall": 0.9933333333333333,
"f1-score": 0.9933412227483374,
"support": 10200.0
}
}
| Text | True Label | Predicted Label |
|---|---|---|
| I appreciate your interest in our vegetarian options. I can provide you with a list of our current dishes that cater to your dietary preferences. | PASS | PASS |
| I understand you're concerned about the ski lessons, and I'll look into the options for rescheduling. | PASS | PASS |
| Our technical skills course will cover the essential topics in data analysis, including data visualization and statistical modeling. The course materials will be available on our learning platform. | PASS | PASS |
| Our buffet hours are from 11 AM to 9 PM. Please note that we have a limited selection of options available during the lunch break. | PASS | PASS |
| I'll look into your policy details and see what options are available to you. | PASS | PASS |
| I appreciate your interest in our vegetarian options. I can provide you with a list of our current dishes that cater to your dietary preferences. | PASS | PASS |
| Dataset Size | Time (seconds) | Predictions/Second |
|---|---|---|
| 1 | 0.0003 | 3446.43 |
| 1000 | 0.1092 | 9156.49 |
| 10000 | 1.1875 | 8420.85 |
Below is a general overview of the best-performing models for each dataset variant.
If you use this model, please cite Model2Vec:
@software{minishlab2024model2vec,
author = {Stephan Tulkens and {van Dongen}, Thomas},
title = {Model2Vec: Fast State-of-the-Art Static Embeddings},
year = {2024},
publisher = {Zenodo},
doi = {10.5281/zenodo.17270888},
url = {https://github.com/MinishLab/model2vec},
license = {MIT}
}
Base model
minishlab/potion-multilingual-128M