{"repo":"dcarpintero/pangolin-guard","free":true,"listed":false,"github":"https://github.com/dcarpintero/pangolin-guard","clone":"git clone https://github.com/dcarpintero/pangolin-guard.git","description":"Lightweight, Self-Hosted AI Guardrails Model based on ModernBERT.","language":"Jupyter Notebook","stars":12,"topics":["fine-tuning","huggingface-transformers","modernbert","natural-language-processing","flash-attention","alternating-attention","ai-safety","prompt-guard"],"license":"Apache-2.0","category":"self-hosted-apps","readme_excerpt":"PangolinGuard LLM applications face critical security challenges in form of prompt injections and jailbreaks. This can result in models leaking sensitive data or deviating from their intended behavior. Existing safeguard models are not fully open and have limited context windows (e.g., only 512 tokens in LlamaGuard). PangolinGuard is a ModernBERT (Large), lightweight model that discriminates malicious prompts. It closely approximates the performance of Claude 3.7 and Gemini Flash 2.0 (84.72% accuracy vs. 86.81% and 86.11%) on a mixed benchmark targeting prompt safety and malicious input detection (NotInject, BIPIA, Wildguard-Benign, PINT), while maintaining low latency (<40ms) and supporting 8192 input tokens. 🤗 Tech-Blog on Hugging Face Intended uses - Adding custom, self-hosted safety checks to AI agents and conversational interfaces - Topic and content moderation - Mitigating risks when connecting AI pipelines to external services Evaluation data Evaluated on unseen data from a subset of specialized benchmarks targeting prompt safety and malicious input detection, while testing over-defense behavior: - NotInject: Designed to measure over-defense in prompt guard models by including benign inputs enriched with trigger words common in prompt injection attacks. - BIPIA: Evaluates privacy invasion attempts and boundary-pushing queries through indirect prompt injection attacks. - Wildguard-Benign: Represents legitimate but potentially ambiguous prompts. - PINT: Evaluates partic","default_branch":null,"files":null,"tree":[],"storefront":"/r/dcarpintero","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/dcarpintero/pangolin-guard/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}