Text Classification
Transformers
Safetensors
qwen2
feature-extraction
safety
content-moderation
token-classification
custom_code
text-embeddings-inference
Instructions to use liyang-ict/SCM-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liyang-ict/SCM-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="liyang-ict/SCM-7B", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("liyang-ict/SCM-7B", trust_remote_code=True) model = AutoModel.from_pretrained("liyang-ict/SCM-7B", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("liyang-ict/SCM-7B", trust_remote_code=True)
model = AutoModel.from_pretrained("liyang-ict/SCM-7B", trust_remote_code=True)Quick Links
SCM-7B
Official SCM (Streaming Content Monitor) model based on Qwen/Qwen2.5-7B for the NeurIPS 2025 paper:
"From Judgment to Interference: Early Stopping LLM Harmful Outputs via Streaming Content Monitoring"
Model Description
SCM-7B 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.
- Base Model: Qwen/Qwen2.5-7B
- Architecture:
QwenForDualTask(custom, based onQwen2PreTrainedModel) - Parameters: 7B
Usage
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("liyang-ict/SCM-7B")
model = AutoModel.from_pretrained("liyang-ict/SCM-7B", trust_remote_code=True)
Citation
If you find this model useful, please cite our paper:
@inproceedings{NEURIPS2025_4e315702,
author = {Li, Yang and Sheng, Qiang and Yang, Yehan and Zhang, Xueyao and Cao, Juan},
booktitle = {Advances in Neural Information Processing Systems},
editor = {D. Belgrave and C. Zhang and H. Lin and R. Pascanu and P. Koniusz and M. Ghassemi and N. Chen},
pages = {54305--54333},
publisher = {Curran Associates, Inc.},
title = {From Judgment to Interference: Early Stopping LLM Harmful Outputs via Streaming Content Monitoring},
url = {https://proceedings.neurips.cc/paper_files/paper/2025/file/4e3157021c5f833bb2204081f1dda573-Paper-Conference.pdf},
volume = {38},
year = {2025}
}
License
This model is released under the Apache 2.0 License, following the license of the base Qwen2.5 model.
- Downloads last month
- 17
Model tree for liyang-ict/SCM-7B
Base model
Qwen/Qwen2.5-7B
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="liyang-ict/SCM-7B", trust_remote_code=True)