ReRaWo commited on
Commit
d6bdae9
Β·
verified Β·
1 Parent(s): 3fcb1f8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +86 -3
README.md CHANGED
@@ -1,3 +1,86 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - zh
6
+ base_model:
7
+ - Qwen/Qwen2.5-0.5B-Instruct
8
+ tags:
9
+ - context compression
10
+ - sentence selection
11
+ - probing classifier
12
+ - attention probing
13
+ - RAG
14
+ - LongBench
15
+ ---
16
+
17
+ # Sentinel Probing Classifier (Logistic Regression)
18
+
19
+ This repository contains the sentence-level classifier used in **Sentinel**, a lightweight context compression framework introduced in our ACL 2025 paper:
20
+
21
+ > **Sentinel: Attention Probing of Proxy Models for LLM Context Compression with an Understanding Perspective**
22
+ > Yong Zhang, Yanwen Huang, Ning Cheng, Yang Guo, Yun Zhu, Yanmeng Wang, Shaojun Wang, Jing Xiao
23
+ > πŸ“„ [Paper (Arxiv 2025)](https://arxiv.org/abs/2303.08774) |β€ƒπŸ’» [Code on GitHub](https://github.com/yzhangchuck/Sentinel)
24
+
25
+ ---
26
+
27
+ ## 🧠 What is Sentinel?
28
+
29
+ **Sentinel** reframes LLM context compression as a lightweight attention-based *understanding* task. Instead of fine-tuning a full compression model, it:
30
+
31
+ - Extracts **decoder attention** from a small proxy LLM (e.g., Qwen-2.5-0.5B)
32
+ - Computes **sentence-level attention features**
33
+ - Applies a **logistic regression (LR) classifier** to select relevant sentences
34
+
35
+ This approach is efficient, model-agnostic, and highly interpretable.
36
+
37
+ ---
38
+
39
+ ## πŸ“¦ Files Included
40
+
41
+ | File | Description |
42
+ |-------------------------|----------------------------------------------|
43
+ | `sentinel_lr_model.pkl` | Trained logistic regression classifier |
44
+ | `sentinel_config.json` | Feature extraction configuration |
45
+
46
+ ---
47
+
48
+ ## πŸš€ Usage
49
+
50
+ Use this classifier on attention-derived feature vectors to predict sentence-level relevance scores:
51
+
52
+ πŸ›  Feature extraction code and full pipeline available at:
53
+ πŸ‘‰ https://github.com/yzhangchuck/Sentinel
54
+
55
+ ## πŸ“ˆ Benchmark Results
56
+ <p align="center">
57
+ <img src="longbench_gpt35.png" alt="LongBench GPT-3.5 Results" width="750"/>
58
+ </p>
59
+
60
+
61
+ <p align="center">
62
+ <img src="longbench_qwen7b.png" alt="LongBench Qwen Results" width="750"/>
63
+ </p>
64
+
65
+
66
+ ## πŸ“„ Citation
67
+ Please cite us if you use this model:
68
+
69
+ @misc{zhang2025sentinelattentionprobingproxy,
70
+ title={Sentinel: Attention Probing of Proxy Models for LLM Context Compression with an Understanding Perspective},
71
+ author={Yong Zhang and Yanwen Huang and Ning Cheng and Yang Guo and Yun Zhu and Yanmeng Wang and Shaojun Wang and Jing Xiao},
72
+ year={2025},
73
+ eprint={2505.23277},
74
+ archivePrefix={arXiv},
75
+ primaryClass={cs.CL},
76
+ url={https://arxiv.org/abs/2505.23277},
77
+ }
78
+
79
+ ## πŸ“¬ Contact
80
+ β€’ πŸ“§ [email protected]
81
+ β€’ πŸ”— Project: https://github.com/yzhangchuck/Sentinel
82
+
83
+
84
+ ## πŸ”’ License
85
+
86
+ Apache License 2.0 β€” Free for research and commercial use with attribution.