Text Classification
Transformers
ONNX
Safetensors
modernbert
prompt-injection
jailbreak-detection
llm-security
ai-agents
guardrails
onnxruntime
mcp
text-embeddings-inference
Instructions to use usezn/Galvanize-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use usezn/Galvanize-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="usezn/Galvanize-2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("usezn/Galvanize-2") model = AutoModelForSequenceClassification.from_pretrained("usezn/Galvanize-2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add training data and attribution section and ATTRIBUTION.md
Browse files- ATTRIBUTION.md +0 -0
- README.md +44 -0
ATTRIBUTION.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README.md
CHANGED
|
@@ -284,3 +284,47 @@ If you use Galvanize 2, please cite the base model:
|
|
| 284 |
## Contact
|
| 285 |
|
| 286 |
Found an input the model gets wrong, in either direction, or a security issue? Write to security@usezn.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 284 |
## Contact
|
| 285 |
|
| 286 |
Found an input the model gets wrong, in either direction, or a security issue? Write to security@usezn.com.
|
| 287 |
+
|
| 288 |
+
## Training data and attribution
|
| 289 |
+
|
| 290 |
+
Galvanize 2 is fine-tuned from [Horizon-Labs/prompt-injection-guard-small](https://huggingface.co/Horizon-Labs/prompt-injection-guard-small), released by Horizon Labs under the Apache License 2.0. Thank you to Horizon Labs for publishing the base model.
|
| 291 |
+
|
| 292 |
+
The fine-tuning set has about 21,200 labelled rows. Each row keeps the licence of its source. Counts are approximate, except the licence totals.
|
| 293 |
+
|
| 294 |
+
| Source | Licence | Approximate rows | Notes |
|
| 295 |
+
|---|---|---|---|
|
| 296 |
+
| Wikipedia text ([wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia), dump 2023-11-01, German, English, Spanish, French, Italian, Portuguese, Russian) | CC BY-SA 3.0 and GFDL | about 2,000 benign passages, from 2,008 different articles | Share-alike applies. See the attribution section below. |
|
| 297 |
+
| Wikipedia text used as carrier for injected instructions (InjecAgent and BIPIA attack strings) | CC BY-SA 3.0 and GFDL (text); MIT (instruction strings) | about 1,400 rows | These rows combine a Wikipedia passage with an instruction. |
|
| 298 |
+
| WildChat-1M ([allenai/WildChat-1M](https://huggingface.co/datasets/allenai/WildChat-1M)) | ODC-BY 1.0 | about 3,700 | Benign user prompts and assistant replies. The assistant replies were written by OpenAI models. |
|
| 299 |
+
| Nemotron-RL Agentic Indirect Prompt Injection v1 (NVIDIA) | CC BY 4.0 | about 350 | Attribution required. |
|
| 300 |
+
| Nemotron-RL Jailbreak Robustness v1 (NVIDIA) | CC BY 4.0 | about 450 | Attribution required. The dataset card also lists Apache 2.0 and MIT for some underlying prompts. |
|
| 301 |
+
| Agentic prompt injection 5k ([3nesdeniz](https://huggingface.co/datasets/3nesdeniz/agentic-prompt-injection-5k)) | CC BY 4.0 | about 450 | Attribution required. |
|
| 302 |
+
| OR-Bench 80k ([bench-llm/or-bench](https://huggingface.co/datasets/bench-llm/or-bench)) | CC BY 4.0 | about 500 | Benign prompts. Attribution required. |
|
| 303 |
+
| Apache 2.0 sources: aya_dataset, oasst2, deepset/prompt-injections, neuralchemy, jackhhao, rgeada/tool-response-injections, PromptShield, yanismiraoui | Apache 2.0 | about 6,600 in total | Benign and injection examples. |
|
| 304 |
+
| MIT sources: InjecAgent, BIPIA attack strings, TrustAIRLab in-the-wild jailbreaks, Lakera gandalf and mosscap, S-Labs, wambosec, SPML, CTF (SaTML 2024) | MIT | about 4,100 in total | Licences checked on Hugging Face and GitHub, 14 October 2026. |
|
| 305 |
+
| prompts.chat ([fka/prompts.chat](https://huggingface.co/datasets/fka/prompts.chat)) | CC0 1.0 | about 350 | Public domain dedication. |
|
| 306 |
+
| Synthetic examples generated with a third-party language model and filtered by us | Terms of that provider | about 2,700 | Generated and filtered by us. |
|
| 307 |
+
|
| 308 |
+
Licence totals across the 21,211 training rows:
|
| 309 |
+
|
| 310 |
+
- Rows with CC BY-SA text (Wikipedia passages, alone or as the carrier for an injected instruction): about 3,400, or 16 % of the training set.
|
| 311 |
+
- ODC-BY: about 3,660.
|
| 312 |
+
- Apache 2.0: about 6,640.
|
| 313 |
+
- MIT: about 4,110.
|
| 314 |
+
- CC BY 4.0: about 1,750.
|
| 315 |
+
- CC0: about 350.
|
| 316 |
+
- Synthetic: about 2,700.
|
| 317 |
+
|
| 318 |
+
Evaluation sets are kept apart from training. They are not used to update the weights and are not released.
|
| 319 |
+
|
| 320 |
+
### Attribution for Wikipedia text
|
| 321 |
+
|
| 322 |
+
About 3,400 training rows contain text from Wikipedia articles, licensed under CC BY-SA 3.0 and the GNU Free Documentation License. We follow the Wikimedia Terms of Use: each article is credited by a link to the article, which has a history page listing its authors. The full list of article titles, languages and links is in [ATTRIBUTION.md](ATTRIBUTION.md). The list covers the 2,008 articles that provide the benign passages. Each of the other rows uses one of those same passages as its carrier text, so the list covers them too.
|
| 323 |
+
|
| 324 |
+
### Licence of this model
|
| 325 |
+
|
| 326 |
+
The model weights, the ONNX export and the code in this repository are released under the Apache License 2.0. The NOTICE file credits Horizon Labs and records our changes.
|
| 327 |
+
|
| 328 |
+
The training datasets are not released with the model. Each dataset keeps its own licence. This release does not change those licences. Anyone who redistributes a dataset must follow its licence, and anyone who redistributes Wikipedia text must follow CC BY-SA 3.0 and the attribution terms above.
|
| 329 |
+
|
| 330 |
+
This section describes our sources. It is not legal advice.
|