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")
The HF UI Editor made too many formatting changes, I'll close this and try again
· Sign up or log in to comment