Views
No views yet
tis-stage3-ert upload contained a 128-step prototype training run
(stage3_ert_local_fresh) rather than the trained checkpoint. That artifact had near-zero
out_proj weights (max 0.0007) and produced non-discriminative scores (std ≈ 1.7, range 45–54
for all tokens), which explains the 0%/12.5% NIAH results reported by external testers.closed_loop_retrieval_v6 checkpoint (2000 steps,
out_proj max 0.028, score std ≈ 22, full 0–100 range).tis_components.pt: 794cb761d8d840709afb0bea6f0f9b73... (run sha256sum tis_components.pt to verify)mistralai/Mistral-7B-v0.3ImportanceUpdateHead with RMSNorm + cross-attentioncross_attn.in_proj_weight, cross_attn.in_proj_bias,
cross_attn.out_proj.weight, cross_attn.out_proj.bias, out_proj.weight,
out_proj.bias, score_norm.scale)out_proj(hidden) direct path)scripts/eval_niah_hard.py on 50 examples, context 2048 tokens, seed 42.
These are hard-NIAH numbers (answer token must appear in top-5 final-position logits).| Budget | Learned | SnapKV proxy | Heuristic | No eviction |
|---|---|---|---|---|
| 10% | 4% | 2% | 4% | 52% |
| 25% | 22% | 22% | 14% | 52% |
| 50% | 74% | 24% | 28% | 52% |
| 75% | 78% | 32% | 40% | 52% |
no_eviction ceiling is 52% because this hard evaluator tests whether the answer
token appears in the top-5 logits of the final token position. Eviction can actually improve
accuracy by removing distractors, which is the mechanism being measured here.eval_niah_hard.py evaluator uses the direct token scorer:1# Direct scorer — what eval_niah_hard.py uses
2scores = sigmoid(importance_head.out_proj(hidden)) * 100.0ImportanceUpdateHead.forward() which uses cross-attention
and RMSNorm. The direct scorer applies out_proj token-by-token to final-layer hidden states.
See Source Code README
for details on all scorer paths.1# Clone repository
2git clone https://github.com/nitroxido/token-importance-scoring.git
3cd token-importance-scoring
4
5# Setup
6python -m venv .venv && source .venv/bin/activate
7pip install -e .
8
9# Download this checkpoint
10hf download oldman-dev/tis-stage3-ert --local-dir checkpoints/stage3_ert_learned
11
12# Run hard NIAH evaluation
13python scripts/eval_niah_hard.py \
14 --learned-checkpoint checkpoints/stage3_ert_learned \
15 --budgets 0.25 0.5 0.75 \
16 --num-tests 50 \
17 --context-tokens 2048 \
18 --device cuda \
19 --seed 42transformers==4.36.0 # reference; Transformers 5 has SDPA compat issues with PatchedCausalLM
torch==2.1.2
bitsandbytes==0.41.3
python==3.11PatchedCausalLM forward path (attention mask injection conflicts
with the SDPA backend). The direct scorer (out_proj(hidden)) works under any version because
it does not go through the patched attention path.