misc 0 0 0

declare-lab/CategoricalHarmfulQA

published by @declare-lab

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
10.4K
Last 30 days
963
Likes
14
Size
338 KB
Created on HF
2024-02-20
Age
2 years ago

Description

CatQA: A categorical harmful questions dataset

CatQA is used in LLM safety realignment research:

Language Models are Homer Simpson! Safety Re-Alignment of Fine-tuned Language Models through Task Arithmetic (Paper, Code)

How to download

from datasets import load_dataset

dataset = load_dataset("declare-lab/CategoricalHarmfulQA")

What is CatQA?

To comprehensively evaluate the model across a wide range of harmful categories, we construct a new… See the full description on the dataset page: https://huggingface.co/datasets/declare-lab/CategoricalHarmfulQA.

Tags

language:enlanguage:zhlanguage:vilicense:apache-2.0size_categories:1K<n<10Kformat:jsonmodality:textlibrary:datasetslibrary:pandaslibrary:mlcroissantlibrary:polarsarxiv:2402.11746region:us

README current version from Hugging Face


configs:

  • config_name: default
    data_files:
    • split: en
      path:
      • data/catqa_english.json
    • split: zh
      path:
      • data/catqa_chinese.json
    • split: vi
      path:
      • data/catqa_vietnamese.json
        license: apache-2.0
        language:
  • en
  • zh
  • vi
    size_categories:
  • 1K<n<10K


license: apache-2.0

CatQA: A categorical harmful questions dataset

  • CatQA is used in LLM safety realignment research:
    Language Models are Homer Simpson! Safety Re-Alignment of Fine-tuned Language Models through Task Arithmetic (Paper, Code)

How to download

from datasets import load_dataset
dataset = load_dataset("declare-lab/CategoricalHarmfulQA")

What is CatQA?

To comprehensively evaluate the model across a wide range of harmful categories, we construct a new safety evaluation dataset CatQA. We obtain a combined list of prohibited use cases mentioned in OpenAI usage policies and Meta’s Llama2 acceptable use policy. As shown in the table below, there are 11 main categories of harm we consider. We divide each of these categories into 5 sub-categories. For each sub-category, we frame 10 harmful questions. Each sub-category and question is collected by us with the assistance of a powerful but unaligned LLM (the LLM is helpful but not safety-aligned. We do not disclose the name of LLM to prevent its misuse}. Thus, the dataset consists of 550 harmful questions, 55 such questions are shown in the table. While CatQA questions are in English, to evaluate the generalizability of our approach, we extend the dataset to two more languages: Chinese and Vietnamese. First, we translated the English version to the corresponding language using the LLM which assisted us in generating the former version, and employed language-proficient human annotators to enhance the quality of the dataset.

catqa

Citation

@misc{bhardwaj2024language,
      title={Language Models are Homer Simpson! Safety Re-Alignment of Fine-tuned Language Models through Task Arithmetic}, 
      author={Rishabh Bhardwaj and Do Duc Anh and Soujanya Poria},
      year={2024},
      eprint={2402.11746},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

README history 20 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2024-02-27Update README.md321e0682.6 KB
    Loading...
  2. 2024-02-27Update README.md728325a2.6 KB
    Loading...
  3. 2024-02-27Rename data/CatQ_English.json to data/catqa_english.json63eb8892.5 KB
    Loading...
  4. 2024-02-27Rename data/CatQ_Vietnamese.json to data/catqa_vietnamese.jsona886ee82.5 KB
    Loading...
  5. 2024-02-27Rename data/CatQ_Chinese.json to data/catqa_chinese.json666f37e2.5 KB
    Loading...
  6. 2024-02-27Update README.md9cca0cc2.5 KB
    Loading...
  7. 2024-02-22Update README.mdca8e6892.5 KB
    Loading...
  8. 2024-02-21Update README.mdcdfd7cc2.4 KB
    Loading...
  9. 2024-02-21Update README.mdc5064c81.9 KB
    Loading...
  10. 2024-02-21Update README.md8fd9cd91.6 KB
    Loading...
  11. 2024-02-21Update README.mdc7042791.5 KB
    Loading...
  12. 2024-02-21Update README.md51bc90e1.5 KB
    Loading...
  13. 2024-02-21Update README.mde68a9061.5 KB
    Loading...
  14. 2024-02-21Update README.md1a55efb1.5 KB
    Loading...
  15. 2024-02-21Update README.mdf7adf761.5 KB
    Loading...
  16. 2024-02-21Delete data/README.mdd1289731.3 KB
    Loading...
  17. 2024-02-21Create README.md01c88ae1.3 KB
    Loading...
  18. 2024-02-21Upload 2 files3b66d521.3 KB
    Loading...
  19. 2024-02-21Rename CatQ_English.json to data/CatQ_English.json25e79711.3 KB
    Loading...
  20. 2024-02-21Delete CategoricalHarmfulQ.py8407c111.3 KB
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 2 threads · 2 open · 2 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2025-01-07PRUpdate README.mdopen1 💬#2
    Loading...
  2. 2024-02-23[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · misc

Read further

Metadata

License
apache-2.0

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("declare-lab/CategoricalHarmfulQA")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="declare-lab/CategoricalHarmfulQA", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/declare-lab/CategoricalHarmfulQA
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration