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

> ToRA adds a streaming safety verifier to local LLM decoding by sharing generator weights and cache. On Qwen3-0.6B, it averages 81.4 response F1 versus the guard's 80.4, with 3.5% added latency per token at 2k context on an A6000 at batch one.

- arXiv: https://arxiv.org/abs/2611.26975
- Authors: Soheil Zibakhsh, Pedram Aghazadeh, Farinaz Koushanfar
- Published: 2026-11-24
- Topic: Alignment
- Visual carousel: https://instaxiv.com/p/2611.26975
- Explanation by InstaXiv, a secondary educational summary. Cite the original paper for exact results. InstaXiv is not affiliated with or endorsed by arXiv or Cornell University.

## Can a safety checker ride along with generation?

**3.5%** ToRA added latency/token vs generator @2k

## Two streaming checks, two different costs

**Dedicated guard:** A separate guard carries its own weights and KV cache. Against a same-sized generator, it adds 84-89% per-token latency on an A6000.

**Hidden-state probe:** SingProbe checks the generator's hidden states and adds under 2% latency, but trails the guard on response F1 and streaming unsafe detection.

Can a verifier borrow the work generation already performs?

## Three ways to check a stream

![Figure 2](https://cdn.instaxiv.com/figures/2611.26975/figure2.webp)

The comparison is a hidden-state probe, a separate guard, and ToRA. ToRA's key move is sharing generator weights and cached history rather than carrying a second model. (Figure 2)

## ToRA shares the model's work token by token

1. **Run once, then branch**: The generator runs its lower layers once; ToRA's verifier branches before adapted FFNs in its top 14 layers on Qwen3-0.6B.
2. **Specialize the verifier**: Low-rank adapters specialize its feed-forward projections; a classifier scores prompt and response harm.
3. **Reuse the past**: It computes current-token keys/values, reads the generator's KV cache, then discards its own.
4. **Check every new token**: At each generated token, a score crossing threshold τ can flag the response and stop generation; verifier states never feed the generator.

## The saving comes from one shared weight read

**Ordinary execution:** Against stock cuBLAS at 0.6B, separate execution adds about 51% latency; conventional batching still adds 15-21%.

**ToRA dual-row kernels:** A Triton tile loads each shared weight once for both paths and applies low-rank updates only to the verifier; overhead falls below 1%.

The generator's row stays unchanged while verification reuses its weight traffic.

## Near-guard scores, far less decoding overhead

| Method | Avg response F1 | Added latency/token @2k | Unsafe detected @5% FA |
| --- | --- | --- | --- |
| Qwen3Guard-Stream | 80.4 | +85.9% | 84.7% |
| SingProbe | 77.6 | +1.6% | 71.8% |
| **ToRA (+1.0 F1 pt)** | **81.4 ± 0.2** | **+3.5%** | **83.6 ± 0.6%** |

_Qwen3-0.6B; response F1 over 8 benchmarks. Latency vs generator at 2k, A6000 batch 1; Qwen3GuardTest detection at 5% false-alarm budget._

## Early warnings need labels before the ending

1. **Sample within the response**: Alongside final-token labels, training samples 128 intermediate positions per response.
2. **Teach the onset**: For unsafe examples, Qwen3Guard-Stream-0.6B labels sampled tokens before its onset 0 and tokens from onset onward 1; safe responses stay 0.
3. **Handle uncertain onsets**: If no onset is found, intermediate labels stay 0 while the final token remains unsafe; the teacher found onsets in 88.4% of unsafe training responses.

## At a strict 1% budget, ToRA flags earlier

| Method | Detected @1% FA | Exact hit @1% FA | Median delay (tokens) |
| --- | --- | --- | --- |
| Qwen3Guard-Stream | 61.0% | 43.3% | 17 |
| SingProbe | 48.5% | 37.0% | 12 |
| **ToRA (+6.9 pp)** | **59.5 ± 1.6%** | **50.2 ± 2.3%** | **8.3** |

_Qwen3GuardTest: 813 unsafe; 1% false-alarm budget on 1,703 safe validations. Guard needs 2 consecutive tokens; ToRA flags one crossing._

## Where the evidence stops

- **Model scope**: Accuracy is evaluated on Qwen3-0.6B; end-to-end efficiency reaches 1.7B, while 8B tests are FFN-layer only.
- **Replay, not live use**: Streaming tests replay existing responses, not live generation. On SingStreamBench, SingProbe AUC is 98.6 vs ToRA's 92.8; its annotations use the LLM from SingProbe training.
- **Baseline caveat**: Published guard and probe checkpoints were not retrained because their training data were unavailable; ToRA reports results over three seeds.
- **Workload scope**: Efficiency was measured on one A6000 at batch one; the advantage may change with larger batches or speculative decoding.

Best used when: Best suited to batch-one local decoding where a separate guard's weights and growing cache are costly.

## Key takeaways

- A safety verifier can share the generator's weights and cached history instead of paying for a separate model each token.
- For batch-one local inference, this design offers a practical middle ground: much less latency overhead than a dedicated guard.
- The next test is whether the advantage survives larger batches, speculative decoding, and multiple concurrent verifiers.

## Links

- arXiv: https://arxiv.org/abs/2611.26975
- PDF: https://arxiv.org/pdf/2611.26975

## Citation

```bibtex
@article{zibakhsh2026run,
  title   = {Run One, Get Two: Near-Free Streaming Safety Checks for Local LLMs},
  author  = {Zibakhsh, Soheil and Aghazadeh, Pedram and Koushanfar, Farinaz},
  journal = {arXiv preprint arXiv:2611.26975},
  year    = {2026},
  url     = {https://arxiv.org/abs/2611.26975}
}
```
