extract 0 0 0

paberr/guardrail-head-embeddings

published by @paberr

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
338
Last 30 days
47
Likes
-
Size
214.8 MB
Created on HF
2026-07-09
Age
3 months ago

Description

Guardrail-Head Pre-Activation Embeddings

Pre-classification-layer representations of the 10,000 harmful construction

points from entfane/construction_points,

extracted from three author-trained guardrail classifiers of Beyond

Red-Teaming: Formal Guarantees of LLM Guardrail Classifiers

(arXiv:2605.10901).

These are the exact cached activations used to reproduce the zero-knowledge

guardrail certificates in the zkrobustness/zk prototype (the deterministic

hyper-rectangle SAT/UNSAT… See the full description on the dataset page: https://huggingface.co/datasets/paberr/guardrail-head-embeddings.

Tags

task_categories:feature-extractionlicense:mitsize_categories:10K<n<100Karxiv:2605.10901region:usguardrailsafetyrepresentationszero-knowledgeformal-verification

README current version from Hugging Face


license: mit
task_categories:

  • feature-extraction
    tags:
  • guardrail
  • safety
  • representations
  • zero-knowledge
  • formal-verification
    size_categories:
  • 10K<n<100K

Guardrail-Head Pre-Activation Embeddings

Pre-classification-layer representations of the 10,000 harmful construction
points from entfane/construction_points,
extracted from three author-trained guardrail classifiers of Beyond
Red-Teaming: Formal Guarantees of LLM Guardrail Classifiers

(arXiv:2605.10901).

These are the exact cached activations used to reproduce the zero-knowledge
guardrail certificates in the zkrobustness/zk prototype (the deterministic
hyper-rectangle SAT/UNSAT certificate and the probabilistic GMM coverage
certificate). Publishing them removes the expensive embedding-extraction step
from the reproduction path — everything downstream (SVD frames, hyper-rectangle
bounds, GMM fits with random_state=0, the ZK statements) is deterministic
given these arrays.

Files

file model pooling shape dtype
embeddings_bert.npy urbas/bert_aegis first (CLS) (10000, 768) float32
embeddings_gpt2.npy entfane/gpt2_constitutional_classifier last (final non-pad token) (10000, 768) float32
embeddings_llama.npy entfane/Toxic_Llama8B last (10000, 4096) float32

Row order matches entfane/construction_points (split train, column
prompt). Each row is the base-model last_hidden_state at the pooled token
position — the pre-activation space in which the guardrail's linear head
operates.

Extraction

Produced by the Verifier.extract_embeddings path of the paper's code
(entfane/formal_verification_guardrails),
max_length=128, left padding for last pooling / right for first. The
Llama-3.1-8B model was loaded in float16 for the forward pass; the pooled
output is cast to float32 before saving (so all three files are float32
regardless of load dtype).

Usage

import numpy as np
from huggingface_hub import hf_hub_download

path = hf_hub_download(repo_id="<namespace>/guardrail-head-embeddings",
                       filename="embeddings_bert.npy", repo_type="dataset")
emb = np.load(path)   # (10000, 768) float32

Note on reproducibility

Forward passes on GPU/MPS are not bit-exact across hardware, so re-extracting
from the checkpoints may differ in the low-order bits; these arrays are the
canonical cache the reported certificates were computed against. The
downstream sklearn GaussianMixture fits use random_state=0 and are
deterministic given a fixed embedding array.

README history 5 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. 2026-07-09Add embeddings_llama.npy752998c2.8 KB
    Loading...
  2. 2026-07-09Add embeddings_gpt2.npy8d53aff2.8 KB
    Loading...
  3. 2026-07-09Add embeddings_bert.npy0f5ab162.8 KB
    Loading...
  4. 2026-07-09Add dataset card487a29d2.8 KB
    Loading...
  5. 2026-07-09initial commit375b05c0 B
    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.

Related datasets same stage · extract

Read further

Metadata

License
mit

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("paberr/guardrail-head-embeddings")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="paberr/guardrail-head-embeddings", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/paberr/guardrail-head-embeddings
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