ZhuoerX's picture
Use the public SingProbe SGLang quickstart
75b12f1 verified
|
Raw History Blame Contribute Delete
3.18 kB
---
tags:
- safety
- guardrail
- hallucination-detection
- streaming
- glm-5.3-flash
license: other
license_name: glm-5.3-flash
license_link: https://huggingface.co/zai-org/GLM-5.3-Flash/blob/main/LICENSE
base_model: zai-org/GLM-5.3-Flash
---
# GLM-5.3-Flash-singprobe
## Model Description
SingProbe is an **intrinsic streaming guardrail** built on `zai-org/GLM-5.3-Flash`. Rather than running a separate safety model, this lightweight probe reuses the base model's hidden states during generation to score, at every token, **query intent**, **response unsafety**, and **hallucination risk**. It adds less than 0.5% decode-time overhead.
| Base model | Probe parameters | Tapped layers | Outputs |
| --- | ---: | --- | --- |
| `inclusionAI/GLM-5.3-Flash-singprobe` | 8.13M | `[14, 29, 43]` | 8 intents + unsafe + hallucination |
See the [technical report](https://arxiv.org/abs/2608.30703) for methodology and complete results. Training codes are available at [inclusionAI/SingProbe](https://github.com/inclusionAI/SingProbe).
## Evaluation
Higher is better for every metric. Results are averages over the benchmark suites specified below.
| Task | Metric | GLM-5.3-Flash-singprobe | Reference baseline |
| --- | --- | ---: | ---: |
| Query intent classification (6 benchmarks) | F1 | **0.8683** | YuFeng-XGuard-Reason-8B: 0.8714 |
| Response safety classification (8 benchmarks) | F1 | **0.8706** | Qwen3Guard-Gen-8B-strict: 0.8604 |
| Streaming safety (3 benchmarks) | R-AUC / T-AUC | **0.9786 / 0.9232** | Qwen3Guard-Stream-8B-strict: 0.9640 / 0.8893 |
| Hallucination detection (6 benchmarks) | AUC | **0.8143** | DRIFT: 0.8000 |
| Deployment characteristic | Result |
| --- | --- |
| Benign-response false-positive rate | 0.02% average across 5 datasets |
| Decode overhead | < 0.5% |
## Quick Start
Install the [SingProbe build of SGLang](https://github.com/inclusionAI/SingProbe/tree/main/sglang#token-probe-inference). The example below downloads the probe and starts an eight-GPU server with the matching base model.
```bash
export MODEL_PATH=zai-org/GLM-5.3-Flash
export PROBE_CKPT="$PWD/GLM-5.3-Flash-singprobe"
hf download inclusionAI/GLM-5.3-Flash-singprobe --local-dir "$PROBE_CKPT"
unset SGLANG_TOKEN_PROBE_SAVE_DIR
python3 -m sglang.launch_server \
--model-path "$MODEL_PATH" --probe-ckpt "$PROBE_CKPT" \
--trust-remote-code --tp-size 8 --ep-size 8 \
--context-length 16384 --chunked-prefill-size -1 \
--max-prefill-tokens 8192 --max-total-tokens 32768 \
--max-running-requests 4 --mem-fraction-static 0.85 \
--cuda-graph-backend-prefill disabled --cuda-graph-backend-decode disabled \
--port 30000
```
Read the per-token scores from `meta_info.token_probe_probs` in the `/generate` response. Keys `label_0` through `label_7` score query intent, `label_8` scores response unsafety, and `label_9` scores hallucination risk.
For vLLM, see the [vLLM integration branch](https://github.com/jinzhen-lin/vllm/tree/bailing-v3-token-probe).
## Citation
```bibtex
@article{singteam2026singprobe,
title = {SingProbe Technical Report},
author = {Sing Team},
journal = {arXiv preprint arXiv:2608.30703},
year = {2026},
}
```