├── LICENSE ├── README.md ├── check_gpt_asr.py ├── check_kw_asr.py ├── data └── advbench │ └── harmful_behaviors.csv ├── defense └── harm_classifier_defense.py ├── get_responses.py ├── gpt-4_single_round_prompt_annotation.json ├── image ├── ReNeLLM.png └── example.png ├── llama ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MODEL_CARD.md ├── README.md ├── Responsible-Use-Guide.pdf ├── UPDATES.md ├── USE_POLICY.md ├── download.sh ├── example_chat_completion.py ├── kill_pid.sh ├── llama.egg-info │ ├── PKG-INFO │ ├── SOURCES.txt │ ├── dependency_links.txt │ ├── requires.txt │ └── top_level.txt ├── llama │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-39.pyc │ │ ├── generation.cpython-39.pyc │ │ ├── model.cpython-39.pyc │ │ └── tokenizer.cpython-39.pyc │ ├── generation.py │ ├── model.py │ └── tokenizer.py ├── requirements.txt ├── run_chat.sh ├── setup.py ├── tokenizer.model └── tokenizer_checklist.chk ├── renellm.py ├── renellm_tcps.py ├── requirements.txt └── utils ├── data_utils.py ├── harmful_classification_utils.py ├── llm_completion_utils.py ├── llm_responses_utils.py ├── prompt_rewrite_utils.py └── scenario_nest_utils.py /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/README.md -------------------------------------------------------------------------------- /check_gpt_asr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/check_gpt_asr.py -------------------------------------------------------------------------------- /check_kw_asr.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/check_kw_asr.py -------------------------------------------------------------------------------- /data/advbench/harmful_behaviors.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/data/advbench/harmful_behaviors.csv -------------------------------------------------------------------------------- /defense/harm_classifier_defense.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/defense/harm_classifier_defense.py -------------------------------------------------------------------------------- /get_responses.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/get_responses.py -------------------------------------------------------------------------------- /gpt-4_single_round_prompt_annotation.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/gpt-4_single_round_prompt_annotation.json -------------------------------------------------------------------------------- /image/ReNeLLM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/image/ReNeLLM.png -------------------------------------------------------------------------------- /image/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/image/example.png -------------------------------------------------------------------------------- /llama/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /llama/CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/CONTRIBUTING.md -------------------------------------------------------------------------------- /llama/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/LICENSE -------------------------------------------------------------------------------- /llama/MODEL_CARD.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/MODEL_CARD.md -------------------------------------------------------------------------------- /llama/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/README.md -------------------------------------------------------------------------------- /llama/Responsible-Use-Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/Responsible-Use-Guide.pdf -------------------------------------------------------------------------------- /llama/UPDATES.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/UPDATES.md -------------------------------------------------------------------------------- /llama/USE_POLICY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/USE_POLICY.md -------------------------------------------------------------------------------- /llama/download.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/download.sh -------------------------------------------------------------------------------- /llama/example_chat_completion.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/example_chat_completion.py -------------------------------------------------------------------------------- /llama/kill_pid.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/kill_pid.sh -------------------------------------------------------------------------------- /llama/llama.egg-info/PKG-INFO: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama.egg-info/PKG-INFO -------------------------------------------------------------------------------- /llama/llama.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama.egg-info/SOURCES.txt -------------------------------------------------------------------------------- /llama/llama.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /llama/llama.egg-info/requires.txt: -------------------------------------------------------------------------------- 1 | torch 2 | fairscale 3 | fire 4 | sentencepiece 5 | -------------------------------------------------------------------------------- /llama/llama.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | llama 2 | -------------------------------------------------------------------------------- /llama/llama/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/__init__.py -------------------------------------------------------------------------------- /llama/llama/__pycache__/__init__.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/__pycache__/__init__.cpython-39.pyc -------------------------------------------------------------------------------- /llama/llama/__pycache__/generation.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/__pycache__/generation.cpython-39.pyc -------------------------------------------------------------------------------- /llama/llama/__pycache__/model.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/__pycache__/model.cpython-39.pyc -------------------------------------------------------------------------------- /llama/llama/__pycache__/tokenizer.cpython-39.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/__pycache__/tokenizer.cpython-39.pyc -------------------------------------------------------------------------------- /llama/llama/generation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/generation.py -------------------------------------------------------------------------------- /llama/llama/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/model.py -------------------------------------------------------------------------------- /llama/llama/tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/llama/tokenizer.py -------------------------------------------------------------------------------- /llama/requirements.txt: -------------------------------------------------------------------------------- 1 | torch 2 | fairscale 3 | fire 4 | sentencepiece 5 | -------------------------------------------------------------------------------- /llama/run_chat.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/run_chat.sh -------------------------------------------------------------------------------- /llama/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/setup.py -------------------------------------------------------------------------------- /llama/tokenizer.model: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/llama/tokenizer.model -------------------------------------------------------------------------------- /llama/tokenizer_checklist.chk: -------------------------------------------------------------------------------- 1 | eeec4125e9c7560836b4873b6f8e3025 tokenizer.model 2 | -------------------------------------------------------------------------------- /renellm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/renellm.py -------------------------------------------------------------------------------- /renellm_tcps.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/renellm_tcps.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/requirements.txt -------------------------------------------------------------------------------- /utils/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/utils/data_utils.py -------------------------------------------------------------------------------- /utils/harmful_classification_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/utils/harmful_classification_utils.py -------------------------------------------------------------------------------- /utils/llm_completion_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/utils/llm_completion_utils.py -------------------------------------------------------------------------------- /utils/llm_responses_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/utils/llm_responses_utils.py -------------------------------------------------------------------------------- /utils/prompt_rewrite_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/utils/prompt_rewrite_utils.py -------------------------------------------------------------------------------- /utils/scenario_nest_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NJUNLP/ReNeLLM/HEAD/utils/scenario_nest_utils.py --------------------------------------------------------------------------------