Decision models · Meta
Llama Prompt Guard 2 22M
- Task
- Safety and policy checks
- Returns
- Probability or score
- Precision tier
- 68 / 100
- Size
- 71M
- Max input
- 512 tokens
- License
- llama4
- Released
- 2025-04
What it decides
- Returns
- benign or malicious, with a score.
- Checks
- Prompts and tool outputs (injection)
- Languages
- English
- Precision
- 68 / 100 · AUC 0.995 and 88.7% recall at 1% false positives in English; about 5x faster than the 86M (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))
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-22M (opens in a new tab)
Apps that run Llama Prompt Guard 2 22M
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)
Windows PC, NVIDIA GPU
Windows PC, AMD Radeon
Linux, NVIDIA GPU
Linux server, 80 GB+ GPUs
| App | Type | Opens it as | Systems | Engine | Start |
|---|---|---|---|---|---|
| Infinity | Server | Original weights | macOSWSLWindowsLinux |
|
|
| Sentence Transformers | Library | Original weights | macOSWindowsLinux |
|
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.5 GB | 4.7 ms | 214/s | 68Good quality (B) · 68 of 100: how capable the model is at Q8_0, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | All files (opens in a new tab) |
F16 | 0.6 GB | 4.8 ms | 210/s | 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Original weights (opens in a new tab) |
Best hardware for Llama Prompt Guard 2 22M
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 |
|---|---|---|---|---|---|
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | AMD Radeon RX 7900 XTX |
F16 | 0.8 GB / 24.0 GB | 4.6 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | AMD Radeon RX 9070 XT |
F16 | 0.8 GB / 16.0 GB | 4.8 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | AMD Ryzen AI Max+ 395 (128 GB) |
F16 | 0.8 GB / 96.0 GB | 5.2 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M1 (16 GB) |
F16 | 0.8 GB / 10.7 GB | 32 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M1 Max (64 GB) |
F16 | 0.8 GB / 48.0 GB | 11 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M2 Ultra (192 GB) |
F16 | 0.8 GB / 144 GB | 6.7 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M3 Ultra (256 GB) |
F16 | 0.8 GB / 192 GB | 6.6 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M3 Ultra (512 GB) |
F16 | 0.8 GB / 384 GB | 6.6 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M4 (16 GB) |
F16 | 0.8 GB / 10.7 GB | 21 ms | Runs great |
| 68Good quality (B) · 68 of 100: how capable the model is at F16, whatever it runs on. Match score 85/100 (quality, fit, speed and memory use) sets the ranking. | Apple M4 (24 GB) |
F16 | 0.8 GB / 16.1 GB | 21 ms | Runs great |
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.







