PeetPedro commited on
Commit
068bc97
·
verified ·
1 Parent(s): 4d2b878

Add model card

Browse files
Files changed (1) hide show
  1. README.md +59 -0
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: answerdotai/ModernBERT-base
4
+ tags:
5
+ - token-classification
6
+ - compression
7
+ - context-compression
8
+ - headroom
9
+ language:
10
+ - en
11
+ ---
12
+
13
+ # kompress-v3
14
+
15
+ Token compression classifier fine-tuned from [chopratejas/kompress-v2-base](https://huggingface.co/chopratejas/kompress-v2-base) (ModernBERT-base, 149M params). Trained as part of the [ultrawhale](https://github.com/peterlodri-sec/ultrawhale) fine-tuning loop.
16
+
17
+ Kompress classifies each token in a message as keep (1) or drop (0). Used by the [headroom proxy](https://github.com/headroomlabs-ai/headroom) to compress LLM context before it reaches the model.
18
+
19
+ ## Eval results (heretic adversarial benchmark)
20
+
21
+ [Heretic-style prompts](https://github.com/p-e-w/heretic) generate responses maximally dense with must-keep tokens (chemical formulas, CVE identifiers, memory addresses, line numbers). The benchmark measures what fraction of those tokens survive compression.
22
+
23
+ | Metric | Value |
24
+ |---|---|
25
+ | heretic exact_pct | 0.942 |
26
+ | keep_rate | 0.728 |
27
+ | override_delta | +0.027 |
28
+ | base model | kompress-v2-base |
29
+
30
+ [Full progression across all versions](https://pocoo.vaked.dev/posts/2026-06-25-kompress-heretic-eval)
31
+
32
+ ## Training
33
+
34
+ Self-labeled references via kompress-v2-base, 1802 training pairs. mk_in_ref improved from ~0.5 (Q&A labels) to 0.720. First iteration of the ultrawhale self-labeling loop.
35
+
36
+ ## Usage
37
+
38
+ ```python
39
+ # Via headroom proxy (recommended)
40
+ # ANTHROPIC_BASE_URL=http://localhost:8787 claude
41
+
42
+ # Direct library use
43
+ from headroom import compress, CompressConfig
44
+ result = compress(messages, config=CompressConfig(kompress_model="PeetPedro/kompress-v3"))
45
+ ```
46
+
47
+ ## Series
48
+
49
+ | Version | heretic | keep_rate | Notes |
50
+ |---|---|---|---|
51
+ | v3 | 0.942 | 0.728 | first self-label |
52
+ | v3.1 | 0.925 | — | domain data |
53
+ | v3.2 | 0.929 | — | domain refined |
54
+ | v3.3 | 0.942 | — | domain-only, overfit |
55
+ | **v4** | **0.967** | **0.823** | override internalized |
56
+ | v5 | 0.961 | — | loop converged |
57
+ | **v6** | **0.962** | **0.854** | agent-distribution |
58
+
59
+ Training code: [ultrawhale](https://github.com/peterlodri-sec/ultrawhale)