Evaluate training-free attention reuse and LiSA-style calibration
This commit is contained in:
@@ -40,3 +40,29 @@ All weights and caches stay on the server until explicit user deletion. Git cont
|
||||
all figure tables and the selected small probability matrices; large caches have exact
|
||||
paths/sizes/hashes in `external-caches.json`. Old validation texts were used in earlier
|
||||
experiments; the four fresh texts were fixed before the new cross-layer measurements.
|
||||
|
||||
## LiSA-style single-layer pilot
|
||||
|
||||
The pilot reuses layer 19's actual pre-softmax scores at layer 23, with the
|
||||
recipient's own values, output gate and output projection. It compares native
|
||||
attention, direct reuse, a frozen one-to-one head assignment, linear mixing
|
||||
of donor heads, a 32-coordinate recipient-only control, and joint donor/recipient
|
||||
mixing. The linear variants use a closed-form ridge fit to the native scores,
|
||||
centred within each causal key row. The recipient branch takes a fixed subset of
|
||||
post-RoPE coordinates rather than learning a low-rank Q/K projection. The
|
||||
calibration uses 12 synthetic prompts without answer labels. All checkpoint
|
||||
weights are frozen.
|
||||
|
||||
Evaluation scores the four candidate option tokens on 24 disjoint retrieval
|
||||
prompts, including 12 with more table entries than calibration. Choice NLL
|
||||
normalizes over those four tokens. Run against the retained checkpoint on the
|
||||
remote CPU environment:
|
||||
|
||||
```sh
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m crossqkv.lisa_pilot \
|
||||
--source runs/cpu-qwen35-2b --out runs/NEW_LISA_DIRECTORY
|
||||
```
|
||||
|
||||
The diagnostic forward still computes native full Q/K and does not measure
|
||||
latency or parameter savings. Refer to LiSA (arXiv:2408.01890, §5.1) for its
|
||||
learned nonlinear head aligner and learned low-rank Q/K projections.
|
||||
|
||||
Reference in New Issue
Block a user