Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

meta-llama
/
Llama-Prompt-Guard-2-86M

Text Classification
Transformers
Safetensors
PyTorch
deberta-v2
facebook
meta
llama
llama4
safety
text-embeddings-inference
Model card Files Files and versions
xet
Community
13

Instructions to use meta-llama/Llama-Prompt-Guard-2-86M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use meta-llama/Llama-Prompt-Guard-2-86M with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-classification", model="meta-llama/Llama-Prompt-Guard-2-86M")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForSequenceClassification
    
    tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-Prompt-Guard-2-86M")
    model = AutoModelForSequenceClassification.from_pretrained("meta-llama/Llama-Prompt-Guard-2-86M")
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

fix: set `clean_up_tokenization_spaces` to `false`

#13 opened 2 months ago by
maxsloef

Request: DOI

#11 opened 9 months ago by
tsemachh

no vLLM compatibility?

👀 2
#9 opened 11 months ago by
alecauduro

Add id2label and label2id to config.json

1
#8 opened 11 months ago by
nivado96

I encountered a failure when attempting to download.

#7 opened 12 months ago by
cookieQI

Unintuitive outcomes with the model

2
#6 opened 12 months ago by
skagpromo

How to add even more cateogries to the model?

3
#5 opened about 1 year ago by
KushBor

id2label missing in config.json?

👍 4
2
#4 opened about 1 year ago by
vrdn23
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs