Text Classification
Transformers
Safetensors
PyTorch
English
deberta-v2
facebook
meta
llama
llama-3
text-embeddings-inference
Instructions to use meta-llama/Prompt-Guard-86M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use meta-llama/Prompt-Guard-86M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="meta-llama/Prompt-Guard-86M")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("meta-llama/Prompt-Guard-86M") model = AutoModelForSequenceClassification.from_pretrained("meta-llama/Prompt-Guard-86M") - Inference
- Notebooks
- Google Colab
- Kaggle
How to detect words?
#17
by GoominDev - opened
When the input contains profanity or injection, the score is displayed,
but is there a way to find out which words caused the score result?
@GoominDev We don't have token-level classification yet, though I think a binary search over the input (e.g. chunking it into halves, scanning each half recursively) to find a section that might be triggering the model would work pretty well.
GoominDev changed discussion status to closed