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
Note: superseded by Galvanize 3
Browse files25 unmodified lines262728293031323334353625 unmodified lines# Galvanize 2> **Update (October 2026).** This card no longer quotes results on attacks generated by our internal red-team tooling: those attacks are private, so the figures could not be checked or reproduced. The removed lines are marked. The held-out results below were measured on a private set that also contains such attacks; they are kept as published. In the public benchmark, rows were decontaminated against the training data of Galvanize 2 only, so the scores of Galvanize-60M, which was trained on different data, are likely inflated on some sets (marked †). We will publish comparable results when anyone can reproduce them.Galvanize 2 is a binary classifier that scores a piece of text for **prompt injection**: text that tries to change what an AI model or agent does, against the instructions of its developer or user. It served the usezn.com API and the optional cloud check of [zn-gate](https://github.com/usezn/zn), the open-source local security layer for AI coding agents, from 2026-10-12 until Galvanize 3 replaced it. Galvanize 2 is the latest Galvanize model with open weights.- **Base model:** fine-tuned from [Horizon-Labs/prompt-injection-guard-small](https://huggingface.co/Horizon-Labs/prompt-injection-guard-small) (Apache-2.0), itself built on [jhu-clsp/mmBERT-small](https://huggingface.co/jhu-clsp/mmBERT-small) (MIT).- **Size:** about 141M parameters. Multilingual.25 unmodified lines2627282930313233343536373825 unmodified lines# Galvanize 2> **Superseded by Galvanize 3.** Galvanize 3 is our current prompt-injection detector and is also available with open weights: [usezn/Galvanize-3](https://huggingface.co/usezn/Galvanize-3). This card is kept for Galvanize 2, which served the zn API from 12 to 23 October 2026. Launch notes for Galvanize 3: [Galvanize 3 is live in the zn API](https://usezn.com/blog/galvanize-3-is-live-in-the-zn-api/?utm_source=hf&utm_medium=readme&utm_campaign=galvanize3).> **Update (October 2026).** This card no longer quotes results on attacks generated by our internal red-team tooling: those attacks are private, so the figures could not be checked or reproduced. The removed lines are marked. The held-out results below were measured on a private set that also contains such attacks; they are kept as published. In the public benchmark, rows were decontaminated against the training data of Galvanize 2 only, so the scores of Galvanize-60M, which was trained on different data, are likely inflated on some sets (marked †). We will publish comparable results when anyone can reproduce them.Galvanize 2 is a binary classifier that scores a piece of text for **prompt injection**: text that tries to change what an AI model or agent does, against the instructions of its developer or user. It served the usezn.com API and the optional cloud check of [zn-gate](https://github.com/usezn/zn), the open-source local security layer for AI coding agents, from 2026-10-12 until Galvanize 3 replaced it on 2026-10-23.- **Base model:** fine-tuned from [Horizon-Labs/prompt-injection-guard-small](https://huggingface.co/Horizon-Labs/prompt-injection-guard-small) (Apache-2.0), itself built on [jhu-clsp/mmBERT-small](https://huggingface.co/jhu-clsp/mmBERT-small) (MIT).- **Size:** about 141M parameters. Multilingual.
README.md+3-1