LoRA-Guard: Parameter-Efficient Guardrail Adaptation for Content Moderation of Large Language Models

Hayder Elesedy, Pedro M. Esperança, Silviu Vlad Oprea, Mete Ozay
7/3/2024
cs.LGcs.AIcs.CL

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Guardrails have emerged as an alternative to safety alignment for content moderation of large language models (LLMs). Existing model-based guardrails have not been designed for resource-constrained computational portable devices, such as mobile phones, more and more of which are running LLM-based applications locally. We introduce LoRA-Guard, a parameter-efficient guardrail adaptation method that relies on knowledge sharing between LLMs and guardrail models. LoRA-Guard extracts language features from the LLMs and adapts them for the content moderation task using low-rank adapters, while a dual-path design prevents any performance degradation on the generative task. We show that LoRA-Guard outperforms existing approaches with 100-1000x lower parameter overhead while maintaining accuracy, enabling on-device content moderation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{elesedy2024loraguard,
  title  = {LoRA-Guard: Parameter-Efficient Guardrail Adaptation for Content Moderation of Large Language Models},
  author = {Hayder Elesedy and Pedro M. Esperança and Silviu Vlad Oprea and Mete Ozay},
  year   = {2024},
  eprint = {2407.02987},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.02987v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.02987.svg)](https://codeofpaper.com/paper/2407.02987)

Discussion