학술

Run One, Get Two: Near-Free Streaming Safety Checks for Local LLMs

arXiv CS.AI
CC BY
이 매체는 공공·자유 라이선스로 본문을 직접 표시합니다.

Abstract

Local LLM assistants decode for one user at a time, so decoding is bound by memory bandwidth and leaves compute idle.

Streaming safety checks today trade accuracy against cost.

A dedicated guard model is accurate but nearly doubles the latency per token, while a hidden-state probe is cheap but less accurate.

We present ToRA, an adapter that runs a second model as an extra row in the generator's decode step, sharing its weights and KV cache.

Dual-row kernels read each weight once for both rows.

On Qwen3-0.6B, ToRA matches or beats a dedicated streaming guard, with higher F1 on 12 of 17 benchmarks.

It detects 11.8 points more unsafe responses than the probe at a similar cost, under 4% added latency per token.

관련 뉴스