The implementation for paper "UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models".
Create a new environment and install the dependencies.
conda create -n uniguardian python=3.10
conda activate uniguardian
pip install -r requirements.txt
Here’s an example command to execute the program. Make sure to replace the placeholders with actual paths.
python main.py --config_path ./config.json