Decision models ·

Llama Prompt Guard 2 86M

Task
Safety and policy checks
Returns
Probability or score
Precision tier
76 / 100
Size
280M
Max input
512 tokens
License
llama4
Released
2025-04

What it decides

Returns
benign or malicious (prompt injection or jailbreak), with a score.
Checks
Prompts and tool outputs (injection)
Languages
8 languages
Precision
76 / 100 · AUC 0.998 and 97.5% recall at 1% false positives in English (model card).
Clarity
Probability or score (15 of 15 clarity points)
How it runs
Classifier head · reads the input once and writes nothing, so it answers in milliseconds.
License
llama4 (Custom (read the terms))

Source: model card on Hugging Face (opens in a new tab) · How decision models are rated

How to run it

Original weights · Hugging Face

Full-precision files from Meta, for Transformers, Sentence Transformers, Text Embeddings Inference, Infinity or vLLM.

huggingface.co/meta-llama/Llama-Prompt-Guard-2-86M (opens in a new tab)

Free Hugging Face account needed: request access on the model page, and Meta approves it (usually within minutes to a few hours).

Apps that run Llama Prompt Guard 2 86M

Our pick for each kind of computer, assuming the model fits in its memory. Pick your own GPU or Mac in the Model Finder for an exact answer.

Mac (Apple silicon)

Infinity

Local API for rerankers and classifiers, including models TEI does not support.

Also good: Sentence Transformers

Windows PC, NVIDIA GPU

Sentence Transformers

A few lines of Python with Transformers or Sentence Transformers; easiest for scripts and notebooks.

Also good: Infinity

Windows PC, AMD Radeon

Sentence Transformers

A few lines of Python with Transformers or Sentence Transformers; easiest for scripts and notebooks.

Also good: Infinity

Linux, NVIDIA GPU

Infinity

Local API for rerankers and classifiers, including models TEI does not support.

Also good: Sentence Transformers

Linux server, 80 GB+ GPUs

Infinity

Local API for rerankers and classifiers, including models TEI does not support.

Also good: Sentence Transformers

App Type Opens it as Systems Engine Start
Infinity Server Original weights macOSWSLWindowsLinux PyTorch, ONNX, CTranslate2
infinity_emb v2 --model-id meta-llama/Llama-Prompt-Guard-2-86M
Sentence Transformers Library Original weights macOSWindowsLinux PyTorch
python -c "from transformers import pipeline; print(pipeline('text-classification', model='meta-llama/Llama-Prompt-Guard-2-86M')('text'))"

Which apps can open a model depends on the files published for it: GGUF for llama.cpp-based apps, MLX for Apple’s engine, the original weights for vLLM and SGLang. Compare every app.

Memory and speed

Each precision on an NVIDIA GeForce RTX 4090, for one decision on a 512-token input. The best hardware table below covers other GPUs and Macs.

Format Memory needed Time per decision Decisions per second Quality Download
Q8_0 0.8 GB 6.6 ms 151/s 76Great quality (A) · 76 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. All files (opens in a new tab)
F16 1.0 GB 7.0 ms 143/s 76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Original weights (opens in a new tab)

One request at a time. Servers that batch (Text Embeddings Inference, vLLM, Infinity) handle many more decisions per second.

Best hardware for Llama Prompt Guard 2 86M

The least expensive GPU in our catalog that runs it without offloading is the Intel Arc A380 (launch price $139) at F16.

Quality Hardware Quant Memory Time per decision Runs
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Sapphire NITRO+ AMD Radeon RX 7900 XTX Vapor-X 24GBAMD Radeon RX 7900 XTX F16 1.2 GB / 24.0 GB 6.4 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Sapphire NITRO+ AMD Radeon RX 9070 XT OCAMD Radeon RX 9070 XT F16 1.2 GB / 16.0 GB 7.0 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Framework DesktopAMD Ryzen AI Max+ 395 (128 GB) F16 1.2 GB / 96.0 GB 8.9 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Pro (14-inch, 2021) (M1 Pro or M1 Max)Apple M1 Max (64 GB) F16 1.2 GB / 48.0 GB 32 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple Mac Studio (2023) (M2 Max or M2 Ultra)Apple M2 Ultra (192 GB) F16 1.2 GB / 144 GB 15 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple Mac Studio (2025) (M4 Max or M3 Ultra)Apple M3 Ultra (256 GB) F16 1.2 GB / 192 GB 14 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple Mac Studio (2025) (M4 Max or M3 Ultra)Apple M3 Ultra (512 GB) F16 1.2 GB / 384 GB 14 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Air (13-inch, M4, 2025)Apple M4 (16 GB) F16 1.2 GB / 10.7 GB 71 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Air (13-inch, M4, 2025)Apple M4 (24 GB) F16 1.2 GB / 16.1 GB 71 ms Runs great
76Great quality (A) · 76 of 100: how capable the model is at F16, whatever it runs on. Match score 89/100 (quality, fit, speed and memory use) sets the ranking. Apple MacBook Pro (14-inch, M4 Pro or M4 Max, 2024)Apple M4 Max (128 GB) F16 1.2 GB / 96.0 GB 20 ms Runs great

Check it on your own hardware

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.