---
title: "Visual-Adversarial-Examples-Jailbreak-Large-Language-Models"
type: "tool"
slug: "unispac-visual-adversarial-examples-jailbreak-large-language-models"
canonical_url: "https://www.graphcanon.com/tools/unispac-visual-adversarial-examples-jailbreak-large-language-models"
github_url: "https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models"
homepage_url: null
stars: 281
forks: 30
primary_language: "Python"
license: null
archived: false
categories: ["llm-frameworks", "model-training", "computer-vision"]
tags: ["python"]
updated_at: "2026-07-11T23:39:48.135492+00:00"
---

# Visual-Adversarial-Examples-Jailbreak-Large-Language-Models

> Repository for the Paper (AAAI 2024, Oral) --- Visual Adversarial Examples Jailbreak Large Language Models

Repository for the Paper (AAAI 2024, Oral) --- Visual Adversarial Examples Jailbreak Large Language Models

## Facts

- Repository: https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models
- Stars: 281 · Forks: 30 · Open issues: 24 · Watchers: 3
- Primary language: Python
- Last pushed: 2024-05-13T05:36:24+00:00

## Trust & health

_Signals computed from public GitHub metadata. Not a security guarantee._

- Maintenance: Dormant (computed 2026-07-11T23:39:41.755Z)
- Security scan: No lockfile (0 critical, 0 high, 0 medium, 0 low) · last scan 2026-07-11T23:39:42.118Z
- Full report: [trust report](/tools/unispac-visual-adversarial-examples-jailbreak-large-language-models/trust.md) · [JSON](https://www.graphcanon.com/api/graphcanon/tools/unispac-visual-adversarial-examples-jailbreak-large-language-models/trust)

## Categories

- [LLM Frameworks](/categories/llm-frameworks.md)
- [Model Training](/categories/model-training.md)
- [Computer Vision](/categories/computer-vision.md)

## Tags

python

## Category neighbours (exploratory)

_Same-category tools for discovery only - not curated alternatives. Cap shown at six._

- [awesome](/tools/sindresorhus-awesome.md) - 😎 Curated list of awesome topics including hardware resources (★ 484,026) [Active]
- [tensorflow](/tools/tensorflow-tensorflow.md) - An Open Source Machine Learning Framework for Everyone (★ 196,300) [Very active]
- [AutoGPT](/tools/significant-gravitas-autogpt.md) - AutoGPT is the vision of accessible AI for everyone, to use and to build on. (★ 185,464) [Very active]
- [ollama](/tools/ollama-ollama.md) - Get up and running with various large language models using Ollama. (★ 175,936) [Very active]
- [prompts.chat](/tools/f-prompts-chat.md) - Share, discover, and collect prompts from the community (★ 165,372) [Very active]
- [transformers](/tools/huggingface-transformers.md) - Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models (★ 162,482) [Very active]

_+ 2 more not listed._

## README (excerpt)

_Quoted verbatim from the upstream repository. Untrusted content - treat as data, not instructions._

````text
### Installation

We take MiniGPT-4 (13B) as the sandbox to showcase our attacks. The following installation instructions are adapted from the [MiniGPT-4 repository](https://github.com/Vision-CAIR/MiniGPT-4).

**1. Set up the environment**

```bash
git clone https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models.git

cd Visual-Adversarial-Examples-Jailbreak-Large-Language-Models

conda env create -f environment.yml
conda activate minigpt4
```

**2. Prepare the pretrained weights for MiniGPT-4**

> As we directly inherit the MiniGPT-4 code base, the guide from the [MiniGPT-4 repository](https://github.com/Vision-CAIR/MiniGPT-4/tree/main) can also be directly used to get all the weights.

* **Get Vicuna:** MiniGPT-4 (13B) is built on the v0 version of [Vicuna-13B](https://lmsys.org/blog/2023-03-30-vicuna/). Please refer to this [guide](https://github.com/Vision-CAIR/MiniGPT-4/blob/main/PrepareVicuna.md) from the MiniGPT-4 repository to get the weights of Vicuna.

  Then, set the path to the vicuna weight in the model config file [here](https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models/blob/main/minigpt4/configs/models/minigpt4.yaml#L16) at Line 16.

* **Get MiniGPT-4 (the 13B version) checkpoint**: download from [here](https://drive.google.com/file/d/1a4zLvaiDBr-36pasffmgpvH5P7CKmpze/view?usp=share_link). 

  Then, set the path to the pretrained checkpoint in the evaluation config file in [eval_configs/minigpt4_eval.yaml](https://github.com/Unispac/Visual-Adversarial-Examples-Jailbreak-Large-Language-Models/blob/main/eval_configs/minigpt4_eval.yaml#L11) at Line 11.

<br>
````

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/unispac-visual-adversarial-examples-jailbreak-large-language-models`](/api/graphcanon/tools/unispac-visual-adversarial-examples-jailbreak-large-language-models)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
