# llm-attacks/llm-attacks

Universal and Transferable Attacks on Aligned Language Models

Repository: https://github.com/llm-attacks/llm-attacks
Canonical: https://ross.abutalabs.com/products/llm-attacks
Homepage: https://llm-attacks.org/
Language: Python
License: MIT
License Family: permissive
Last push: 2024-08-02T06:02:18+00:00

## Health v2 (maintenance only)
Score: 28/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 81
- inputs: {"age_days": 1134, "days_push": 761, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4769, forks 635 (observed 2026-08-28T04:08:59.352456+00:00)

## What it is
Official research code for 'Universal and Transferable Adversarial Attacks on Aligned Language Models', implementing the GCG algorithm for automatically generating adversarial suffixes that jailbreak aligned LLMs. It targets open-source models like Vicuna and LLaMA-2 and demonstrates transfer of attacks to closed-source chatbots.

## Use cases
- generate adversarial suffixes that bypass LLM safety alignment
- reproduce GCG jailbreak experiments on LLaMA-2 and Vicuna
- study transferability of adversarial attacks to closed-source chatbots
- evaluate robustness of aligned language models
- run automated red-teaming experiments on LLMs

## When to choose
- you are an AI safety researcher studying LLM vulnerabilities
- you need the reference implementation of the GCG attack algorithm
- you want to reproduce the paper's experiments on open-weight models

## When to avoid
- you need a production-ready LLM security tool
- you want a maintained pip-installable library (use nanoGCG instead)
- you lack GPU resources to run 7B-parameter models

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, llm-training, security, penetration-testing
- domain: large-language-models, security, artificial-intelligence, machine-learning
- platform: python
- tags: adversarial-attacks, jailbreak, llm-safety, gcg, alignment, research-code, linux, gpu

## Member repositories
- llm-attacks/llm-attacks (main) score 28

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:59.352456+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:18:48.935867+00:00, confidence not recorded.
  - readme: https://github.com/llm-attacks/llm-attacks (fetched 2026-08-28T04:08:59.352456+00:00, sha 371264d790a9)
  - homepage: https://llm-attacks.org/ (fetched 2026-08-29T09:02:09.046968+00:00, sha 719cb033882b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
