30 open-source projects similar to safeailab/rain, ranked by shared indexed features. Tags may describe platforms or build tools rather than the same primary purpose. Check each project’s use case, license, and deployment requirements before treating it as a replacement.
This repository contains code for the paper Certifying LLM Safety against Adversarial Prompting.
This is the official source code for "SmoothLLM: Defending LLMs Against Jailbreaking Attacks" by Alex Robey, Eric Wong, Hamed Hassani, and George J. Pappas. To learn more about our work, see our blog post.
This is a repository for replicating the experiments from our paper: Pruning for Protection: Increasing Jailbreak Resistance in Aligned LLMs Without Fine-Tuning .
We have reorganized INDust, aligning evidence with three types of inductive instructions and implementing stricter quality control measures.
1. STaR 2. Mesh Transformer JAX 1. Updates 3. Pretrained Models 1. GPT-J-6B 1. Links 2. Acknowledgments 3. License 4. Model Details 5. Zero-Shot Evaluations 4. Architecture and Usage 1. Fine-tuning 2. JAX Dependency 5. TODO
This repo contains code and instructions for reproducing the experiments in the paper "RLCD: Reinforcement Learning from Contrast Distillation for Language Model Alignment" (https://arxiv.org/abs/2307.12950), by Kevin Yang, Dan Klein, Asli Celikyilmaz, Nanyun Peng, and Yuandong Tian. RLCD is a…
2025/09 We have released our code. - 2025/08 Our paper is accepted by EMNLP 2025.
Dromedary: towards helpful, ethical and reliable LLMs.
This repository is the official code repository for our paper Impossible Distillation: from Low-Quality Model to High-Quality Dataset & Model for Summarization and Paraphrasing.
This is the official repository for "Self-Evaluation as a Defense Against Adversarial Attacks on LLMs" by Hannah Brown, Leon Lin, Kenji Kawaguchi, Michael Shieh.
Implementation of the training framework proposed in Self-Rewarding Language Model , from MetaAI
The goal of this project is to create a framework that protects models against both natural language adversarial attacks and its own bias toward mis-alignment. This is done through the usage of a secondary model that judges the prompts to and responses from that primary model. This leaves the…
The official implementation of our NAACL 2024 paper "A Wolf in Sheep’s Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easily".
LLM Self Defense: By Self Examination, LLMs know they are being tricked. Mansi Phute, Alec Heibling, Matthew Hull, ShengYun Peng, Sebastian Szyller, Cory Cornelius, Duen Horng Chau. In ICLR 2024 TinyPaper, 2024.
Let ChatGPT teach your own chatbot in hours with a single GPU!
Setting up
An unofficial implementation of Self-Alignment with Instruction Backtranslation .
Self-Knowledge Guided Retrieval Augmentation for Large Language Models (EMNLP Findings 2023)
The official implementation of Self-Play Fine-Tuning (SPIN)
This is the official implementation for the paper Defending Large Language Models against Jailbreak Attacks via Semantic Smoothing.
This is the official repository for "SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decoding" (Accepted by ACL 2024).
This is the official code repository for Prefix Guidance: A Steering Wheel for Large Language Models to Defend Against Jailbreak Attacks.
Official Code for ACL 2024 paper "GradSafe: Detecting Jailbreak Prompts for LLMs via Safety-Critical Gradient Analysis" https://arxiv.org/abs/2402.13494
Defending LLMs against Jailbreaking Attacks via Backtranslation
Self-instruct is a framework for generating synthetic instruction datasets and fine-tuning large language models to improve their instruction-following capabilities. It provides a pipeline for aligning pretrained models with human intentions through a supervised fine-tuning workflow. The system utilizes a synthetic data generator that uses a seed set of tasks to prompt a model to create new instructional data. It includes an instruction dataset curator to remove redundant or low-quality entries, maintaining dataset diversity through a filtered task pool. The framework covers the full alignme