Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
license_link: https://huggingface.co/Qwen/Qwen2.5-1.5B/blob/main/LICENSE
|
| 4 |
+
library_name: transformers
|
| 5 |
+
base_model: Qwen/Qwen2.5-1.5B
|
| 6 |
+
tags:
|
| 7 |
+
- safety
|
| 8 |
+
- content-moderation
|
| 9 |
+
- qwen2
|
| 10 |
+
- text-classification
|
| 11 |
+
- token-classification
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# SCM-1.5B
|
| 15 |
+
|
| 16 |
+
Official SCM (Streaming Content Monitor) model based on [Qwen/Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B) for the NeurIPS 2025 paper:
|
| 17 |
+
|
| 18 |
+
> **"From Judgment to Interference: Early Stopping LLM Harmful Outputs via Streaming Content Monitoring"**
|
| 19 |
+
|
| 20 |
+
## Model Description
|
| 21 |
+
|
| 22 |
+
SCM-1.5B is a dual-task model that performs both **token-level** and **sequence-level** safety classification, training with a logic consistency loss to ensure coherence between the two tasks.
|
| 23 |
+
|
| 24 |
+
- **Base Model**: [Qwen/Qwen2.5-1.5B](https://huggingface.co/Qwen/Qwen2.5-1.5B)
|
| 25 |
+
- **Architecture**: `QwenForDualTask` (custom, based on `Qwen2PreTrainedModel`)
|
| 26 |
+
- **Parameters**: 1.5B
|
| 27 |
+
|
| 28 |
+
## Usage
|
| 29 |
+
|
| 30 |
+
```python
|
| 31 |
+
from transformers import AutoTokenizer, AutoModel
|
| 32 |
+
|
| 33 |
+
tokenizer = AutoTokenizer.from_pretrained("liyang-ict/SCM-1.5B")
|
| 34 |
+
model = AutoModel.from_pretrained("liyang-ict/SCM-1.5B", trust_remote_code=True)
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
## Citation
|
| 38 |
+
|
| 39 |
+
If you find this model useful, please cite our paper:
|
| 40 |
+
|
| 41 |
+
```bibtex
|
| 42 |
+
@article{li2025judgment,
|
| 43 |
+
title={From judgment to interference: Early stopping llm harmful outputs via streaming content monitoring},
|
| 44 |
+
author={Li, Yang and Sheng, Qiang and Yang, Yehan and Zhang, Xueyao and Cao, Juan},
|
| 45 |
+
journal={arXiv preprint arXiv:2506.09996},
|
| 46 |
+
year={2025}
|
| 47 |
+
}
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## License
|
| 51 |
+
|
| 52 |
+
This model is released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0), following the license of the base Qwen2.5 model.
|