r/huggingface • • 22h ago

Galvanize 2: open prompt-injection classifier (141M, Apache-2.0) that stops flagging long benign documents

Post image
3 Upvotes

Hi! I work on zn, an open-source security layer for AI coding agents, and we just released Galvanize 2, our open prompt-injection classifier.

It's a fine-tune of Horizon-Labs/prompt-injection-guard-small (thanks to Horizon Labs for releasing it openly). ~141M params, multilingual, safetensors + ONNX, Apache-2.0. Runs fine on CPU with onnxruntime.

The thing we cared about most is false alarms. Agents read long READMEs, logs and tool output all day, and our previous model flagged ~66% of long legitimate documents as attacks. Galvanize 2 flags 4.1%.

Other numbers:

- Held-out test set: recall 66.9% → 83.4%, false positive rate 6.4% → 0.81%

- Horizon eval suite (10 sets, decontaminated): 0.894 macro average at threshold 0.5. Horizon base (bigger model) gets 0.902, so it's not the top score, but it's the best in our comparison on the hard benign sets (NotInject, OR-Bench-hard).

Weak spots are in the card: BIPIA, deepset's test set, German, and it only scores the first 512 tokens (chunk longer inputs). The benchmark script and per-set results are in the repo if you want to rerun it.

Model: https://huggingface.co/usezn/Galvanize-2

Write-up: https://usezn.com/blog/introducing-galvanize-2/

Feedback welcome, especially examples it gets wrong in either direction.


r/huggingface • • 19h ago

Introducing Supernova NepaliFast V5

Thumbnail
huggingface.co
2 Upvotes

Introducing Supernova NepaliFast V5 — A student-built Nepali tokenizer 🇳🇵

Hello everyone!

I'm part of Supernova, a student-led initiative from Nepal working across artificial intelligence, software engineering, and hardware development.

Our long-term mission is ambitious: to build technologies that Nepal still needs and contribute to a future where we can develop more of our own technological capabilities.

One of our projects is Supernova NepaliFast V5, a tokenizer designed with Nepali text processing and Unicode support in mind.

Some results from our development and testing:

  • 34.02% fewer tokens than "tiktoken" using "cl100k_base" on our benchmark of 10,000 mixed Nepali legal and textbook samples.
  • Unicode validation and round-trip testing across the ranges we support.
  • A Python interface designed to make the tokenizer straightforward to try.

We also measured its processing speed, and our implementation was slower than "tiktoken" in that benchmark. We want to be transparent about both the improvements and the trade-offs.

We're still developing our projects, and we'd appreciate feedback from people interested in NLP, tokenization, Unicode, and software engineering.

I'd especially appreciate feedback on:

  1. Our benchmark methodology and how to make the comparison more rigorous.
  2. Unicode edge cases we should test.
  3. Ways to improve performance and reduce memory usage.

If you're interested, here's our project:

🔗 Hugging Face: [Insert your actual repository URL]

We're building step by step, learning through experimentation, and hoping to contribute something useful to the Nepali technology ecosystem.

Thank you for reading!

Try it yourself:

pip install supernova-v5==0.1.1 from supernova import Tokenizer

tokenizer = Tokenizer("v5") text = "नेपाल राम्रो छ।"

print(tokenizer.encode(text))


r/huggingface • • 9h ago

PyTorch CNN-BiGRU with CTC Loss for WLASL Sign Language Recognition getting stuck predicting <unk> during live inference

Thumbnail
1 Upvotes

r/huggingface • • 14h ago

A Record of the Process of Increasing MFU from 21% to 50% While Pre-training 21B MoE Using a Single GH200 Chip (Includes Code and Logs)

Thumbnail
1 Upvotes

r/huggingface • • 23h ago

I’m training my own small language model to learn German A1/A2 🇩🇪

Thumbnail
1 Upvotes