Model card
Prompt Guard 86M is a lightweight, specialized classifier designed to secure LLM pipelines by detecting prompt injections and jailbreak attempts. Unlike general-purpose models, this 86M-parameter model is optimized for low-latency inference, making it an ideal first-pass filter before requests hit your primary generative model. It categorizes inputs into 'safe' or 'unsafe' based on adversarial patterns, allowing developers to implement programmatic guards without sacrificing system performance. It integrates easily into existing middleware or API gateways, providing a critical layer of defense against malicious user inputs that seek to bypass system instructions.
Model files and versions
Download this model
We recommend using the ModelScope CLI or SDK. Install ModelScope first, then choose a full snapshot, single file, SDK or Git LFS workflow.
meta-llama/Prompt-Guard-86MInstall the CLI and SDK dependency before downloading.
pip install modelscopeDownload the complete weights, configuration and model card.
modelscope download --model meta-llama/Prompt-Guard-86MREADME.md is used as an example; replace it with another repository file when needed.
modelscope download --model meta-llama/Prompt-Guard-86M README.md --local_dir ./dirUseful in Python projects and automation scripts.
from modelscope import snapshot_download
model_dir = snapshot_download('meta-llama/Prompt-Guard-86M')Make sure Git LFS is installed correctly.
git lfs install
git clone https://www.modelscope.cn/meta-llama/Prompt-Guard-86M.gitFetch the repository structure first, then pull large files when needed.
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/meta-llama/Prompt-Guard-86M.gitHow to use
- 01Step 1
Read the model card and source information.
- 02Step 2
Start with a small, non-sensitive evaluation.
- 03Step 3
Review quality, licensing and usage limits.
- 04Step 4
Adopt it only after validation.
Discussions
Use this space to keep checking source information, usage experience and maintenance status.
Open source page