CoolFace
Modelpublic

ReRaWo/Sentinel

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
2likes11downloads
Model Card

Sentinel Probing Classifier (Logistic Regression)

This repository contains the sentence-level classifier used in Sentinel, a lightweight context compression framework introduced in our paper:

Sentinel: Attention Probing of Proxy Models for LLM Context Compression with an Understanding Perspective Yong Zhang, Yanwen Huang, Ning Cheng, Yang Guo, Yun Zhu, Yanmeng Wang, Shaojun Wang, Jing Xiao ๐Ÿ“„ Paper (Arxiv 2025)โ€ƒ|โ€ƒ๐Ÿ’ป Code on GitHub

๐Ÿง  What is Sentinel?

Sentinel reframes LLM context compression as a lightweight attention-based understanding task. Instead of fine-tuning a full compression model, it:

  • โ€”Extracts decoder attention from a small proxy LLM (e.g., Qwen-2.5-0.5B)
  • โ€”Computes sentence-level attention features
  • โ€”Applies a logistic regression (LR) classifier to select relevant sentences

This approach is efficient, model-agnostic, and highly interpretable.


๐Ÿ“ฆ Files Included

FileDescription
sentinel_lr_model.pklTrained logistic regression classifier
sentinel_config.jsonFeature extraction configuration

๐Ÿš€ Usage

Use this classifier on attention-derived feature vectors to predict sentence-level relevance scores:

๐Ÿ›  Feature extraction code and full pipeline available at: ๐Ÿ‘‰ https://github.com/yzhangchuck/Sentinel

๐Ÿ“ˆ Benchmark Results

<p align="center"> <img src="longbench_gpt35.png" alt="LongBench GPT-3.5 Results" width="750"/> </p>

<p align="center"> <img src="longbench_qwen7b.png" alt="LongBench Qwen Results" width="750"/> </p>

๐Ÿ“„ Citation

Please cite us if you use this model:

@misc{zhang2025sentinelattentionprobingproxy, title={Sentinel: Attention Probing of Proxy Models for LLM Context Compression with an Understanding Perspective}, author={Yong Zhang and Yanwen Huang and Ning Cheng and Yang Guo and Yun Zhu and Yanmeng Wang and Shaojun Wang and Jing Xiao}, year={2025}, eprint={2505.23277}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2505.23277}, }

๐Ÿ“ฌ Contact

โ€ข ๐Ÿ“ง zhangyong.chuck@gmail.com โ€ข ๐Ÿ”— Project: https://github.com/yzhangchuck/Sentinel

๐Ÿ”’ License

Apache License 2.0 โ€” Free for research and commercial use with attribution.