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
Card: Galvanize 3 now serves the cloud check
Browse files29 unmodified lines3031323334353636 unmodified lines7374757677787929 unmodified lines> **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 has been in production in the usezn.com API since 2026-10-12 (12:22 UTC). It is also the model behind the cloud check of [zn-gate](https://github.com/usezn/zn), the open-source local security layer for AI coding agents.- **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.36 unmodified lines## How to use itUse the same input protocol we use in production and in every number on this card:1. Flatten whitespace: `" ".join(text.split())`.2. Keep the first 512 tokens.29 unmodified lines3031323334353636 unmodified lines7374757677787929 unmodified lines> **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.36 unmodified lines## How to use itUse the same input protocol we used in production and in every number on this card:1. Flatten whitespace: `" ".join(text.split())`.2. Keep the first 512 tokens.
README.md+2-2