A new open-source tool called resk-logits has been released to enhance LLM safety by blocking harmful content at the logit level, before a token is sampled. This GPU-accelerated processor uses an Aho-Corasick algorithm to scan the entire vocabulary for malicious patterns, setting the logits of matching tokens to negative infinity for a hard block or applying a penalty for a "shadow ban" mode. Developed with both CUDA and Metal backends, it offers sub-millisecond overhead and is compatible with any Hugging Face AutoModelForCausalLM. AI
IMPACT Enhances LLM safety by providing a low-latency, architecture-level blocking mechanism for harmful content.
RANK_REASON New open-source tool release for LLM safety.
- Aho–Corasick algorithm
- AutoModelForCausalLM
- CUDA
- GitHub
- Hugging Face
- LLM
- Metal
- Python Package Index
- resk-logits
- RTX 4090
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →