A prompt-injection detector implementation (Burn / ORT backend focus)

โš“ Rust    ๐Ÿ“… 2025-11-06    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 11      

surdeus

I've put together an early version of a Rust-based prompt-injection detector, and this PR introduces the first functional implementation. The project includes optional support for both the Burn and ORT backends, allowing the model to run either with a pure-Rust ML stack or through ONNX Runtime for better performance and portability. At the core of the detector is a fine-tuned ModernBERT model, trained specifically for identifying prompt-injection patterns.

If you have a moment to review the code or point out potential pitfalls, Iโ€™d really appreciate it.

PR: Review by tihilya ยท Pull Request #3 ยท Wandalen/prompt_injection_detector ยท GitHub

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed