Instructions to use zikabyte/garda-setfit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use zikabyte/garda-setfit with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("zikabyte/garda-setfit") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - setfit
How to use zikabyte/garda-setfit with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("zikabyte/garda-setfit") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from zikabyte/garda-setfit: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/zikabyte/garda-setfit/resolve/main/README.md
- Command line
-
hf download hf://zikabyte/garda-setfit/README.md
-
curl -L -o README.md https://huggingface.co/zikabyte/garda-setfit/resolve/main/README.md
1.5 kB
| license: apache-2.0 | |
| tags: | |
| - setfit | |
| - sentence-transformers | |
| - text-classification | |
| base_model: sentence-transformers/all-MiniLM-L6-v2 | |
| # GARDA - SetFit Grooming Risk Classifier | |
| ## Model Description | |
| This is a [SetFit](https://github.com/huggingface/setfit) model fine-tuned from | |
| [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) | |
| to flag indications of online predatory grooming in English-language chat | |
| messages. It is a binary classifier (label `1` = suspicious, `0` = normal) | |
| trained on short conversation windows (a message plus the few messages | |
| before it, tagged `self`/`other`) rather than isolated single lines. | |
| **This model is a triage aid, not a verdict.** See "Bias, Risks and | |
| Limitations" below before using it for anything beyond a demo/research | |
| context. | |
| ## Training Data | |
| Fine-tuned on the [PAN-2012 Sexual Predator Identification](https://pan.webis.de/clef12/pan12-web/author-identification.html) | |
| corpus, a restricted-access, non-redistributable dataset of real chat logs | |
| used under permission for academic research. **No excerpts of the raw | |
| dataset are included in this model card or repository** - only the | |
| resulting model weights are shared, consistent with the dataset's usage | |
| terms. | |
| ## Uses | |
| ### Direct Use for Inference | |
| ```python | |
| from setfit import SetFitModel | |
| model = SetFitModel.from_pretrained("zikabyte/garda-setfit") | |
| probas = model.predict_proba([ | |
| "self: hey\nother: hi\nother: how old are you?", | |
| ]) | |