Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea9bfd2a23 | |||
| 2f1113323e | |||
| 35090663e2 | |||
| e1514f4952 | |||
| 9e0e659287 | |||
| 52e6d13fe5 | |||
| d6d985487c | |||
| 098ea8650c | |||
| cd260a2483 | |||
| 419c7cb195 | |||
| 0934079ed9 | |||
| 9efbf0b3b1 | |||
| 5031aa604e |
@@ -4,3 +4,6 @@ results/** -text
|
||||
results/**/*.csv -whitespace
|
||||
results/**/*.svg -whitespace
|
||||
results/**/*.log -whitespace
|
||||
|
||||
# Preserve captured scientific stdout byte-for-byte, including blank final lines.
|
||||
results/head-dominance/*-output.txt -whitespace
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Model parameter similarity experiments
|
||||
|
||||
**[研究图册与固定在线副本](docs/FIGURE_GALLERY.md)**:连续分布、联合消融及原始PDF/SVG。
|
||||
|
||||
[两个实际2B检查点的参数球壳结论](docs/MODEL_SHELL_FINDINGS.md) · [完整数值报告](results/model-shell/REPORT.md) · [固定分组和均匀参照协议](model_shell/PROTOCOL.md)。
|
||||
|
||||
Research on repeated learned functions in **Qwen3.5-2B**: a completed static weight baseline
|
||||
and a training-free CPU functional pilot. The CPU study found similar existing RMSNorm
|
||||
functions at layer indices 12/13, with a uniform analytic error bound and heldout substitution checks.
|
||||
@@ -8,6 +12,12 @@ weights were deleted after archival; the functional pilot executes streaming FP3
|
||||
The current CPU functional checkpoint is retained until the user explicitly requests deletion.
|
||||
No model weights are committed here.
|
||||
|
||||
The latest cross-layer QKV study covers all 15 full-attention layer pairs. Its primary
|
||||
protocol had no passing candidate; an exploratory H23-conditioned self-token retrieval
|
||||
pattern is reported separately with its fresh-test failures.
|
||||
|
||||
- [Cross-layer QKV findings and evidence limits](docs/CROSS_LAYER_QKV_FINDINGS.md)
|
||||
- [Cross-layer QKV fixed protocol](docs/CROSS_LAYER_QKV_PROTOCOL.md)
|
||||
- [CPU learned-function repetition findings](docs/CPU_FUNCTIONAL_FINDINGS.md)
|
||||
- [Current learned-function repetition criterion](docs/LEARNED_FUNCTION_REPETITION.md)
|
||||
- [CPU-first feasibility and validation](docs/CPU_FIRST_VALIDATION.md)
|
||||
@@ -32,3 +42,20 @@ block scales are alternative partitions and their savings must not be summed.
|
||||
|
||||
Dependencies are pinned in `requirements.txt`; install only prebuilt wheels on the remote host.
|
||||
Full resolved versions and run provenance accompany each result. See the SOP for commands.
|
||||
|
||||
## CPU block activation measurements
|
||||
|
||||
See [measurement definitions](activation/README.md) and [observed activation report](results/block-activation/REPORT.md) for all 24 layers, contiguous output-channel blocks, exact/near-zero rates and output energy concentration. This is an observational SiLU-gated study, not a pruning or reuse quality claim.
|
||||
|
||||
## Adjacent-layer head influence concentration
|
||||
|
||||
The CPU study measures all 23 adjacent transitions, observation-wise effective
|
||||
head counts and Q/K/V influence shares, with equal-size weak/strong/random joint
|
||||
removal controls. See [definitions and reproduction](dominance/README.md),
|
||||
[fixed protocol](dominance/PROTOCOL.md), and [measured report](results/head-dominance/REPORT.md).
|
||||
These are descriptive intervention effects, not additive contribution probabilities
|
||||
or validated final-LM pruning gains.
|
||||
|
||||
## Existing GSM8K task-finetuning comparison
|
||||
|
||||
[Paired study and reproduction](finetune_compare/README.md) · [Fixed protocol](finetune_compare/PROTOCOL.md) · [Results](results/finetune-comparison/REPORT.md). This compares an existing pure-LoRA GRPO checkpoint to exactly the same original release; no training is performed here.
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# Observed block activation, CPU only
|
||||
|
||||
Measures the retained Qwen3.5-2B checkpoint without training or substitutions.
|
||||
This model uses SiLU-gated MLPs and sigmoid attention gates, not ReLU.
|
||||
Leaky ReLU also does not generally create exact zero on negative inputs.
|
||||
|
||||
The probe records every linear projection in all 24 layers, plus MLP SiLU
|
||||
and gate-times-up intermediates and full-attention sigmoid gates. It does not
|
||||
record every internal recurrent state, convolution output or attention probability.
|
||||
A block means contiguous **output channels** (64 or 128), hence contiguous
|
||||
rows of a projection matrix; it is not a Transformer layer or arbitrary 2D tile.
|
||||
MLP gated-product channels correspond to columns consumed by down_proj.
|
||||
It is incorrect to call an individual weight active/inactive based only on its value.
|
||||
|
||||
For every sample, module and block, metrics.csv reports:
|
||||
- exact zero and negative element fractions;
|
||||
- near-zero fractions at |x| <= 0.01 RMS and <= 0.1 RMS;
|
||||
- fraction of channels ever above 0.01 RMS over the 32 tokens;
|
||||
- minimum fraction of channels carrying 90% squared-output energy.
|
||||
|
||||
RMS is computed within each observed sample/module/block; width=0 records the
|
||||
whole module. Thus thresholds are explicitly relative and are not shared absolute
|
||||
cutoffs across layers or blocks. Activation rate at a threshold is 1-near-zero rate.
|
||||
A small value or an energy-concentrated output does not prove that a block can
|
||||
be skipped, removed or shared without affecting LM quality. Exact zero is measured
|
||||
in this FP32 streaming implementation of BF16 source weights; other execution dtypes
|
||||
can have different underflow rates.
|
||||
|
||||
Four prior authored Chinese/English texts, 32 tokens each, descriptive measurements
|
||||
only. No training, fresh-generalization claim, GPU, weight download or cleanup.
|
||||
The existing streaming implementation was checked against the official implementation
|
||||
in the earlier CPU study; this experiment changes only observation, not model equations.
|
||||
|
||||
Remote commands (authorized server 8.211.154.134):
|
||||
```
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m activation.run --source runs/cpu-qwen35-2b --out runs/NEW_ACTIVATION_DIR
|
||||
OPENBLAS_NUM_THREADS=1 venv/bin/python -B -m unittest tests.test_activation -v
|
||||
venv/bin/python -B activation/report.py runs/NEW_ACTIVATION_DIR
|
||||
```
|
||||
|
||||
run.py measures; report.py plots saved rows and derives aggregates;
|
||||
__init__.py marks the package; tests/test_activation.py checks exact sparsity,
|
||||
ever-active behavior, all-zero inputs and scale invariance. Raw activations are
|
||||
not saved or needed for these descriptive statistics. Existing caches and weights
|
||||
are retained untouched. Full sample token IDs and CPU time/RSS appear in summary.json.
|
||||
@@ -0,0 +1,28 @@
|
||||
"""Audit recorded scope, metrics and reproducibility files; no model execution."""
|
||||
import csv,json,hashlib
|
||||
from pathlib import Path
|
||||
import sys
|
||||
p=Path(sys.argv[1]);r=list(csv.DictReader((p/'metrics.csv').open()));s=json.loads((p/'summary.json').read_text())
|
||||
assert s['completed'] and len(r)==s['rows']==4*20904
|
||||
assert len({x['sample'] for x in r})==4
|
||||
assert {int(x['module'].split('.')[1]) for x in r}==set(range(24))
|
||||
for x in r:
|
||||
for k in ['zero_rate','negative_rate','near_001_rms','near_01_rms','ever_active_001','energy90_channel_fraction']:assert 0<=float(x[k])<=1,(x,k)
|
||||
assert float(x['zero_rate'])<=float(x['near_001_rms'])<=float(x['near_01_rms'])
|
||||
assert int(x['channels'])==int(x['stop'])-int(x['start'])
|
||||
a=json.loads((p/'aggregates.json').read_text());lines=['# 实测激活率:SiLU 门控模型','', '覆盖24层、4条中英文文本,每条32 token;所有投影输出及 MLP 门控中间量,按64/128输出通道分块。','', '| 输出 | 精确零比例均值 | 0.01 RMS以下均值 | 0.1 RMS以下均值 | 32 token内曾活跃通道比例均值 | 90%能量所需通道比例均值 |','|---|---:|---:|---:|---:|---:|']
|
||||
for k,v in a.items():
|
||||
cols=[v[m]['mean']*100 for m in ['zero_rate','near_001_rms','near_01_rms','ever_active_001','energy90_channel_fraction']]
|
||||
lines.append('| '+k+' | '+' | '.join(f'{z:.4f}%' for z in cols)+' |')
|
||||
blocks=[x for x in r if x['width']=='128']; dead=sum(float(x['zero_rate'])==1 for x in blocks)
|
||||
lines+=['',f'128通道块×文本观测共{len(blocks)}条,整个32 token窗口全为精确零的块观测数为{dead}。', '', '表中是整模块逐文本统计再取均值;每个分块的独立统计见 metrics.csv。阈值是各自RMS的比例;阈值下激活率=1−近零比例。能量集中不等于可删除或可替换。', '', '仅测该模型、四条短文本;不推断所有语言/长上下文。SiLU不把负值整体截零,负数不等于静默。未执行删块/跳算的质量验证。权重和既有缓存全部保留。', '',f"CPU测量耗时{s['elapsed_seconds']:.1f}秒,峰值RSS{s['peak_rss_kib']/1024:.1f} MiB。"]
|
||||
(p/'REPORT.md').write_text('\n'.join(lines)+'\n')
|
||||
lines_extra=[]
|
||||
for suffix in ['mlp.gated_product','self_attn.q_proj.output','self_attn.k_proj.output','self_attn.v_proj.output']:
|
||||
rr=[x for x in blocks if x['module'].endswith(suffix)]
|
||||
act=sorted(1-float(x['near_01_rms']) for x in rr)
|
||||
lines_extra.append(f'{suffix}: 128通道块在0.1 RMS阈值上的激活率范围 {100*act[0]:.2f}%–{100*act[-1]:.2f}%。')
|
||||
with (p/'REPORT.md').open('a') as f:f.write('\n'+'\n'.join(lines_extra)+'\n')
|
||||
(p/'audit.json').write_text(json.dumps({'passed':True,'rows':len(r),'layers':24,'samples':4,'all_zero_128_blocks':dead},indent=2))
|
||||
files=[x for x in p.rglob('*') if x.is_file() and x.name!='checksums.json'];(p/'checksums.json').write_text(json.dumps({str(x.relative_to(p)):hashlib.sha256(x.read_bytes()).hexdigest() for x in sorted(files)},indent=2))
|
||||
print((p/'REPORT.md').read_text())
|
||||
@@ -0,0 +1,38 @@
|
||||
"""Render scientific figures from recorded CPU measurements."""
|
||||
import csv,json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
import sys
|
||||
root=Path(sys.argv[1]); rows=list(csv.DictReader((root/'metrics.csv').open()))
|
||||
full=[r for r in rows if r['width']=='0']
|
||||
fig,axs=plt.subplots(1,3,figsize=(15,4.5),layout='constrained')
|
||||
for suffix,label in [('gate_proj.output','gate preactivation'),('silu_gate','SiLU gate'),('gated_product','gated product')]:
|
||||
selected=[r for r in full if r['module'].endswith('mlp.'+suffix)]
|
||||
for ax,key in zip(axs,['zero_rate','near_001_rms','near_01_rms']):
|
||||
xs=[];ys=[]
|
||||
for layer in range(24):
|
||||
z=[float(r[key]) for r in selected if r['module'].startswith(f'layers.{layer}.')];xs.append(layer);ys.append(np.mean(z))
|
||||
ax.plot(xs,ys,label=label)
|
||||
for ax,title in zip(axs,['Exact zero fraction','Near zero: |x| <= 0.01 RMS','Near zero: |x| <= 0.1 RMS']):
|
||||
ax.set(title=title,xlabel='Layer index',ylabel='Fraction');ax.set_ylim(bottom=0);ax.grid(alpha=.2)
|
||||
axs[-1].legend();fig.suptitle('Observed MLP activation sparsity: four texts, 32 tokens each; no training')
|
||||
root.joinpath('figures').mkdir(exist_ok=True)
|
||||
for ext in ('png','pdf','svg'):fig.savefig(root/'figures'/('mlp_activation.'+ext),dpi=180)
|
||||
plt.close(fig)
|
||||
blocks=[r for r in rows if r['width']=='128' and r['module'].endswith('mlp.gated_product')]
|
||||
fig,axs=plt.subplots(1,2,figsize=(12,4.5),layout='constrained')
|
||||
for ax,key,title in zip(axs,['near_01_rms','energy90_channel_fraction'],['Near-zero fraction at 0.1 block RMS','Fraction of channels carrying 90% energy']):
|
||||
matrix=[]
|
||||
for layer in range(24):
|
||||
rr=[r for r in blocks if r['module'].startswith(f'layers.{layer}.')]; starts=sorted(set(int(r['start']) for r in rr));matrix.append([np.mean([float(r[key]) for r in rr if int(r['start'])==s]) for s in starts])
|
||||
im=ax.imshow(matrix,aspect='auto',vmin=0,vmax=1);ax.set(title=title,xlabel='Contiguous 128-channel block',ylabel='Layer index');fig.colorbar(im,ax=ax)
|
||||
fig.suptitle('MLP gated-product blocks: average over four observed texts')
|
||||
for ext in ('png','pdf','svg'):fig.savefig(root/'figures'/('block_activity.'+ext),dpi=180)
|
||||
agg={}
|
||||
for suffix in ['mlp.gate_proj.output','mlp.silu_gate','mlp.gated_product','self_attn.q_proj.output','self_attn.k_proj.output','self_attn.v_proj.output']:
|
||||
rr=[r for r in full if r['module'].endswith(suffix)]
|
||||
agg[suffix]={'observations':len(rr),**{key:{'min':min(float(r[key]) for r in rr),'mean':float(np.mean([float(r[key]) for r in rr])),'max':max(float(r[key]) for r in rr)} for key in ['zero_rate','negative_rate','near_001_rms','near_01_rms','ever_active_001','energy90_channel_fraction']}}
|
||||
(root/'aggregates.json').write_text(json.dumps(agg,indent=2))
|
||||
@@ -0,0 +1,48 @@
|
||||
"""CPU-only observed activation sparsity; no checkpoint changes or training."""
|
||||
import json,csv,time,resource,hashlib
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from tokenizers import Tokenizer
|
||||
from functional.model import StreamingLM,silu,sigmoid
|
||||
|
||||
|
||||
def metrics(x):
|
||||
x=np.asarray(x,dtype=np.float64).reshape(-1,x.shape[-1]); a=np.abs(x); energy=np.square(x).sum(0); total=energy.sum()
|
||||
rms=float(np.sqrt(np.mean(x*x))); cutoff=.01*rms
|
||||
ordered=np.sort(energy)[::-1]; n90=int(np.searchsorted(np.cumsum(ordered),.9*total)+1) if total else 0
|
||||
return dict(elements=x.size,channels=x.shape[-1],rms=rms,zero_rate=float(np.mean(x==0)),negative_rate=float(np.mean(x<0)),near_001_rms=float(np.mean(a<=cutoff)),near_01_rms=float(np.mean(a<=.1*rms)),ever_active_001=float(np.mean(np.any(a>cutoff,axis=0))),channels_for_90pct_energy=n90,energy90_channel_fraction=n90/x.shape[-1])
|
||||
|
||||
class Probe(StreamingLM):
|
||||
def record(self,x,name):
|
||||
for width in (0,64,128):
|
||||
for start in range(0,x.shape[-1],width or x.shape[-1]):
|
||||
stop=min(start+(width or x.shape[-1]),x.shape[-1]); z=x[...,start:stop]
|
||||
self.rows.append(dict(sample=self.sample,module=name,width=width,start=start,stop=stop,**metrics(z)))
|
||||
def linear(self,x,name,rows=256):
|
||||
y=super().linear(x,name,rows); self.record(y,name+'.output')
|
||||
if name.endswith('self_attn.q_proj'):
|
||||
dim=self.config['head_dim']; mixed=y.reshape(*y.shape[:-1],-1,2*dim)
|
||||
self.record(sigmoid(mixed[...,dim:]).reshape(*y.shape[:-1],-1),name+'.sigmoid_gate')
|
||||
return y
|
||||
def mlp(self,h,layer):
|
||||
p=f'layers.{layer}.mlp.'; pre=self.linear(h,p+'gate_proj'); g=silu(pre); u=self.linear(h,p+'up_proj')
|
||||
self.record(g,p+'silu_gate'); self.record(g*u,p+'gated_product')
|
||||
return self.linear(g*u,p+'down_proj')
|
||||
|
||||
def main():
|
||||
import argparse
|
||||
p=argparse.ArgumentParser();p.add_argument('--source',type=Path,required=True);p.add_argument('--out',type=Path,required=True);a=p.parse_args();a.out.mkdir(parents=True,exist_ok=False)
|
||||
started=time.monotonic();cfg=json.loads((a.source/'model_config.json').read_text()); lm=Probe(a.source/'weights',cfg,seconds=3600);lm.rows=[]
|
||||
samples=json.loads(Path('crossqkv/fresh_samples.json').read_text())['samples'];tok=Tokenizer.from_file(str(a.source/'tokenizer.json'))
|
||||
for s in samples:
|
||||
lm.sample=s['id']; ids=tok.encode(s['text']).ids[:32];s['token_ids']=ids
|
||||
lm.forward(np.array([ids],dtype=np.int64))
|
||||
first=not (a.out/'metrics.csv').exists()
|
||||
with (a.out/'metrics.csv').open('a') as f:
|
||||
w=csv.DictWriter(f,fieldnames=list(lm.rows[0]))
|
||||
if first:w.writeheader()
|
||||
w.writerows(lm.rows)
|
||||
print('completed',s['id'],len(lm.rows),flush=True);lm.rows.clear()
|
||||
summary={'completed':True,'elapsed_seconds':time.monotonic()-started,'peak_rss_kib':resource.getrusage(resource.RUSAGE_SELF).ru_maxrss,'config_activation':lm.config.get('hidden_act'),'layer_count':len(lm.config['layer_types']),'samples':samples,'rows':sum(1 for _ in (a.out/'metrics.csv').open())-1,'block_widths':[64,128],'threshold_reference':'RMS within each sample/module/block, thresholds 0.01 and 0.1; exact zero measured separately','training':False,'weights_deleted':False,'limits':['4 short texts, 32 tokens each, descriptive only','Block is contiguous output channels, not Transformer block','Small output does not prove removable computation or parameter interchangeability','All samples previously used; no generalization claim','Relative threshold differs between blocks; width=0 is whole module reference']}
|
||||
(a.out/'summary.json').write_text(json.dumps(summary,indent=2))
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,42 @@
|
||||
# Cross-layer QKV CPU study
|
||||
|
||||
This phase targets learned QKV functions across different layers, independent of cost.
|
||||
The six full-attention layers (indices 3/7/11/15/19/23) form 15 unordered pairs.
|
||||
No within-layer Q/K/V substitution, training, continuous R fitting, GPU, or new model download.
|
||||
|
||||
Read [fixed primary protocol](../docs/CROSS_LAYER_QKV_PROTOCOL.md) and
|
||||
[findings with evidence limits](../docs/CROSS_LAYER_QKV_FINDINGS.md).
|
||||
The original main protocol had no passing candidate. A later fixed one-source audit
|
||||
showed near-self-token retrieval and small readout errors, but failed strict fresh
|
||||
mean-JS/row-JS-P95/row-TV-P95 criteria; it is not relabeled as a primary pass.
|
||||
|
||||
- `core.py`: exact discrete head assignment, actual attention parts, common-space head
|
||||
decomposition, fixed recipient V/gate/O transplants and temporal-cache controls.
|
||||
- `protocol.py`, `fresh_samples.json`: predeclared layer/unit/gate scope and untouched fresh texts.
|
||||
- `run.py`, `fresh.py`: calibration, frozen selection, old validation and gated fresh/network steps.
|
||||
- `conditional.py`: separately registered post-screen metric audit on one fixed H23 candidate;
|
||||
no fallback selection or later threshold changes.
|
||||
- `audit_case.py`: recompute selected fresh probabilities, self mass, shared top5 mass and
|
||||
actual-H3 versus same-H23 difference; no full-network intervention after failure.
|
||||
- `report.py`, `audit.py`: saved-data scientific plots, raw-count/matching/probability audits,
|
||||
SHA256 and explicit small Git delivery with external large-cache metadata.
|
||||
|
||||
Use the authorized remote CPU environment with the retained source checkpoint/cache:
|
||||
|
||||
```sh
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m unittest tests.test_crossqkv -v
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 timeout 7200 venv/bin/python -B -m crossqkv.run --source runs/cpu-qwen35-2b --root runs/NEW_QKV_DIRECTORY
|
||||
```
|
||||
|
||||
The main run requires a fresh directory and never overwrites prior protocol evidence.
|
||||
The recorded execution used `runs/cross-layer-qkv-v2` after fixing a controls-variable
|
||||
shadowing error in the first attempt; old logs and its profile cache are retained.
|
||||
The first attempt took about 10.3 seconds, then a 60-second reserve was deducted from
|
||||
the next 7140-second run limit. The main study finished in about 74.8 seconds.
|
||||
The fixed conditional audit used only remaining shared budget and took about 105.3 seconds.
|
||||
Final tests/plots/audits fit comfortably within the two-hour computation budget.
|
||||
|
||||
All weights and caches stay on the server until explicit user deletion. Git contains
|
||||
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.
|
||||
@@ -0,0 +1 @@
|
||||
"""Cross-layer learned QKV function comparisons, CPU only."""
|
||||
@@ -0,0 +1,95 @@
|
||||
"""Audit and package only science outputs; retain all weights/profile caches."""
|
||||
import argparse
|
||||
import csv
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import time
|
||||
import numpy as np
|
||||
from functional.run import write_json
|
||||
from .protocol import LAYERS,PAIRS
|
||||
from .core import assignment
|
||||
|
||||
|
||||
def digest(path):
|
||||
h=hashlib.sha256()
|
||||
with path.open('rb') as f:
|
||||
while b:=f.read(4*1024*1024):h.update(b)
|
||||
return h.hexdigest()
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--root',type=Path,required=True);p.add_argument('--source',type=Path,required=True);p.add_argument('--output',type=Path,required=True);a=p.parse_args();root=a.root.resolve();source=a.source.resolve();out=a.output.resolve();assert root!=out
|
||||
status=json.loads((root/'status.json').read_text());assert status['state']=='completed' and status['last_source_layer']==23 and status['last_pair']==[19,23]
|
||||
expected={'full_attention':15,'qkv_head':960,'qk_map':30,'qk_head':960,'v_group':60};assert status['candidate_counts']==expected
|
||||
summary=json.loads((root/'calibration-summary.json').read_text());assert len(summary)==2025
|
||||
assert not status['selected'] and all(not x['strict_pass'] and not x['approximate_pass'] for x in summary)
|
||||
selection=json.loads((root/'selection.json').read_text());assert selection['qk_head_prequalified']==selection['v_group_prequalified']==0
|
||||
from collections import defaultdict
|
||||
rawout=defaultdict(list)
|
||||
for r in csv.DictReader((root/'calibration-output-metrics.csv').open()):rawout[r['candidate']].append(r)
|
||||
for c in summary:
|
||||
if c['output_verified']:
|
||||
rr=rawout[c['id']];assert len(rr)==c['output_observations']
|
||||
worst=max(max(float(r['error_a']),float(r['error_b'])) for r in rr)
|
||||
assert abs(worst-c['worst_output_error'])<1e-12 and worst>.20
|
||||
assert min(c['worst_mean_js'] for c in summary if c['kind']=='qk_head')>.05
|
||||
assert min(c['worst_value_error'] for c in summary if c['kind']=='v_group')>.20
|
||||
|
||||
rows=list(csv.DictReader((root/'head-assignment-costs.csv').open()));assert len(rows)==960
|
||||
for i,j in PAIRS:
|
||||
r=[x for x in rows if int(x['i'])==i and int(x['j'])==j];cost=np.empty((8,8));chosen=[]
|
||||
for x in r:
|
||||
ha,hb=int(x['head_i']),int(x['head_j']);cost[ha,hb]=float(x['calibration_mean_js'])
|
||||
if x['chosen']=='True':chosen.append((ha,hb))
|
||||
assert len(chosen)==8;assert [b for _,b in sorted(chosen)]==assignment(cost)
|
||||
tests=(root/'final-tests.txt').read_text();assert 'Ran 20 tests' in tests and '\nOK\n' in tests
|
||||
cond=json.loads((root/'conditional-status.json').read_text());assert cond['state']=='completed' and cond['fresh_function_pass'] is False
|
||||
case=json.loads((root/'conditional-case-audit.json').read_text());assert case['passed_recomputation'] and case['no_success_relabeling']
|
||||
assert len(case['strict_failures'])==3 and case['network_intervention_not_run_due_to_fresh_gate_failure']
|
||||
assert cond['shared_budget_seconds_including_60s_early_reserve']+600<7200
|
||||
prob=np.load(root/'conditional-fresh-probabilities.npz');target=prob['target_layer23_head6'];donor=prob['donor_layer3_head7_on_H23']
|
||||
from .core import distribution_metrics
|
||||
from .conditional import tv_metrics
|
||||
metric={**distribution_metrics(target,donor),**tv_metrics(target,donor)}
|
||||
fresh=[r for r in csv.DictReader((root/'conditional-function-metrics.csv').open()) if r['split']=='fresh_test']
|
||||
assert len(fresh)==4
|
||||
for k,values in metric.items():
|
||||
if k in fresh[0] and values[0] is not None:np.testing.assert_allclose(values,[float(r[k]) for r in fresh],atol=1e-12,rtol=1e-12)
|
||||
for file in root.glob('*.csv'):
|
||||
with file.open() as f:
|
||||
for r in csv.DictReader(f):
|
||||
for value in r.values():
|
||||
if value in ('',None):continue
|
||||
try:x=float(value)
|
||||
except ValueError:continue
|
||||
assert np.isfinite(x),(file,value)
|
||||
weights=json.loads((source/'manifest.json').read_text());assert weights['revision']=='15852e8c16360a2fea060d615a32b45270f8a8fc'
|
||||
for entry in weights['files']:
|
||||
if entry['name'].endswith('.safetensors'):assert (source/'weights'/entry['name']).stat().st_size==entry['bytes'] and entry['sha256']==entry['upstream_sha256']
|
||||
assert json.loads((source/'retention-policy.json').read_text())['automatic_cleanup'] is False
|
||||
reference=json.loads((source/'reference-check.json').read_text());assert reference['implementation_sha256']==digest(Path('functional/model.py'))
|
||||
write_json(root/'final-source-hashes.json',{str(file):digest(file) for file in [*sorted(Path('crossqkv').glob('*.py')),Path('crossqkv/fresh_samples.json'),Path('tests/test_crossqkv.py'),Path('functional/model.py')]})
|
||||
caches=[]
|
||||
for file in sorted((root/'cache').glob('*')):
|
||||
if file.is_file():caches.append({'server_path':str(file),'bytes':file.stat().st_size,'sha256':digest(file),'retained':True})
|
||||
old_cache=root.parent/'cross-layer-qkv'/'cache'/'calibration-source-3.npz'
|
||||
if old_cache.exists():caches.append({'server_path':str(old_cache),'bytes':old_cache.stat().st_size,'sha256':digest(old_cache),'retained':True,'failed_attempt_cache':True})
|
||||
write_json(root/'external-caches.json',{'host':'8.211.154.134','source_weights_directory':str(source/'weights'),'source_baseline_cache':str(source/'baseline-activations.npz'),
|
||||
'files':caches,'automatic_deletion':False,'all_figure_source_tables_and_selected_probabilities_in_git':True})
|
||||
(root/'DELIVERY.md').write_text('# Cross-layer QKV scientific delivery\n\nAll plot CSV/JSON, the selected fresh probability matrices, protocols, reference tests and failure logs are included.\nLarge intermediate profiles remain on 8.211.154.134 with locations/sizes/SHA256 in external-caches.json.\nThe fixed checkpoint and all caches are retained until explicit user deletion. No weights are committed.\nThe primary protocol has no passing candidate. The later fixed conditional audit is exploratory and its strict fresh checks failed; observed readout overlap is reported without relabeling it a complete pass.\n')
|
||||
out.mkdir(exist_ok=True,parents=True)
|
||||
files=[f for f in root.iterdir() if f.is_file() and f.name not in ('checksums.json','audit-validation.json','archive-files.json')]
|
||||
files += list((root/'figures').glob('*'))
|
||||
for file in files:
|
||||
dest=out/file.relative_to(root);dest.parent.mkdir(exist_ok=True,parents=True);shutil.copy2(file,dest)
|
||||
checks={str(f.relative_to(out)):digest(f) for f in sorted(out.rglob('*')) if f.is_file() and f.name not in ('checksums.json','audit-validation.json','archive-files.json')}
|
||||
write_json(out/'checksums.json',checks)
|
||||
write_json(out/'archive-files.json',[*checks,'checksums.json','audit-validation.json','archive-files.json'])
|
||||
write_json(out/'audit-validation.json',{'passed':True,'validated_unix':time.time(),'checksummed_files':len(checks),'primary_counts_rechecked':expected,
|
||||
'fresh_probabilities_independently_recomputed':True,'no_unrun_network_quality_claims':True,'all_weights_and_caches_retained':True})
|
||||
print(json.dumps({'passed':True,'checksummed_files':len(checks),'external_cache_files':len(caches),'weights_retained':True}))
|
||||
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,62 @@
|
||||
"""Recompute the frozen exploratory case for transparent plotted probabilities.
|
||||
|
||||
No new selection, no threshold changes, no full-network intervention after failure.
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from functional.run import save_csv,write_json
|
||||
from .core import QKVModel,distribution_metrics
|
||||
from .conditional import tv_metrics
|
||||
|
||||
|
||||
def ranks_and_mass(a,b):
|
||||
result=[]
|
||||
for bi in range(a.shape[0]):
|
||||
d={'target_self_mass':[],'donor_self_mass':[],'argmax_agreement':[],'shared_top5_mass_target':[],'shared_top5_mass_donor':[]}
|
||||
for t in range(7,32):
|
||||
x,y=a[bi,0,t,:t+1],b[bi,0,t,:t+1]
|
||||
common=np.intersect1d(np.argsort(x)[-5:],np.argsort(y)[-5:])
|
||||
d['target_self_mass'].append(float(x[t]));d['donor_self_mass'].append(float(y[t]))
|
||||
d['argmax_agreement'].append(float(np.argmax(x)==np.argmax(y)))
|
||||
d['shared_top5_mass_target'].append(float(x[common].sum()));d['shared_top5_mass_donor'].append(float(y[common].sum()))
|
||||
result.append({k:float(np.mean(v)) for k,v in d.items()})
|
||||
return result
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--source',type=Path,required=True);p.add_argument('--root',type=Path,required=True);args=p.parse_args();root=args.root;source=args.source
|
||||
status=json.loads((root/'conditional-status.json').read_text());assert status['state']=='completed'
|
||||
data=np.load(root/'cache'/'conditional-fresh-inputs.npz')
|
||||
samples=json.loads((root/'conditional-fresh-samples.json').read_text())['samples']
|
||||
lm=QKVModel(source/'weights',json.loads((source/'model_config.json').read_text()),seconds=300)
|
||||
own=lm.parts(data['attn_23'],23);same=lm.parts(data['attn_23'],3);actual=lm.parts(data['attn_3'],3)
|
||||
target=own['p'][:,6:7];donor=same['p'][:,7:8];cached=actual['p'][:,7:8]
|
||||
np.savez(root/'conditional-fresh-probabilities.npz',target_layer23_head6=target,donor_layer3_head7_on_H23=donor,donor_layer3_head7_on_H3=cached)
|
||||
rows=[]
|
||||
from .run import outrows
|
||||
for mode,profile,prob in [('same_H23',same,donor),('actual_H3_to_H23',actual,cached)]:
|
||||
stats={**distribution_metrics(target,prob),**tv_metrics(target,prob)}
|
||||
mass=ranks_and_mass(target,prob)
|
||||
changed=lm.head_transplant_output(own,profile,23,6,7)
|
||||
out=outrows(own['heads'][:,:,6],changed,samples,{},1e-6,1e-6)
|
||||
for n,s in enumerate(samples):rows.append({'mode':mode,'sample':s['id'],**mass[n],**{k:(None if v[n] is None else float(v[n])) for k,v in stats.items()},'head_output_error':max(out[n]['error_a'],out[n]['error_b'])})
|
||||
save_csv(root/'conditional-fresh-source-diagnostic.csv',rows)
|
||||
with (root/'conditional-function-metrics.csv').open() as f:import csv;allrows=list(csv.DictReader(f))
|
||||
failures=[]
|
||||
for r in allrows:
|
||||
if r['split']!='fresh_test':continue
|
||||
for field,limit in [('js',.01),('js_p95',.05),('total_variation',.10),('total_variation_p95',.20)]:
|
||||
if float(r[field])>limit:failures.append({'sample':r['sample'],'field':field,'value':float(r[field]),'limit':limit})
|
||||
same_rows=[r for r in rows if r['mode']=='same_H23']
|
||||
classification='self_token_dominated' if min(min(r['target_self_mass'],r['donor_self_mass']) for r in same_rows)>.85 else 'inspect detailed source diagnostic'
|
||||
write_json(root/'conditional-case-audit.json',{'passed_recomputation':True,'strict_failures':failures,'pattern_classification':classification,
|
||||
'minimum_same_input_target_self_mass':min(r['target_self_mass'] for r in same_rows),'minimum_same_input_donor_self_mass':min(r['donor_self_mass'] for r in same_rows),
|
||||
'minimum_same_input_argmax_agreement':min(r['argmax_agreement'] for r in same_rows),
|
||||
'minimum_shared_top5_probability_mass':min(min(r['shared_top5_mass_target'],r['shared_top5_mass_donor']) for r in same_rows),
|
||||
'maximum_same_input_head_output_error':max(r['head_output_error'] for r in same_rows),
|
||||
'no_success_relabeling':True,'network_intervention_not_run_due_to_fresh_gate_failure':True})
|
||||
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,113 @@
|
||||
"""One explicitly exploratory, fixed-candidate audit of unweighted top-k rejection.
|
||||
|
||||
Primary protocol remains unchanged/negative. A new confirmation uses untouched
|
||||
fresh texts; no further candidate selection, threshold tuning, weights or R fitting.
|
||||
"""
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import resource
|
||||
import time
|
||||
import traceback
|
||||
import numpy as np
|
||||
from tokenizers import Tokenizer
|
||||
from functional.run import write_json,save_csv
|
||||
from .core import InterventionLM,distribution_metrics,output_metrics
|
||||
from .run import head_floor,rows_for
|
||||
|
||||
CANDIDATE={'id':'conditional_qk_head_3_23_7_6','kind':'qk_head','i':3,'j':23,'a':7,'b':6,'perm':None}
|
||||
PROTOCOL={'classification':'post-screen exploratory metric audit; not a primary-protocol positive',
|
||||
'candidate':CANDIDATE,'conditioning_input_layer':23,'donor_projection_layer':3,'target_head':6,'donor_head':7,
|
||||
'selection_basis':'one minimum worst-text JS among the already measured source-conditioned pairs; no raw readout/fresh data used',
|
||||
'js_max':.01,'js_row_p95_max':.05,'mean_total_variation_max':.10,'row_total_variation_p95_max':.20,
|
||||
'target_head_output_relative_l2_max':.20,'target_head_output_cosine_min':.98,
|
||||
'primary_query_positions':list(range(7,32)),'top5_is_diagnostic_only':True,
|
||||
'active_head_required':True,'no_candidate_fallback':True,'fresh_text_file':'crossqkv/fresh_samples.json',
|
||||
'same_input_network_direction':'layer23 head6 uses QK probability of layer3 head7 recomputed on H23',
|
||||
'actual_cache_separate':'layer3 probability on H3 reused at23; different-input diagnostic, not function-equivalence evidence',
|
||||
'quality_gate':{'mean_nll_delta_max':.01,'per_text_p95_nll_delta_max':.05},'training':False,'R_fitting':False,'cost_required':False}
|
||||
|
||||
|
||||
def tv_metrics(a,b):
|
||||
tv=.5*np.sum(np.abs(a.astype(np.float64)-b.astype(np.float64)),axis=-1)[:,:,7:]
|
||||
return {'total_variation':tv.mean((1,2)),'total_variation_p95':np.quantile(tv.reshape(tv.shape[0],-1),.95,axis=1)}
|
||||
|
||||
|
||||
def evaluate(lm,h,samples,split,donor_h=None):
|
||||
target=lm.parts(h,23);donor=lm.parts(h if donor_h is None else donor_h,3)
|
||||
a,b=target['p'][:,6:7],donor['p'][:,7:8]
|
||||
pm={**distribution_metrics(a,b),**tv_metrics(a,b)}
|
||||
changed=lm.head_transplant_output(target,donor,23,6,7)
|
||||
om=output_metrics(target['heads'][:,7:,6],changed[:,7:]);floor=head_floor(target)
|
||||
uniform=np.zeros_like(a)
|
||||
for t in range(a.shape[-1]):uniform[:,:,t,:t+1]=1/(t+1)
|
||||
null=distribution_metrics(a,uniform)
|
||||
rows=rows_for({**pm,**{f'output_{k}':v for k,v in om.items()},'target_uniform_js':null['js']},samples,{'split':split,'mode':'same_H23' if donor_h is None else 'actual_H3_to_H23'})
|
||||
for n,r in enumerate(rows):r['active']=bool(om['rms_a'][n]>=floor[n] and om['rms_b'][n]>=floor[n])
|
||||
passed=all(r['js']<=.01 and r['js_p95']<=.05 and r['total_variation']<=.10 and r['total_variation_p95']<=.20 and
|
||||
max(r['output_error_a'],r['output_error_b'])<=.20 and r['output_cosine']>=.98 and r['active'] for r in rows)
|
||||
return rows,passed
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--source',type=Path,required=True);p.add_argument('--root',type=Path,required=True);a=p.parse_args();source=a.source.resolve();root=a.root.resolve()
|
||||
assert not (root/'conditional-protocol.json').exists(),'Fresh conditional audit protocol required'
|
||||
write_json(root/'conditional-protocol.json',{**PROTOCOL,'registered_unix':time.time(),'fresh_text_sha256':hashlib.sha256(Path(__file__).with_name('fresh_samples.json').read_bytes()).hexdigest()})
|
||||
prior=json.loads((root/'status.json').read_text());assert prior['state']=='completed' and not prior['selected']
|
||||
reserve=prior['elapsed_seconds']+60
|
||||
remaining=int(7200-reserve-180)
|
||||
if remaining<120:raise TimeoutError('Insufficient shared two-hour budget')
|
||||
started=time.monotonic();status={'state':'running','phase':'calibration_readout','primary_protocol_unchanged_and_negative':True}
|
||||
rows=[]
|
||||
try:
|
||||
lm=InterventionLM(source/'weights',json.loads((source/'model_config.json').read_text()),seconds=remaining)
|
||||
old=json.loads((source/'samples-tokenized.json').read_text())['samples'];data=np.load(source/'baseline-activations.npz')
|
||||
for split in ('calibration','heldout'):
|
||||
index=np.array([i for i,s in enumerate(old) if s['split']==split]);samples=[old[i] for i in index]
|
||||
rr,passed=evaluate(lm,data['attn_23'][index],samples,split)
|
||||
rows.extend(rr);save_csv(root/'conditional-function-metrics.csv',rows)
|
||||
status[split+'_pass']=passed
|
||||
write_json(root/'conditional-status.json',status)
|
||||
if not passed:
|
||||
status['stop_reason']=f'{split} probability-mass/readout/activity screen failed';break
|
||||
else:
|
||||
fresh=json.loads(Path(__file__).with_name('fresh_samples.json').read_text())['samples'];tokenizer=Tokenizer.from_file(str(source/'tokenizer.json'));ids=[]
|
||||
for s in fresh:
|
||||
tokens=tokenizer.encode(s['text'],add_special_tokens=False).ids;assert len(tokens)>=32
|
||||
s.update(token_ids=tokens[:32],full_token_count=len(tokens),text_sha256=hashlib.sha256(s['text'].encode()).hexdigest());ids.append(tokens[:32])
|
||||
ids=np.array(ids,dtype=np.int64);write_json(root/'conditional-fresh-samples.json',{'samples':fresh,'candidate_already_fixed':True})
|
||||
status['phase']='fresh_baseline';write_json(root/'conditional-status.json',status)
|
||||
h,inputs=lm.forward(ids,capture=[('attn',3),('attn',23)])
|
||||
np.savez(root/'cache'/'conditional-fresh-inputs.npz',**inputs,final=h)
|
||||
base=lm.nll(h,ids);np.save(root/'conditional-fresh-baseline-token-nll.npy',base)
|
||||
rr,passed=evaluate(lm,inputs['attn_23'],fresh,'fresh_test');rows.extend(rr);save_csv(root/'conditional-function-metrics.csv',rows)
|
||||
status['fresh_function_pass']=passed
|
||||
if passed:
|
||||
status['phase']='one_direction_same_input_network';write_json(root/'conditional-status.json',status)
|
||||
lm.configure(CANDIDATE,reverse=True,cached=False);changed,_=lm.forward(ids);nll=lm.nll(changed,ids);np.save(root/'conditional-same-input-network-token-nll.npy',nll)
|
||||
delta=nll.mean(1)-base.mean(1)
|
||||
network={'mode':'layer23_head6_uses_layer3_head7_on_H23','sequence_nll_deltas':delta.tolist(),'mean_nll_delta':float(delta.mean()),'sequence_p95_nll_delta':float(np.quantile(delta,.95)),
|
||||
'quality_pass':bool(delta.mean()<=.01 and np.quantile(delta,.95)<=.05),'one_direction_only':True}
|
||||
write_json(root/'conditional-network.json',network);status['same_input_network_quality_pass']=network['quality_pass']
|
||||
# Check the actual-cache probability/readout separately, then run its network experiment.
|
||||
cached_rows,cached_function_pass=evaluate(lm,inputs['attn_23'],fresh,'fresh_test_actual_cache',donor_h=inputs['attn_3'])
|
||||
save_csv(root/'conditional-actual-cache-metrics.csv',cached_rows)
|
||||
status['actual_cache_function_screen_pass']=cached_function_pass
|
||||
lm.configure(CANDIDATE,reverse=True,cached=True);changed,_=lm.forward(ids);nll=lm.nll(changed,ids);np.save(root/'conditional-actual-cache-network-token-nll.npy',nll)
|
||||
delta=nll.mean(1)-base.mean(1)
|
||||
cache={'mode':'actual_layer3_H3_probability_reused_at23_H23','sequence_nll_deltas':delta.tolist(),'mean_nll_delta':float(delta.mean()),'sequence_p95_nll_delta':float(np.quantile(delta,.95)),
|
||||
'quality_pass':bool(delta.mean()<=.01 and np.quantile(delta,.95)<=.05),'different_hidden_inputs':True}
|
||||
write_json(root/'conditional-actual-cache-network.json',cache);status['actual_cache_network_quality_pass']=cache['quality_pass']
|
||||
status.update(state='completed',phase='done',conditional_function_positive=bool(status.get('fresh_function_pass')),
|
||||
position_pattern_classification='near_uniform' if rows and max(r['target_uniform_js'] for r in rows)<=.01 else 'inspect first-key/self/recent3 masses',
|
||||
claim_limit='Single-source H23-conditioned, single-head QK probability/readout similarity; not bidirectional, not V similarity, not full-QKV-head equivalence; exploratory addendum independently fresh-tested.')
|
||||
except Exception as exc:
|
||||
status.update(state='stopped',error_type=type(exc).__name__,error=str(exc));(root/'conditional-error.txt').write_text(traceback.format_exc());raise
|
||||
finally:
|
||||
status.update(elapsed_seconds=time.monotonic()-started,peak_rss_kib=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss,
|
||||
shared_budget_seconds_including_60s_early_reserve=reserve+time.monotonic()-started)
|
||||
write_json(root/'conditional-status.json',status)
|
||||
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,171 @@
|
||||
"""Attention functions and discrete diagnostics, no continuous alignment/fitting."""
|
||||
import numpy as np
|
||||
from functional.model import StreamingLM,PREFIX,attention,rope,sigmoid
|
||||
|
||||
|
||||
def assignment(cost):
|
||||
"""Exact minimum-cost bijection via O(n^2 2^n) dynamic programming."""
|
||||
cost=np.asarray(cost,dtype=np.float64);n=cost.shape[0]
|
||||
assert cost.shape==(n,n) and n<=12 and np.isfinite(cost).all()
|
||||
states={0:(0.,())}
|
||||
for i in range(n):
|
||||
nxt={}
|
||||
for mask,(value,perm) in states.items():
|
||||
for j in range(n):
|
||||
if mask&(1<<j):continue
|
||||
key=mask|(1<<j);candidate=(value+float(cost[i,j]),perm+(j,))
|
||||
if key not in nxt or candidate<nxt[key]:nxt[key]=candidate
|
||||
states=nxt
|
||||
return list(states[(1<<n)-1][1])
|
||||
|
||||
|
||||
def inverse(perm):
|
||||
out=[0]*len(perm)
|
||||
for i,j in enumerate(perm):out[j]=i
|
||||
return out
|
||||
|
||||
|
||||
def output_metrics(a,b):
|
||||
"""Per-text directional error, cosine and output RMS. No fitted scaling."""
|
||||
x=a.reshape(a.shape[0],-1).astype(np.float64)
|
||||
y=b.reshape(b.shape[0],-1).astype(np.float64)
|
||||
xx=np.sum(x*x,-1);yy=np.sum(y*y,-1);diff=np.sum((x-y)**2,-1)
|
||||
return {'error_a':np.sqrt(diff/np.maximum(xx,1e-30)),
|
||||
'error_b':np.sqrt(diff/np.maximum(yy,1e-30)),
|
||||
'cosine':np.sum(x*y,-1)/np.maximum(np.sqrt(xx*yy),1e-30),
|
||||
'rms_a':np.sqrt(xx/x.shape[1]),'rms_b':np.sqrt(yy/y.shape[1])}
|
||||
|
||||
|
||||
def distribution_metrics(a,b):
|
||||
"""Aligned heads; primary queries have at least 8 legal keys (t>=7)."""
|
||||
a,b=a.astype(np.float64),b.astype(np.float64)
|
||||
assert a.shape==b.shape and a.shape[-1]>=8
|
||||
m=(a+b)*.5
|
||||
def term(x):return np.where(x>0,x*np.log(np.maximum(x,1e-300)/np.maximum(m,1e-300)),0)
|
||||
js=np.maximum(.5*np.sum(term(a)+term(b),axis=-1),0)
|
||||
eligible=js[...,7:]
|
||||
overlaps=[]
|
||||
for t in range(7,a.shape[-2]):
|
||||
aa=np.argsort(a[:,:,t,:t+1],axis=-1)[...,-5:]
|
||||
bb=np.argsort(b[:,:,t,:t+1],axis=-1)[...,-5:]
|
||||
overlaps.append(np.mean((aa[...,None]==bb[...,None,:]).any(-1),-1))
|
||||
# First-key ablation is diagnostic, not an unreported filter of positional repetitions.
|
||||
ar,br=a[...,1:],b[...,1:];ma,mb=ar.sum(-1),br.sum(-1)
|
||||
valid=(ma>1e-8)&(mb>1e-8)
|
||||
ar=ar/np.maximum(ma[...,None],1e-300);br=br/np.maximum(mb[...,None],1e-300)
|
||||
mr=(ar+br)*.5
|
||||
cond=.5*np.sum(np.where(ar>0,ar*np.log(np.maximum(ar,1e-300)/np.maximum(mr,1e-300)),0)+np.where(br>0,br*np.log(np.maximum(br,1e-300)/np.maximum(mr,1e-300)),0),-1)
|
||||
sink=[]
|
||||
for bi in range(a.shape[0]):
|
||||
which=valid[bi,:,7:];values=cond[bi,:,7:]
|
||||
sink.append(float(np.maximum(values[which],0).mean()) if which.any() else None)
|
||||
diag=np.stack([a[:,:,t,t] for t in range(7,a.shape[-2])],-1).mean((1,2))
|
||||
local=np.stack([a[:,:,t,max(0,t-2):t+1].sum(-1) for t in range(7,a.shape[-2])],-1).mean((1,2))
|
||||
return {'js':eligible.mean((1,2)),'js_p95':np.quantile(eligible.reshape(a.shape[0],-1),.95,axis=1),
|
||||
'top5':np.stack(overlaps,-1).mean((1,2)),'js_all_queries':js.mean((1,2)),
|
||||
'first_key_mass_a':a[:,:,7:,0].mean((1,2)),'first_key_mass_b':b[:,:,7:,0].mean((1,2)),
|
||||
'self_mass_a':diag,'recent3_mass_a':local,'js_without_first_key':sink}
|
||||
|
||||
|
||||
def cross_head_output_metrics(a,b):
|
||||
"""All head pairs, per text. a/b: [B,T,H,Dhidden]."""
|
||||
aa=a.transpose(0,2,1,3).reshape(a.shape[0],a.shape[2],-1).astype(np.float64)
|
||||
bb=b.transpose(0,2,1,3).reshape(b.shape[0],b.shape[2],-1).astype(np.float64)
|
||||
xx=np.sum(aa*aa,-1);yy=np.sum(bb*bb,-1)
|
||||
dot=np.einsum('bif,bjf->bij',aa,bb,optimize=True)
|
||||
diff=np.maximum(xx[:,:,None]+yy[:,None,:]-2*dot,0)
|
||||
return {'error_a':np.sqrt(diff/np.maximum(xx[:,:,None],1e-30)),
|
||||
'error_b':np.sqrt(diff/np.maximum(yy[:,None,:],1e-30)),
|
||||
'cosine':dot/np.maximum(np.sqrt(xx[:,:,None]*yy[:,None,:]),1e-30),
|
||||
'rms_a':np.broadcast_to(np.sqrt(xx/aa.shape[-1])[:,:,None],dot.shape),
|
||||
'rms_b':np.broadcast_to(np.sqrt(yy/bb.shape[-1])[:,None,:],dot.shape)}
|
||||
|
||||
|
||||
def value_gram_cka(a,b):
|
||||
"""Centered token Gram agreement, diagnostic only; not interchangeability."""
|
||||
a=a.astype(np.float64)-a.mean(axis=1,keepdims=True,dtype=np.float64)
|
||||
b=b.astype(np.float64)-b.mean(axis=1,keepdims=True,dtype=np.float64)
|
||||
ga=np.einsum('btd,bsd->bts',a,a);gb=np.einsum('btd,bsd->bts',b,b)
|
||||
return np.sum(ga*gb,(1,2))/np.maximum(np.sqrt(np.sum(ga*ga,(1,2))*np.sum(gb*gb,(1,2))),1e-30)
|
||||
|
||||
|
||||
class QKVModel(StreamingLM):
|
||||
def project(self,context,gate,layer):
|
||||
return self.linear((context*sigmoid(gate)).reshape(*context.shape[:2],-1),f'layers.{layer}.self_attn.o_proj')
|
||||
|
||||
def project_heads(self,context,gate,layer):
|
||||
"""Each head's contribution in the common residual output coordinates."""
|
||||
c=context*sigmoid(gate);b,t,h,d=c.shape
|
||||
weight=self.tensors[PREFIX+f'layers.{layer}.self_attn.o_proj.weight']
|
||||
outdim,indim=weight.shape;assert indim==h*d
|
||||
out=np.empty((b,t,h,outdim),dtype=np.float32)
|
||||
for start in range(0,outdim,256):
|
||||
self.guard();end=min(start+256,outdim)
|
||||
w=weight.read(slice(start*indim,end*indim)).reshape(end-start,indim)
|
||||
for head in range(h):out[:,:,head,start:end]=c[:,:,head,:]@w[:,head*d:(head+1)*d].T
|
||||
del w;weight.evict()
|
||||
return out
|
||||
|
||||
def parts(self,h,layer,heads=True):
|
||||
p=f'layers.{layer}.self_attn.';c=self.config;d=c['head_dim'];nh=c['num_attention_heads'];nk=c['num_key_value_heads']
|
||||
mixed=self.linear(h,p+'q_proj').reshape(*h.shape[:2],nh,2*d)
|
||||
q,gate=mixed[...,:d],mixed[...,d:].copy()
|
||||
k=self.linear(h,p+'k_proj').reshape(*h.shape[:2],nk,d)
|
||||
v=self.linear(h,p+'v_proj').reshape(*h.shape[:2],nk,d)
|
||||
q=self.normalization(q,p+'q_norm');k=self.normalization(k,p+'k_norm')
|
||||
r=c['rope_parameters'];q,k=(rope(x,r['rope_theta'],r['partial_rotary_factor']) for x in (q,k))
|
||||
context,probs=attention(q,k,v)
|
||||
out={'q':q,'k':k,'p':probs,'v':v,'gate':gate,'context':context,'output':self.project(context,gate,layer)}
|
||||
if heads:out['heads']=self.project_heads(context,gate,layer)
|
||||
return out
|
||||
|
||||
def transplant(self,own,donor,layer,kind,target_head=None,donor_head=None,perm=None):
|
||||
repeats=self.config['num_attention_heads']//self.config['num_key_value_heads']
|
||||
if kind=='full_attention':return donor['output']
|
||||
if kind=='qkv_head':return own['output']-own['heads'][:,:,target_head]+donor['heads'][:,:,donor_head]
|
||||
probs=own['p'].copy();v=own['v'].copy()
|
||||
if kind=='qk_map':probs=donor['p'][:,perm]
|
||||
elif kind=='qk_head':probs[:,target_head]=donor['p'][:,donor_head]
|
||||
elif kind=='v_group':v[:,:,target_head]=donor['v'][:,:,donor_head]
|
||||
else:raise ValueError(kind)
|
||||
context=np.einsum('bhts,bshd->bthd',probs,np.repeat(v,repeats,axis=2))
|
||||
return self.project(context,own['gate'],layer)
|
||||
|
||||
def head_transplant_output(self,own,donor,layer,target_head,donor_head):
|
||||
"""QK-only transplanted target head contribution; all other heads omitted."""
|
||||
repeats=self.config['num_attention_heads']//self.config['num_key_value_heads']
|
||||
c=own['context'].copy()
|
||||
c[:,:,target_head]=np.einsum('bts,bsd->btd',donor['p'][:,donor_head],own['v'][:,:,target_head//repeats])
|
||||
# Zero remaining head contexts before projection to isolate this learned subfunction.
|
||||
for head in range(c.shape[2]):
|
||||
if head!=target_head:c[:,:,head]=0
|
||||
return self.project(c,own['gate'],layer)
|
||||
|
||||
def value_group_output(self,own,donor,layer,target_group,donor_group):
|
||||
repeats=self.config['num_attention_heads']//self.config['num_key_value_heads'];c=np.zeros_like(own['context'])
|
||||
for head in range(target_group*repeats,(target_group+1)*repeats):
|
||||
c[:,:,head]=np.einsum('bts,bsd->btd',own['p'][:,head],donor['v'][:,:,donor_group])
|
||||
return self.project(c,own['gate'],layer)
|
||||
|
||||
|
||||
class InterventionLM(QKVModel):
|
||||
def configure(self,candidate,reverse=False,cached=False):
|
||||
self.candidate=candidate;self.reverse=reverse;self.use_cache=cached;self.donor_cache=None
|
||||
self.target_layer=candidate['j'] if reverse else candidate['i']
|
||||
self.donor_layer=candidate['i'] if reverse else candidate['j']
|
||||
self.target_head=candidate.get('b') if reverse else candidate.get('a')
|
||||
self.donor_head=candidate.get('a') if reverse else candidate.get('b')
|
||||
self.perm=inverse(candidate['perm']) if reverse and candidate.get('perm') else candidate.get('perm')
|
||||
if cached:assert self.donor_layer<self.target_layer,'Cannot reuse future layer state'
|
||||
|
||||
def full_attention(self,h,layer,shared_p=None):
|
||||
if not hasattr(self,'candidate'):return super().full_attention(h,layer,shared_p)
|
||||
if self.use_cache and layer==self.donor_layer:
|
||||
self.donor_cache=self.parts(h,layer,heads=self.candidate['kind']=='qkv_head')
|
||||
return self.donor_cache['output'],self.donor_cache['p']
|
||||
if layer!=self.target_layer:return super().full_attention(h,layer,shared_p)
|
||||
own=self.parts(h,layer,heads=self.candidate['kind']=='qkv_head')
|
||||
donor=self.donor_cache if self.use_cache else self.parts(h,self.donor_layer,heads=self.candidate['kind']=='qkv_head')
|
||||
assert donor is not None
|
||||
out=self.transplant(own,donor,layer,self.candidate['kind'],self.target_head,self.donor_head,self.perm)
|
||||
return out,own['p']
|
||||
@@ -0,0 +1,56 @@
|
||||
"""Fresh heldout confirmation and same-input versus actual-state interventions."""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import time
|
||||
import numpy as np
|
||||
from functional.run import write_json,save_csv
|
||||
from .protocol import LAYERS
|
||||
|
||||
|
||||
def run_fresh(source,root,c,tier,lm,status):
|
||||
from tokenizers import Tokenizer
|
||||
from .run import validate_selected,candidate_pass,summarize
|
||||
samples=json.loads(Path(__file__).with_name('fresh_samples.json').read_text())['samples']
|
||||
tokenizer=Tokenizer.from_file(str(source/'tokenizer.json'));ids=[]
|
||||
for s in samples:
|
||||
encoded=tokenizer.encode(s['text'],add_special_tokens=False).ids
|
||||
assert len(encoded)>=32,s['id']
|
||||
s.update(token_ids=encoded[:32],full_token_count=len(encoded),text_sha256=hashlib.sha256(s['text'].encode()).hexdigest())
|
||||
ids.append(encoded[:32])
|
||||
ids=np.array(ids,dtype=np.int64)
|
||||
write_json(root/'fresh-samples-tokenized.json',{'samples':samples,'selection_already_frozen':True})
|
||||
status['phase']='fresh_test_baseline';write_json(root/'status.json',status)
|
||||
h,inputs=lm.forward(ids,capture=[('attn',i) for i in LAYERS])
|
||||
np.savez(root/'cache'/'fresh-baseline-activations.npz',final=h,**inputs)
|
||||
nll=lm.nll(h,ids);np.save(root/'fresh-baseline-token-nll.npy',nll)
|
||||
checked=validate_selected(lm,c,inputs,samples,np.arange(len(samples)))
|
||||
passed=candidate_pass(checked,tier)
|
||||
write_json(root/'fresh-function-summary.json',summarize(checked))
|
||||
save_csv(root/'fresh-output-metrics.csv',checked['output_rows']);save_csv(root/'fresh-probability-metrics.csv',checked['probability_rows']);save_csv(root/'fresh-value-metrics.csv',checked['value_rows'])
|
||||
status.update(fresh_function_pass=passed,fresh_confirmation_tier=tier)
|
||||
if not passed:return
|
||||
status['phase']='same_input_network_substitution';write_json(root/'status.json',status)
|
||||
interventions=[]
|
||||
for reverse in (False,True):
|
||||
lm.configure(c,reverse=reverse,cached=False)
|
||||
t=time.monotonic();changed,_=lm.forward(ids);loss=lm.nll(changed,ids)
|
||||
label=f'{lm.target_layer}_uses_{lm.donor_layer}'
|
||||
np.save(root/f'network-{label}-token-nll.npy',loss)
|
||||
delta=loss.mean(1)-nll.mean(1)
|
||||
rec={'mode':'same_input_donor_function','target_layer':lm.target_layer,'donor_layer':lm.donor_layer,
|
||||
'target_head_or_group':lm.target_head,'donor_head_or_group':lm.donor_head,
|
||||
'sequence_nll_deltas':delta.tolist(),'mean_nll_delta':float(delta.mean()),'sequence_p95_nll_delta':float(np.quantile(delta,.95)),
|
||||
'quality_pass':bool(delta.mean()<=.01 and np.quantile(delta,.95)<=.05),'elapsed_seconds':time.monotonic()-t}
|
||||
interventions.append(rec);write_json(root/'network-interventions.json',interventions)
|
||||
# Temporal reuse is a separate intervention and only goes from earlier to later.
|
||||
status['phase']='earlier_to_later_actual_cache';write_json(root/'status.json',status)
|
||||
lm.configure(c,reverse=True,cached=True)
|
||||
changed,_=lm.forward(ids);loss=lm.nll(changed,ids);np.save(root/'network-earlier-actual-cache-token-nll.npy',loss)
|
||||
delta=loss.mean(1)-nll.mean(1)
|
||||
cache={'mode':'earlier_actual_state_reused_later','donor_layer':lm.donor_layer,'target_layer':lm.target_layer,
|
||||
'sequence_nll_deltas':delta.tolist(),'mean_nll_delta':float(delta.mean()),'sequence_p95_nll_delta':float(np.quantile(delta,.95)),
|
||||
'quality_pass':bool(delta.mean()<=.01 and np.quantile(delta,.95)<=.05),
|
||||
'not_same_input_comparison':True,'no_reverse_future_state_claim':True}
|
||||
write_json(root/'actual-cache-intervention.json',cache)
|
||||
status.update(bidirectional_same_input_network_pass=all(r['quality_pass'] for r in interventions),actual_cache_quality_pass=cache['quality_pass'])
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"origin":"Four experiment-authored fresh plain texts, fixed for this cross-layer QKV goal before measurements; no chat template, first 32 tokenizer tokens.",
|
||||
"samples":[
|
||||
{"id":"fresh-zh-1","language":"zh","text":"植物学家在不同海拔采集了叶片样本,并为每一份标本记录温度、光照和土壤湿度。回到实验室后,她按地点整理标签,先核对缺失记录,再比较不同环境中的叶片形状。"},
|
||||
{"id":"fresh-zh-2","language":"zh","text":"如果一个盒子里有十二枚蓝色棋子和八枚白色棋子,随机取出一枚后不放回,第二次取到蓝色的概率需要根据第一次的结果分别计算。请先列出各个事件,再检查它们的概率之和。"},
|
||||
{"id":"fresh-en-1","language":"en","text":"A technician recorded the vibration of a small motor before and after replacing its bearings. She used the same mounting position and sampling interval for both measurements. The final notebook included the raw traces, instrument settings, and a brief explanation of unusual observations."},
|
||||
{"id":"fresh-en-2","language":"en","text":"The function walks through a list of integers and stores each running total in a new list. An empty input should return an empty result. Before changing the implementation, compare a short example by hand and make sure negative numbers preserve the intended behavior."}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
"""Fixed protocol, constants frozen before any new cross-layer measurements."""
|
||||
from itertools import combinations
|
||||
|
||||
LAYERS=[3,7,11,15,19,23]
|
||||
PAIRS=list(combinations(LAYERS,2))
|
||||
TIERS={
|
||||
'strict':{'output_error':.05,'output_cosine':.99,'js':.01,'js_p95':.05,'top5':.8,'value_error':.05,'value_cosine':.99},
|
||||
'approximate':{'output_error':.20,'output_cosine':.98,'js':.05,'js_p95':.15,'top5':.6,'value_error':.20,'value_cosine':.98}}
|
||||
PROTOCOL={'layers':LAYERS,'layer_pairs':PAIRS,'heads':8,'kv_heads':2,'head_dim':256,
|
||||
'calibration_samples':['cal-zh-1','cal-zh-2','cal-en-1','cal-en-2'],
|
||||
'validation_samples':['test-zh-1','test-zh-2','test-en-1','test-en-2'],
|
||||
'fresh_test_file':'crossqkv/fresh_samples.json','fresh_test_count':4,'tokens_per_text':32,
|
||||
'query_positions_for_primary_metrics':list(range(7,32)),
|
||||
'candidate_types':['full_attention','qkv_head','qk_map','qk_head','v_group'],
|
||||
'discrete_head_matching':'Exact 8-head minimum mean-JS bijection, two source-layer calibration input distributions; frozen before validation; P injection only',
|
||||
'continuous_alignment':False,'training':False,'scale_fitting':False,'gpu':False,'cost_required':False,
|
||||
'tiers':TIERS,'max_qk_head_output_candidates':32,'max_v_group_output_candidates':16,
|
||||
'all_qk_map_output_candidates':30,'max_final_candidate':1,
|
||||
'selection':'strict before approximate; type priority full_attention/qkv_head/qk_map/qk_head/v_group; then worst output error, JS, ID; no validation-driven fallback',
|
||||
'head_output_activity_floor':'max(1e-6, 0.1 * within-layer median head RMS) for every calibration/validation/test text',
|
||||
'fresh_test_run_only_if_frozen_candidate_passes_validation':True,
|
||||
'network_interventions':'two same-input donor-function substitution directions; plus one earlier-to-later actual cached-state reuse test reported separately',
|
||||
'network_quality':{'mean_token_nll_delta_max':.01,'per_text_p95_nll_delta_max':.05},
|
||||
'retention':'all weights and caches retained until explicit user deletion request',
|
||||
'seconds':7200,'controls':['identity','uniform causal P','seeded within-causal-row key shuffle','first-key ablation','self/recent3 mass','value Gram to input','value Gram of two seeded Gaussian projections'],
|
||||
'positional_repeat_labels':{'sink_dominated':.90,'self_dominated':.90,'recent3_dominated':.90},
|
||||
'limitations':['Old validation texts were used in prior experiments; four fresh texts are reserved for this new goal',
|
||||
'Direct V-coordinate disagreement does not disprove V/O functional equivalence; centered value Gram CKA is diagnostic only',
|
||||
'Arbitrary P-head assignment does not authorize arbitrary GQA KV-weight permutation',
|
||||
'Short text-only pilot does not establish broad task equivalence or linear-attention reuse']}
|
||||
@@ -0,0 +1,126 @@
|
||||
"""Scientific plots from saved tables/probabilities only; no model access."""
|
||||
import argparse
|
||||
import csv
|
||||
import json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.patches import Rectangle
|
||||
from .protocol import LAYERS,PAIRS
|
||||
|
||||
|
||||
def read_csv(path):
|
||||
with path.open() as f:return list(csv.DictReader(f))
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--root',type=Path,required=True);args=p.parse_args();root=args.root;out=root/'figures';out.mkdir(exist_ok=True)
|
||||
plt.rcParams.update({'font.size':9,'pdf.fonttype':42,'svg.fonttype':'none','savefig.bbox':'tight'})
|
||||
def save(fig,name):
|
||||
for ext in ('png','pdf','svg'):fig.savefig(out/f'{name}.{ext}',dpi=180)
|
||||
plt.close(fig)
|
||||
status=json.loads((root/'status.json').read_text());summary=json.loads((root/'calibration-summary.json').read_text())
|
||||
matrices=[]
|
||||
for mode in ('qk_head','identity','matched'):
|
||||
matrix=np.full((6,6),np.nan)
|
||||
for i,j in PAIRS:
|
||||
rows=[r for r in summary if r['i']==i and r['j']==j and ((mode=='qk_head' and r['kind']=='qk_head') or (mode!='qk_head' and r['id']==f'qk_map_{i}_{j}_{mode}'))]
|
||||
value=min(r['worst_mean_js'] for r in rows)
|
||||
a,b=LAYERS.index(i),LAYERS.index(j);matrix[a,b]=matrix[b,a]=value
|
||||
matrices.append(matrix)
|
||||
fig,axes=plt.subplots(1,3,figsize=(13,4.7));vmax=max(np.nanmax(m) for m in matrices)
|
||||
for ax,m,title in zip(axes,matrices,['Best single head pair','All heads: original order','All heads: calibration bijection']):
|
||||
im=ax.imshow(m,cmap='YlOrRd',vmin=0,vmax=vmax)
|
||||
for a in range(6):
|
||||
ax.add_patch(Rectangle((a-.5,a-.5),1,1,facecolor='#eeeeee',edgecolor='#aaaaaa',hatch='///',lw=.3))
|
||||
for b in range(6):
|
||||
if a!=b:ax.text(b,a,f'{m[a,b]:.3f}',ha='center',va='center',fontsize=7,color='black' if m[a,b]<vmax*.65 else 'white')
|
||||
ax.set_xticks(range(6),LAYERS);ax.set_yticks(range(6),LAYERS);ax.set_xlabel('Layer index');ax.set_ylabel('Layer index');ax.set_title(title)
|
||||
fig.suptitle('QK retrieval divergence: worst-text mean JS over both source input sets\nCalibration only; single-head panel minimizes over 64 cross-layer head pairs; hatched diagonal unused')
|
||||
fig.subplots_adjust(top=.77,bottom=.18,right=.9,wspace=.35);cax=fig.add_axes([.92,.2,.012,.5]);fig.colorbar(im,cax=cax,label='JS (natural log); lower is closer');save(fig,'cross_layer_qk_divergence')
|
||||
order=['full_attention','qkv_head','qk_map','qk_head','v_group'];labels=['Whole attention','QKV+gate/O head','QK map transplant','QK head transplant','V group transplant']
|
||||
fig,ax=plt.subplots(figsize=(10,4.9));rng=np.random.default_rng(0)
|
||||
for idx,(kind,label) in enumerate(zip(order,labels)):
|
||||
rows=[r for r in summary if r['kind']==kind and r['output_verified']]
|
||||
if rows:
|
||||
x=idx+rng.uniform(-.15,.15,len(rows));y=[r['worst_output_error'] for r in rows]
|
||||
ax.scatter(x,y,s=12,alpha=.35,color='#606060')
|
||||
ax.text(idx,max(y)*1.1,f'n={len(rows)}',ha='center',fontsize=8)
|
||||
else:ax.text(idx,.3,'not output-probed\ninitial gate failed',ha='center',va='center',fontsize=8)
|
||||
ax.axhline(.05,color='#b2182b',ls='--',label='Strict output error = 0.05')
|
||||
ax.axhline(.2,color='#d95f02',ls=':',label='Approximate output error = 0.20')
|
||||
ax.set_yscale('log');ax.set_xlim(-.5,4.5);ax.set_xticks(range(5),labels,rotation=20,ha='right');ax.set_ylabel('Worst directional relative L2, queries 7–31')
|
||||
ax.set_title('Primary protocol: calibrated cross-layer output comparisons\nEach point is one unit; no candidate passed all predeclared gates')
|
||||
ax.legend(loc='upper left',bbox_to_anchor=(0,-.28),fontsize=8);fig.tight_layout();save(fig,'cross_layer_output_errors')
|
||||
values=read_csv(root/'calibration-value-metrics.csv');unit={}
|
||||
for r in values:unit.setdefault(r['candidate'],[]).append(r)
|
||||
xx=[np.mean([float(r['centered_value_gram_cka']) for r in rows]) for rows in unit.values()]
|
||||
yy=[max(max(float(r['error_a']),float(r['error_b'])) for r in rows) for rows in unit.values()]
|
||||
controls=read_csv(root/'controls.csv');random_cka=[float(r['gram_cka']) for r in controls if r['control']=='value_gram_random_projection_pair']
|
||||
fig,ax=plt.subplots(figsize=(7,4.5));ax.scatter(xx,yy,s=24,color='#377eb8',label='60 cross-layer KV-head pairs')
|
||||
ax.axvspan(min(random_cka),max(random_cka),color='gray',alpha=.15,label='Random-projection Gram CKA range')
|
||||
ax.axvline(np.median(random_cka),color='gray',ls=':')
|
||||
ax.axhline(.2,color='#b2182b',ls='--',label='Approximate direct V error = 0.20')
|
||||
ax.set_xlabel('Mean centered token-Gram CKA');ax.set_ylabel('Worst direct V relative L2');ax.set_title('V geometry is a diagnostic, not substitution evidence')
|
||||
ax.legend(loc='upper left',bbox_to_anchor=(0,-.19),fontsize=8);fig.tight_layout();save(fig,'value_geometry_and_direct_error')
|
||||
conditional_path=root/'conditional-status.json'
|
||||
cond=json.loads(conditional_path.read_text()) if conditional_path.exists() else {}
|
||||
if (root/'conditional-function-metrics.csv').exists():
|
||||
rows=read_csv(root/'conditional-function-metrics.csv');labels=[r['sample'] for r in rows];x=np.arange(len(rows))
|
||||
fig,axes=plt.subplots(1,2,figsize=(13,5))
|
||||
axes[0].plot(x,[float(r['top5']) for r in rows],'o-',label='Unweighted top-5 overlap')
|
||||
axes[0].plot(x,[1-float(r['total_variation']) for r in rows],'o-',label='Probability-mass overlap (1−TV)')
|
||||
axes[0].set_ylim(0,1.03);axes[0].set_ylabel('Overlap');axes[0].legend(loc='lower left',fontsize=8)
|
||||
axes[1].plot(x,[max(float(r['output_error_a']),float(r['output_error_b'])) for r in rows],'o-',color='#238b45')
|
||||
axes[1].set_ylim(0,max(.05,max(max(float(r['output_error_a']),float(r['output_error_b'])) for r in rows)*1.15))
|
||||
axes[1].set_ylabel('Head readout relative L2');axes[1].set_title('Fixed layer23 V/gate/O',fontsize=9)
|
||||
for ax in axes:
|
||||
for pos in (3.5,7.5):ax.axvline(pos,color='gray',lw=.6)
|
||||
ax.set_xticks(x,labels,rotation=50,ha='right');ax.set_xlabel('Calibration / old validation / fresh tests, 4 each')
|
||||
fig.suptitle('Exploratory fixed case: layer3 head7 vs layer23 head6, both applied to H23\nFresh JS / tail-mass limits not fully passed; network substitution not run')
|
||||
fig.tight_layout();save(fig,'conditional_probability_mass_and_readout')
|
||||
if (root/'conditional-fresh-probabilities.npz').exists():
|
||||
p=np.load(root/'conditional-fresh-probabilities.npz');a=p['target_layer23_head6'][0,0];b=p['donor_layer3_head7_on_H23'][0,0];d=p['donor_layer3_head7_on_H3'][0,0]
|
||||
fig,axes=plt.subplots(2,2,figsize=(9,8));images=[a,b,np.abs(a-b),d]
|
||||
titles=['Layer23 head6 on H23','Layer3 head7 on the same H23','Absolute same-input probability difference','Layer3 head7 on its actual H3 (different input)']
|
||||
for idx,(ax,z,title) in enumerate(zip(axes.flat,images,titles)):
|
||||
im=ax.imshow(z,cmap='magma',vmin=0,vmax=(max(float(z.max()),1e-8) if idx==2 else 1.));fig.colorbar(im,ax=ax,fraction=.045,pad=.03)
|
||||
ax.set_xticks([0,7,15,23,31]);ax.set_yticks([0,7,15,23,31]);ax.set_xlabel('Key position');ax.set_ylabel('Query position');ax.set_title(title,fontsize=9)
|
||||
fig.suptitle('One fresh Chinese text: cross-layer conditional self-token retrieval\nRows 0–6 shown for context; primary metrics use queries 7–31')
|
||||
fig.tight_layout();save(fig,'conditional_cross_layer_probability_maps')
|
||||
text=['# Cross-layer QKV CPU study','',
|
||||
'Primary protocol and exploratory addendum are reported separately; no post-hoc success relabeling.',
|
||||
f'- Primary state: {status["state"]}; selected candidate: {status.get("selected",[])}.',
|
||||
f'- Candidate counts: {status.get("candidate_counts")}.',
|
||||
f'- Passing counts (approximate tier, all gates): {status.get("passing_counts")}.',
|
||||
f'- Primary computation seconds: {status.get("elapsed_seconds")}; peak RSS KiB: {status.get("peak_rss_kib")}.','',
|
||||
'## What was measured','',
|
||||
'Six full-attention layers, indices 3/7/11/15/19/23; all 15 cross-layer pairs. No within-layer Q/K/V interchange.',
|
||||
'Same normalized hidden inputs from both source layers; frozen Q/K norm, partial RoPE, GQA, V, output gate and O.',
|
||||
'QK head probabilities, whole-map injection in original/frozen matched head order, direct V functions, complete head contributions in residual coordinates, and complete branches were separated.',
|
||||
'Primary metrics use queries 7–31. Discrete matching uses calibration only; no continuous alignment, scale fitting or training.',
|
||||
'No primary candidate passed, so primary validation/fresh/network intervention stages were not entered.','']
|
||||
for kind in order:
|
||||
group=[r for r in summary if r['kind']==kind];outrows=[r for r in group if r['worst_output_error'] is not None];p=[r for r in group if r['worst_mean_js'] is not None];v=[r for r in group if r['worst_value_error'] is not None]
|
||||
text += [f'- {kind}: n={len(group)}, best worst output error={min((r["worst_output_error"] for r in outrows),default=None)}, minimum worst-text mean JS={min((r["worst_mean_js"] for r in p),default=None)}, best worst direct V error={min((r["worst_value_error"] for r in v),default=None)}.']
|
||||
if cond:
|
||||
text+=['','## Exploratory metric audit: frozen one-source candidate','',
|
||||
'After inspecting primary calibration results, one candidate was frozen: layer3 head7 vs layer23 head6 on H23.',
|
||||
'This addendum audited the instability of unweighted top-k tail ranking; original primary results were not changed.',
|
||||
'Four old validation and four previously unused fresh texts were evaluated with frozen extra gates and no candidate fallback.',
|
||||
f'- Addendum fresh function pass: {cond.get("fresh_function_pass")}.',
|
||||
f'- Overall addendum state: {cond.get("state")}; primary unchanged/negative: {cond.get("primary_protocol_unchanged_and_negative")}.',
|
||||
'Fresh probability-mass and fixed V/gate/O readout measurements show conditional behavioral overlap; strict fresh mean-JS, row-JS-P95 and row-TV-P95 limits still failed.',
|
||||
'No full-network substitution was run after that failure. V similarity, bidirectionality and complete QKV-head equivalence are not established.',
|
||||
'The actual-H3 cache probability is a separate different-input diagnostic, not the same-input function comparison.']
|
||||
text+=['','## Limits and retention','',
|
||||
'This is a short text-only pilot, not proof of absence of repetition elsewhere. Exact arithmetic, matrix coordinates, retrieval behavior and final residual output are distinct questions.',
|
||||
'Centered value Gram CKA can be high even for independent Gaussian projections of common inputs; it is not substitution evidence.',
|
||||
'All weights and large profile caches remain on the authorized server. Git delivery includes all plot tables, probabilities, protocols and cache location/hash metadata.',
|
||||
'No GPU, new checkpoint download, model training, continuous R fitting or automatic weight/cache deletion.']
|
||||
(root/'REPORT.md').write_text('\n'.join(text)+'\n')
|
||||
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,279 @@
|
||||
"""Bounded 15-pair CPU study, calibration selection before any heldout feedback."""
|
||||
import argparse
|
||||
from collections import defaultdict
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import resource
|
||||
import time
|
||||
import traceback
|
||||
import numpy as np
|
||||
from functional.run import save_csv,write_json
|
||||
from .core import (QKVModel,InterventionLM,assignment,inverse,output_metrics,
|
||||
cross_head_output_metrics,distribution_metrics,value_gram_cka)
|
||||
from .protocol import LAYERS,PAIRS,PROTOCOL,TIERS
|
||||
|
||||
PRIMARY=slice(7,None)
|
||||
TYPE_ORDER={'full_attention':0,'qkv_head':1,'qk_map':2,'qk_head':3,'v_group':4}
|
||||
|
||||
|
||||
def candidate_id(kind,i,j,a=None,b=None,suffix=''):
|
||||
return f'{kind}_{i}_{j}'+(f'_{a}_{b}' if a is not None else '')+suffix
|
||||
|
||||
|
||||
def rows_for(metrics,samples,meta):
|
||||
rows=[]
|
||||
for n,s in enumerate(samples):
|
||||
r={**meta,'sample':s['id']}
|
||||
for key,value in metrics.items():
|
||||
v=value[n]
|
||||
r[key]=None if v is None else float(v)
|
||||
rows.append(r)
|
||||
return rows
|
||||
|
||||
|
||||
def outrows(a,b,samples,meta,floor_a=1e-6,floor_b=1e-6):
|
||||
m=output_metrics(a[:,PRIMARY],b[:,PRIMARY]);rows=rows_for(m,samples,meta)
|
||||
for n,r in enumerate(rows):r['active']=bool(m['rms_a'][n]>=np.broadcast_to(floor_a,m['rms_a'].shape)[n] and m['rms_b'][n]>=np.broadcast_to(floor_b,m['rms_b'].shape)[n])
|
||||
return rows
|
||||
|
||||
|
||||
def head_floor(profile):
|
||||
rms=np.sqrt(np.mean(profile['heads'][:,7:].astype(np.float64)**2,axis=(1,3)))
|
||||
return np.maximum(1e-6,.1*np.median(rms,axis=1))
|
||||
|
||||
|
||||
def candidate_pass(c,tier):
|
||||
t=TIERS[tier];out=c.get('output_rows',[])
|
||||
if not out or not all(r['active'] and max(r['error_a'],r['error_b'])<=t['output_error'] and r['cosine']>=t['output_cosine'] for r in out):return False
|
||||
if c['kind'] in ('qk_head','qk_map'):
|
||||
p=c.get('probability_rows',[])
|
||||
if not p or not all(r['js']<=t['js'] and r['js_p95']<=t['js_p95'] and r['top5']>=t['top5'] for r in p):return False
|
||||
if c['kind']=='v_group':
|
||||
v=c.get('value_rows',[])
|
||||
if not v or not all(max(r['error_a'],r['error_b'])<=t['value_error'] and r['cosine']>=t['value_cosine'] and r['active'] for r in v):return False
|
||||
return True
|
||||
|
||||
|
||||
def preliminary_probability(c):
|
||||
t=TIERS['approximate'];r=c['probability_rows']
|
||||
return bool(r) and all(x['js']<=t['js'] and x['js_p95']<=t['js_p95'] and x['top5']>=t['top5'] for x in r)
|
||||
|
||||
|
||||
def preliminary_value(c):
|
||||
t=TIERS['approximate'];r=c['value_rows']
|
||||
return bool(r) and all(x['active'] and max(x['error_a'],x['error_b'])<=t['value_error'] and x['cosine']>=t['value_cosine'] for x in r)
|
||||
|
||||
|
||||
def load_profile(root,source,layer):
|
||||
with np.load(root/'cache'/f'calibration-source-{source}.npz') as data:
|
||||
prefix=f'layer{layer}_'
|
||||
return {key[len(prefix):]:data[key] for key in data.files if key.startswith(prefix)}
|
||||
|
||||
|
||||
def map_profile_values(p):return {k:v for k,v in p.items()}
|
||||
|
||||
|
||||
def new_bank():return {}
|
||||
|
||||
|
||||
def get_candidate(bank,kind,i,j,a=None,b=None,suffix='',perm=None):
|
||||
name=candidate_id(kind,i,j,a,b,suffix)
|
||||
if name not in bank:
|
||||
bank[name]={'id':name,'kind':kind,'i':i,'j':j,'a':a,'b':b,'perm':perm,
|
||||
'output_rows':[],'probability_rows':[],'value_rows':[]}
|
||||
return bank[name]
|
||||
|
||||
|
||||
def add_output(c,a,b,samples,source,target=None,floor_a=1e-6,floor_b=1e-6):
|
||||
c['output_rows'].extend(outrows(a,b,samples,{'candidate':c['id'],'source_input_layer':source,'target':target},floor_a,floor_b))
|
||||
|
||||
|
||||
def observe_pair(lm,bank,pi,pj,i,j,source,samples,diagnostics):
|
||||
fi,fj=head_floor(pi),head_floor(pj)
|
||||
whole=get_candidate(bank,'full_attention',i,j)
|
||||
add_output(whole,pi['output'],pj['output'],samples,source)
|
||||
hm=cross_head_output_metrics(pi['heads'][:,7:],pj['heads'][:,7:])
|
||||
qm=cross_head_output_metrics(pi['q'][:,7:],pj['q'][:,7:])
|
||||
repeats=lm.config['num_attention_heads']//lm.config['num_key_value_heads']
|
||||
ki,kj=np.repeat(pi['k'],repeats,axis=2),np.repeat(pj['k'],repeats,axis=2)
|
||||
km=cross_head_output_metrics(ki[:,7:],kj[:,7:])
|
||||
for a in range(pi['p'].shape[1]):
|
||||
for b in range(pj['p'].shape[1]):
|
||||
qk=get_candidate(bank,'qk_head',i,j,a,b);qkv=get_candidate(bank,'qkv_head',i,j,a,b)
|
||||
pm=distribution_metrics(pi['p'][:,a:a+1],pj['p'][:,b:b+1])
|
||||
rr=rows_for(pm,samples,{'candidate':qk['id'],'source_input_layer':source})
|
||||
qk['probability_rows'].extend(rr);qkv['probability_rows'].extend(rr)
|
||||
for n,s in enumerate(samples):
|
||||
rec={'candidate':qkv['id'],'source_input_layer':source,'sample':s['id'],**{key:float(v[n,a,b]) for key,v in hm.items()}}
|
||||
rec['active']=bool(rec['rms_a']>=fi[n] and rec['rms_b']>=fj[n]);qkv['output_rows'].append(rec)
|
||||
diagnostics.append({'i':i,'j':j,'head_i':a,'head_j':b,'source_input_layer':source,'sample':s['id'],
|
||||
'q_error':float(max(qm['error_a'][n,a,b],qm['error_b'][n,a,b])),
|
||||
'q_cosine':float(qm['cosine'][n,a,b]),'k_error':float(max(km['error_a'][n,a,b],km['error_b'][n,a,b])),
|
||||
'k_cosine':float(km['cosine'][n,a,b]),'qkv_head_output_error':max(rec['error_a'],rec['error_b'])})
|
||||
vm=cross_head_output_metrics(pi['v'][:,7:],pj['v'][:,7:])
|
||||
vfi=np.maximum(1e-6,.1*np.median(np.sqrt(np.mean(pi['v'][:,7:].astype(np.float64)**2,axis=(1,3))),axis=1))
|
||||
vfj=np.maximum(1e-6,.1*np.median(np.sqrt(np.mean(pj['v'][:,7:].astype(np.float64)**2,axis=(1,3))),axis=1))
|
||||
for a in range(pi['v'].shape[2]):
|
||||
for b in range(pj['v'].shape[2]):
|
||||
c=get_candidate(bank,'v_group',i,j,a,b)
|
||||
gram=value_gram_cka(pi['v'][:,7:,a],pj['v'][:,7:,b])
|
||||
for n,s in enumerate(samples):
|
||||
rec={'candidate':c['id'],'source_input_layer':source,'sample':s['id'],**{key:float(v[n,a,b]) for key,v in vm.items()},'centered_value_gram_cka':float(gram[n])}
|
||||
rec['active']=bool(rec['rms_a']>=vfi[n] and rec['rms_b']>=vfj[n]);c['value_rows'].append(rec)
|
||||
|
||||
|
||||
def probe_candidate(lm,c,pi,pj,source,samples):
|
||||
i,j=c['i'],c['j'];kind=c['kind'];fi,fj=head_floor(pi),head_floor(pj)
|
||||
if kind=='qk_map':
|
||||
perm=c['perm'];p=distribution_metrics(pi['p'],pj['p'][:,perm])
|
||||
c['probability_rows'].extend(rows_for(p,samples,{'candidate':c['id'],'source_input_layer':source}))
|
||||
changed_i=lm.transplant(pi,pj,i,kind,perm=perm)
|
||||
changed_j=lm.transplant(pj,pi,j,kind,perm=inverse(perm))
|
||||
add_output(c,pi['output'],changed_i,samples,source,i)
|
||||
add_output(c,pj['output'],changed_j,samples,source,j)
|
||||
elif kind=='qk_head':
|
||||
a,b=c['a'],c['b']
|
||||
changed_i=lm.head_transplant_output(pi,pj,i,a,b)
|
||||
changed_j=lm.head_transplant_output(pj,pi,j,b,a)
|
||||
add_output(c,pi['heads'][:,:,a],changed_i,samples,source,i,fi,fi)
|
||||
add_output(c,pj['heads'][:,:,b],changed_j,samples,source,j,fj,fj)
|
||||
elif kind=='v_group':
|
||||
a,b=c['a'],c['b'];rep=lm.config['num_attention_heads']//lm.config['num_key_value_heads']
|
||||
own_i=pi['heads'][:,:,a*rep:(a+1)*rep].sum(2);own_j=pj['heads'][:,:,b*rep:(b+1)*rep].sum(2)
|
||||
changed_i=lm.value_group_output(pi,pj,i,a,b);changed_j=lm.value_group_output(pj,pi,j,b,a)
|
||||
add_output(c,own_i,changed_i,samples,source,i,fi,fi);add_output(c,own_j,changed_j,samples,source,j,fj,fj)
|
||||
else:raise ValueError(kind)
|
||||
|
||||
|
||||
def summarize(c):
|
||||
out=c['output_rows'];p=c['probability_rows'];v=c['value_rows']
|
||||
m={'id':c['id'],'kind':c['kind'],'i':c['i'],'j':c['j'],'a':c['a'],'b':c['b'],'perm':c['perm'],
|
||||
'output_verified':bool(out),'output_observations':len(out),'probability_observations':len(p),'value_observations':len(v),
|
||||
'strict_pass':candidate_pass(c,'strict'),'approximate_pass':candidate_pass(c,'approximate')}
|
||||
m['worst_output_error']=max((max(r['error_a'],r['error_b']) for r in out),default=None)
|
||||
m['minimum_output_cosine']=min((r['cosine'] for r in out),default=None)
|
||||
m['worst_mean_js']=max((r['js'] for r in p),default=None)
|
||||
m['minimum_top5']=min((r['top5'] for r in p),default=None)
|
||||
m['worst_value_error']=max((max(r['error_a'],r['error_b']) for r in v),default=None)
|
||||
return m
|
||||
|
||||
|
||||
def controls_for_profiles(profiles,source,samples,rows,h):
|
||||
rng=np.random.default_rng(20261109+source)
|
||||
ra=(h@rng.standard_normal((h.shape[-1],256),dtype=np.float32))/np.float32(np.sqrt(h.shape[-1]))
|
||||
rb=(h@rng.standard_normal((h.shape[-1],256),dtype=np.float32))/np.float32(np.sqrt(h.shape[-1]))
|
||||
random_cka=value_gram_cka(ra[:,7:],rb[:,7:])
|
||||
for n,s in enumerate(samples):rows.append({'control':'value_gram_random_projection_pair','source_input_layer':source,'sample':s['id'],'gram_cka':float(random_cka[n])})
|
||||
for layer,p in profiles.items():
|
||||
for kv in range(p['v'].shape[2]):
|
||||
for label,other in [('value_gram_to_input',h),('value_gram_to_random_projection',ra)]:
|
||||
vcka=value_gram_cka(p['v'][:,7:,kv],other[:,7:])
|
||||
for n,s in enumerate(samples):rows.append({'control':label,'source_input_layer':source,'projection_layer':layer,'kv_head':kv,'sample':s['id'],'gram_cka':float(vcka[n])})
|
||||
probs=p['p'];uniform=np.zeros_like(probs);shuffled=probs.copy()
|
||||
for t in range(probs.shape[-1]):
|
||||
uniform[:,:,t,:t+1]=1/(t+1)
|
||||
for bi in range(probs.shape[0]):
|
||||
for head in range(probs.shape[1]):shuffled[bi,head,t,:t+1]=probs[bi,head,t,rng.permutation(t+1)]
|
||||
for name,other in [('identity',probs),('uniform_causal',uniform),('shuffled_legal_keys',shuffled)]:
|
||||
for head in range(probs.shape[1]):
|
||||
m=distribution_metrics(probs[:,head:head+1],other[:,head:head+1])
|
||||
rows.extend(rows_for(m,samples,{'control':name,'source_input_layer':source,'projection_layer':layer,'head':head}))
|
||||
|
||||
|
||||
def validate_selected(lm,selected,inputs,samples,indices):
|
||||
i,j=selected['i'],selected['j'];c={k:v for k,v in selected.items() if k not in ('output_rows','probability_rows','value_rows')}
|
||||
c.update(output_rows=[],probability_rows=[],value_rows=[])
|
||||
for source in (i,j):
|
||||
h=inputs[f'attn_{source}'][indices];pi,pj=lm.parts(h,i),lm.parts(h,j)
|
||||
temporary={};diag=[];observe_pair(lm,temporary,pi,pj,i,j,source,samples,diag)
|
||||
if c['kind'] in ('full_attention','qkv_head','qk_head','v_group'):
|
||||
original=temporary[candidate_id(c['kind'],i,j,c['a'],c['b'])]
|
||||
c['probability_rows'].extend(original['probability_rows']);c['value_rows'].extend(original['value_rows'])
|
||||
if c['kind'] in ('full_attention','qkv_head'):c['output_rows'].extend(original['output_rows'])
|
||||
if c['kind'] in ('qk_map','qk_head','v_group'):probe_candidate(lm,c,pi,pj,source,samples)
|
||||
return c
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--source',required=True,type=Path);p.add_argument('--root',required=True,type=Path);p.add_argument('--seconds',type=int,default=7200)
|
||||
args=p.parse_args();source=args.source.resolve();root=args.root.resolve();root.mkdir(parents=True,exist_ok=True);(root/'cache').mkdir(exist_ok=True)
|
||||
assert not (root/'protocol.json').exists(),'Fresh experiment directory required; do not overwrite evidence'
|
||||
protocol={**PROTOCOL,'registered_unix':time.time(),'source_run':str(source),'seconds':args.seconds,
|
||||
'fresh_sample_sha256':hashlib.sha256(Path(__file__).with_name('fresh_samples.json').read_bytes()).hexdigest()}
|
||||
write_json(root/'protocol.json',protocol)
|
||||
write_json(root/'retention-policy.json',{'automatic_cleanup':False,'weights_and_caches':'retain_until_explicit_user_deletion'})
|
||||
start=time.monotonic();status={'state':'running','phase':'calibration_profiles','started_unix':time.time()}
|
||||
bank={};diagnostics=[];controls=[]
|
||||
try:
|
||||
manifest=json.loads((source/'manifest.json').read_text());assert manifest['revision']=='15852e8c16360a2fea060d615a32b45270f8a8fc'
|
||||
reference=json.loads((source/'reference-check.json').read_text());assert reference['passed']
|
||||
assert reference['implementation_sha256']==hashlib.sha256(Path('functional/model.py').read_bytes()).hexdigest()
|
||||
config=json.loads((source/'model_config.json').read_text());lm=InterventionLM(source/'weights',config,seconds=args.seconds-180)
|
||||
assert [i for i,t in enumerate(lm.config['layer_types']) if t=='full_attention']==LAYERS
|
||||
samples=json.loads((source/'samples-tokenized.json').read_text())['samples'];cal=[s for s in samples if s['split']=='calibration'];valid=[s for s in samples if s['split']=='heldout']
|
||||
ci=np.array([i for i,s in enumerate(samples) if s['split']=='calibration']);vi=np.array([i for i,s in enumerate(samples) if s['split']=='heldout'])
|
||||
write_json(root/'source-samples.json',{'samples':samples,'note':'old validation samples used in earlier studies; fresh test separately fixed'})
|
||||
inputs=np.load(source/'baseline-activations.npz')
|
||||
write_json(root/'source-provenance.json',{'revision':manifest['revision'],'weights_manifest':str(source/'manifest.json'),
|
||||
'baseline_activation_sha256':hashlib.sha256((source/'baseline-activations.npz').read_bytes()).hexdigest(),
|
||||
'source_hashes':{str(f):hashlib.sha256(f.read_bytes()).hexdigest() for f in sorted(Path('crossqkv').glob('*')) if f.is_file()}})
|
||||
for src in LAYERS:
|
||||
lm.guard();h=inputs[f'attn_{src}'][ci];profiles={layer:lm.parts(h,layer) for layer in LAYERS}
|
||||
np.savez(root/'cache'/f'calibration-source-{src}.npz',**{f'layer{layer}_{key}':value for layer,profile in profiles.items() for key,value in profile.items()})
|
||||
controls_for_profiles(profiles,src,cal,controls,h)
|
||||
for i,j in PAIRS:
|
||||
if src in (i,j):observe_pair(lm,bank,profiles[i],profiles[j],i,j,src,cal,diagnostics)
|
||||
del profiles
|
||||
status.update(last_source_layer=src,elapsed_seconds=time.monotonic()-start);write_json(root/'status.json',status)
|
||||
save_csv(root/'raw-qk-diagnostics.csv',diagnostics);save_csv(root/'controls.csv',controls)
|
||||
print(json.dumps(status),flush=True)
|
||||
status['phase']='discrete_head_matching_and_output_probes';write_json(root/'status.json',status)
|
||||
mapping_rows=[]
|
||||
qk_pre=[c for c in bank.values() if c['kind']=='qk_head' and preliminary_probability(c)]
|
||||
qk_probe=sorted(qk_pre,key=lambda c:(max(r['js'] for r in c['probability_rows']),c['id']))[:32]
|
||||
v_pre=[c for c in bank.values() if c['kind']=='v_group' and preliminary_value(c)]
|
||||
v_probe=sorted(v_pre,key=lambda c:(max(max(r['error_a'],r['error_b']) for r in c['value_rows']),c['id']))[:16]
|
||||
for i,j in PAIRS:
|
||||
cost=np.empty((8,8),dtype=np.float64)
|
||||
for a in range(8):
|
||||
for b in range(8):cost[a,b]=np.mean([r['js'] for r in bank[candidate_id('qk_head',i,j,a,b)]['probability_rows']])
|
||||
perm=assignment(cost)
|
||||
for a in range(8):
|
||||
for b in range(8):mapping_rows.append({'i':i,'j':j,'head_i':a,'head_j':b,'calibration_mean_js':float(cost[a,b]),'chosen':perm[a]==b})
|
||||
maps=[get_candidate(bank,'qk_map',i,j,suffix='_identity',perm=list(range(8))),get_candidate(bank,'qk_map',i,j,suffix='_matched',perm=perm)]
|
||||
for src in (i,j):
|
||||
pi,pj=load_profile(root,src,i),load_profile(root,src,j)
|
||||
for c in [*maps,*[c for c in qk_probe+v_probe if c['i']==i and c['j']==j]]:
|
||||
lm.guard();probe_candidate(lm,c,pi,pj,src,cal)
|
||||
status.update(last_pair=[i,j],elapsed_seconds=time.monotonic()-start);write_json(root/'status.json',status)
|
||||
save_csv(root/'head-assignment-costs.csv',mapping_rows)
|
||||
summaries=[summarize(c) for c in bank.values()];write_json(root/'calibration-summary.json',summaries)
|
||||
save_csv(root/'calibration-output-metrics.csv',[r for c in bank.values() for r in c['output_rows']])
|
||||
save_csv(root/'calibration-probability-metrics.csv',[r for c in bank.values() if c['kind']!='qkv_head' for r in c['probability_rows']])
|
||||
save_csv(root/'calibration-value-metrics.csv',[r for c in bank.values() for r in c['value_rows']])
|
||||
eligible=[c for c in summaries if c['strict_pass'] or c['approximate_pass']]
|
||||
eligible.sort(key=lambda c:(not c['strict_pass'],TYPE_ORDER[c['kind']],c['worst_output_error'],c['worst_mean_js'] or 0,c['id']))
|
||||
selected=eligible[:1]
|
||||
write_json(root/'selection.json',{'selected':selected,'qk_head_prequalified':len(qk_pre),'qk_head_output_verified':len(qk_probe),
|
||||
'v_group_prequalified':len(v_pre),'v_group_output_verified':len(v_probe),'selection_uses_validation':False})
|
||||
status['selected']=selected
|
||||
if selected:
|
||||
c=selected[0];status['phase']='old_validation';write_json(root/'status.json',status)
|
||||
checked=validate_selected(lm,c,inputs,valid,vi);tier='strict' if c['strict_pass'] else 'approximate'
|
||||
write_json(root/'validation-summary.json',summarize(checked));save_csv(root/'validation-output-metrics.csv',checked['output_rows']);save_csv(root/'validation-probability-metrics.csv',checked['probability_rows']);save_csv(root/'validation-value-metrics.csv',checked['value_rows'])
|
||||
passed=candidate_pass(checked,tier);status['validation_pass']=passed
|
||||
if passed:
|
||||
from .fresh import run_fresh
|
||||
run_fresh(source,root,c,tier,lm,status)
|
||||
status.update(state='completed',phase='done',elapsed_seconds=time.monotonic()-start,peak_rss_kib=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss,
|
||||
candidate_counts={kind:sum(c['kind']==kind for c in summaries) for kind in TYPE_ORDER},
|
||||
passing_counts={kind:sum(c['kind']==kind and c['approximate_pass'] for c in summaries) for kind in TYPE_ORDER},
|
||||
original_11_and_norm_positive_not_used_as_qkv_evidence=True)
|
||||
except Exception as exc:
|
||||
status.update(state='stopped',error_type=type(exc).__name__,error=str(exc),elapsed_seconds=time.monotonic()-start,peak_rss_kib=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss)
|
||||
(root/'error.txt').write_text(traceback.format_exc());raise
|
||||
finally:write_json(root/'status.json',status)
|
||||
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,90 @@
|
||||
# 跨层 QKV:主检验阴性,发现条件性的自 token 检索重合
|
||||
|
||||
全部在 CPU 上运行,冻结 Qwen3.5-2B 权重,无训练、连续 R 拟合或缩放拟合。
|
||||
层索引从0开始。成本不作为判据;归一化相似不作为本轮 QKV 正例。
|
||||
|
||||
## 结论分级
|
||||
|
||||
**主协议没有候选通过全部门槛。** 覆盖六个 full-attention 层的全部15个跨层配对,
|
||||
同时测试两个来源层的真实输入,不能将该结论扩大为模型不存在任何功能重复。
|
||||
|
||||
**探索性补充有一条具体行为观察,但严格新测试仍未全部通过:**
|
||||
把层23的同一隐藏输入 H23 分别交给层3头7、层23头6的 QK 检索函数,
|
||||
它们主要都读取当前 token;在4条新文本上,query位置7~31的 argmax 完全相同。
|
||||
这不是同层 Q/K/V 互换,不是两个完整 attention 头等价,也没有证明 V 相似。
|
||||
|
||||
| 新文本证据(逐文本平均或最坏值) | 结果 |
|
||||
|---|---:|
|
||||
| 层23头6分配给当前token的平均概率,四文本最小值 | 95.71% |
|
||||
| 层3头7在同一H23上分配给当前token的平均概率,最小值 | 92.07% |
|
||||
| 两者最高概率key一致率 | 100% |
|
||||
| 两套top5交集覆盖各自概率质量的最小值 | 97.97% |
|
||||
| 分布总变差的最大文本平均值 | 6.96% |
|
||||
| 保留层23 V/gate/O后的最坏双向头读出相对误差 | 3.82% |
|
||||
| 最坏文本平均JS | 0.018921 |
|
||||
|
||||
新英文文本 fresh-en-2 超过补充协议的三条严格线:平均 JS 0.018921>0.01、
|
||||
行 JS P95 0.072943>0.05、行总变差 P95 0.238731>0.20。
|
||||
因此补充试验的 `fresh_function_pass=false`,**没有重标为完全通过,也未运行替换后的全LM NLL**。
|
||||
已计算新文本原模型基线,不能把该基线文件当作替换实验结果。
|
||||
可支持的观察是特定输入条件下的主要检索行为和实际读出接近;严格可互换尚未确认。
|
||||
|
||||
## 主协议实际覆盖
|
||||
|
||||
| 对象 | 初筛/直接比较数量 | 后续输出核验 |
|
||||
|---|---:|---|
|
||||
| 完整 attention 分支 | 15 | 全部测量 |
|
||||
| QKV+gate/O 的完整头函数 | 960 | 全部测量,输出在共同residual坐标中 |
|
||||
| 全8头P图映射(原序/冻结匹配) | 30 | 全部保留接收层V/gate/O做替换读出 |
|
||||
| 单头联合QK检索 | 960 | 无候选通过初筛,主协议未进入单头读出 |
|
||||
| 跨层KV组的直接V函数 | 60 | 无候选通过原始V初筛,未进入V组替换 |
|
||||
|
||||
主协议最接近的若干项,指标来自不同候选,不能拼接成同一个正例:
|
||||
|
||||
- QK两来源检索:层7头0↔层11头6,最坏文本平均JS约0.08609,最低top5约70.4%。
|
||||
- 完整头输出:同一对头的最坏方向相对误差约134.4%。检索接近不意味着V/O组成的输出接近。
|
||||
- 直接V函数:层7 KV头0↔层11 KV头1,最坏方向误差约150.3%。
|
||||
- 完整分支:层7↔层11的最坏方向误差约185.3%。
|
||||
- 保留目标V/O的完整P图映射:最小最坏输出误差约70.3%(层15↔19、冻结头匹配)。
|
||||
|
||||
V token-Gram CKA另与输入Gram和两个独立高斯投影比较。共同输入几何可以造成高Gram相似,
|
||||
不能据此宣布V可替换;完整头输出检验已经包含各自的O/gate,避免仅因内部坐标差异就漏掉输出等价。
|
||||
|
||||
## 为什么增加单独的条件性审计
|
||||
|
||||
主协议要求两个来源层的输入分布均通过,并把无权重top5重合率作为硬门槛。
|
||||
复核全部已保存的单来源指标后,固定了唯一一对:层3头7与层23头6,条件为H23。
|
||||
它在校准集的JS很小,却因概率很低的尾部排名不同而top5重合低。
|
||||
|
||||
无权重top-k在近似并列处不连续:可以构造总变差趋近0而top5集合仍不同的例子,
|
||||
本轮已加入独立回归测试。补充协议在观察该候选保留接收端V/O的读出、旧验证或新测试之前固定。
|
||||
它改为单一H23输入条件,将top5作为诊断,并固定概率质量/实际读出/活跃度约束;
|
||||
不换候选、不重新拟合参数。
|
||||
它使用4条原验证文本,再使用本轮事先冻结的4条新文本,保留全部未通过项。
|
||||
这是探索性补充,不改写主协议,不是事后声称原协议成功。
|
||||
|
||||
原主检验的图与条件性图使用不同输入集合:主检验取两个来源分布的最坏情况;
|
||||
条件性图只研究H23。条件性相似不能推广到H3,也不能把早层在H3上已算好的P直接当作P_3(H23)。
|
||||
实际H3缓存与H23接收端的差异另有概率/读出诊断,未做失败后追加的全模型替换。
|
||||
|
||||
## 图表阅读
|
||||
|
||||
- `cross_layer_qk_divergence`:15对层的JS,左为各配对最佳单头,中为原头序,右为冻结双射;
|
||||
颜色越浅分布越近,斜线对角不作经验数据。全部仅为校准结果。
|
||||
- `cross_layer_output_errors`:各类输出误差。QK单头和V组未通过初筛时,不画成零误差,而标未输出核验。
|
||||
- `value_geometry_and_direct_error`:V Gram几何与直接V误差,灰区为随机投影对照,仅诊断。
|
||||
- `conditional_probability_mass_and_readout`:同一条件候选在校准、旧验证和新测试上的top5、质量重合与实际读出差异。
|
||||
- `conditional_cross_layer_probability_maps`:一条新文本的具体P图;层3在H23上的结果与层3在实际H3上的结果分开。
|
||||
|
||||
## 复现、预算与保留
|
||||
|
||||
20项完整远程测试通过。主计算约74.8秒,补充条件试验约105.3秒;峰值进程RSS分别约168/174 MiB。
|
||||
另有出图、审计和测试,仍在两小时预算内。早期对照生成器的变量遮蔽错误及10.3秒失败记录保留,
|
||||
修复后在新目录按相同配对和门槛重跑;没有删除原缓存。
|
||||
|
||||
模型revision 15852e8c16360a2fea060d615a32b45270f8a8fc,与此前官方参考校验的流式CPU实现一致。
|
||||
全部权重和大型profile缓存继续保留;Git只上传代码、全部图表源表、选定的新文本概率矩阵、
|
||||
日志、协议和缓存位置/SHA。没有新模型下载或自动清理。
|
||||
|
||||
后续若继续,应重新预注册“单向输入条件”和概率质量/读出判据,使用新文本及更长上下文;
|
||||
当前结果不能证明跨上下文稳定,也不应把归一化正例或代数重参数化当作QKV主体验证。
|
||||
@@ -0,0 +1,59 @@
|
||||
# 跨层 QKV 功能重复:CPU 预注册方案
|
||||
|
||||
目标:两个不同层中的学习部分是否实现相似检索、内容变换或完整头函数。不以成本为条件。
|
||||
冻结 Qwen3.5-2B 权重;不训练、不拟合连续 R 或缩放,不使用 GPU。权重与缓存持续保留。
|
||||
|
||||
## 配对与数据
|
||||
|
||||
仅研究完整注意力层索引 3/7/11/15/19/23(从0开始)的全部15个跨层配对。
|
||||
18个线性注意力层不套用 softmax 概率指标,不在本轮自动扩大搜索。
|
||||
复用已采集的同一隐藏输入,四条原校准文本选对,四条旧留出文本作验证;
|
||||
后者曾用于其他试验,不称完全未见的最终测试。另固定4条新文本作新测试,32 tokens,中文英文各半。
|
||||
仅对冻结候选通过验证时采集新测试输入,不根据测试结果重选。
|
||||
|
||||
## 拆开回答的问题
|
||||
|
||||
- QK:比较实际 Q/K norm、部分 RoPE 和 GQA 后产生的逐头检索概率,保留接收层 V/gate/O 时替换检索分布。
|
||||
- V:比较跨层两个 KV 头的 V(H);保留接收层 P/gate/O,再替换一个 KV 组,覆盖该组4个Q头。
|
||||
token Gram/CKA仅用于诊断坐标表示问题,不能代替实际输出替换;另与输入Gram、固定seed的两个高斯投影Gram比较,以控制共同输入结构造成的高相似。
|
||||
- 完整头:比较 P V、gate、O 共同形成的每个头在 residual 坐标中的输出函数。
|
||||
它不要求内部 V 坐标一致,能够避免仅比较内部元素漏掉表示差异。
|
||||
- 完整分支:比较全部8个头组成的完整 attention 输出。
|
||||
|
||||
因此原始 Q/K/V 输出相似、QK 检索相似、V 可替换、完整头可替换分别报告,归一化单独相似不作主正例。
|
||||
同一层 Q、K、V 互相比较不进入主实验。
|
||||
|
||||
## 头匹配与位置对照
|
||||
|
||||
15对层各在校准集选择一次最小平均JS的8头双射(精确离散DP,不求连续R)。
|
||||
该排列只用于给接收Q头注入 donor P;接收层V/gate/O保持顺序,不宣称任意GQA权重排列合法。
|
||||
全部960个跨层Q头配对、60个跨层KV头配对和960个完整头函数配对均作初筛。
|
||||
完整P映射考察原顺序及冻结排列,共30项;完整分支共15项。
|
||||
|
||||
主指标只用 query 位置7~31,避免第一行概率必为1、早期合法key过少的平凡相似。
|
||||
记录均匀因果P、固定seed的合法key打乱、去首key后重归一化、首key/self/最近3key质量。
|
||||
首key或局部位置主导的真实重复单独标为位置型,不冒充内容语义重复。
|
||||
|
||||
## 固定门槛与预算
|
||||
|
||||
两档门槛在读取新跨层指标前固定,不依据结果放宽:
|
||||
|
||||
| 档位 | 输出双向相对L2 | 输出余弦 | 每文本平均JS | JS行P95 | top5重合 |
|
||||
|---|---:|---:|---:|---:|---:|
|
||||
| strict | ≤0.05 | ≥0.99 | ≤0.01 | ≤0.05 | ≥0.8 |
|
||||
| approximate | ≤0.20 | ≥0.98 | ≤0.05 | ≤0.15 | ≥0.6 |
|
||||
|
||||
V另需同档原始V直接误差/余弦;QK候选另需同档检索门槛。
|
||||
每个来源层、每条文本、两个替换方向分别检查,输出不含共同 residual 输入。
|
||||
头输出需达到该层头RMS中位数的10%,且绝对RMS≥1e-6,避免近零头制造假正例。
|
||||
|
||||
QK单头最多精确核验32个初筛通过者,V组最多16个;完整P的30个输出均核验。
|
||||
只按校准选定1个最终候选:先strict,再approximate;同档优先完整分支、完整头、完整P、QK单头、V组。
|
||||
之后按最坏输出误差/JS/ID排序。不按验证或新测试结果换选。
|
||||
|
||||
同输入函数验证通过后,做两个方向的真实网络干预,计算新测试token NLL(均值增量≤0.01、
|
||||
逐文本增量P95≤0.05)。另外只做一次时间顺序合法的“早层实际缓存→晚层”复用,单独报告;
|
||||
同输入函数可互换不代表来自不同实际输入的已计算激活可以直接复制。
|
||||
|
||||
CPU总计算限两小时,保留阶段覆盖率和停止原因;没有候选即停止,不自动扩模型、层数或阈值。
|
||||
较大的中间profile缓存在服务器,Git交付全部图表源表、协议、NLL和缓存位置/SHA。
|
||||
@@ -0,0 +1,57 @@
|
||||
# 研究图册:Qwen3.5-2B 参数几何与头贡献
|
||||
|
||||
这份图册与原始PNG/PDF/SVG一同保存在Git中。头贡献基线图片已随PR #6合并到main;其固定提交链接不依赖聊天附件或本机路径。后续实验分别列于下方,可通过图册所在的Git提交查看对应版本。
|
||||
|
||||
原始结果提交:`098ea8650c7d0e06339c66e3a0509e38b85b3d7d`;模型revision:`15852e8c16360a2fea060d615a32b45270f8a8fc`。
|
||||
|
||||
| 基线指标(逐观测中位数) | QKV复合变化 | √JS检索距离 |
|
||||
|---|---:|---:|
|
||||
| 有效头数÷总头数 | 76.0% | 55.8% |
|
||||
| 最强25%头的影响份额 | 44.6% | 56.5% |
|
||||
| 最弱25%头的影响份额 | 10.6% | 6.8% |
|
||||
|
||||
**√JS有效头数:8.931822/16;P10=5.784081,P90=11.672658。** 这是消融影响的集中程度,不是注意力概率质量。原基线为4条文本各32 token,普通注意力接收层的query7–31。
|
||||
|
||||
## 连续分布与尺度敏感性
|
||||
|
||||

|
||||
|
||||
[PNG固定提交副本](https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/retrieval_scale_sensitivity.png)
|
||||
[PDF固定提交副本](https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/retrieval_scale_sensitivity.pdf)
|
||||
[SVG固定提交副本](https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/retrieval_scale_sensitivity.svg)
|
||||
|
||||
## 联合强弱头消融
|
||||
|
||||

|
||||
|
||||
[PNG固定提交副本](https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/joint_removal_effects.png)
|
||||
[PDF固定提交副本](https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/joint_removal_effects.pdf)
|
||||
[SVG固定提交副本](https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/joint_removal_effects.svg)
|
||||
|
||||
[完整基线报告](../results/head-dominance/REPORT.md) · [全部图表目录](../results/head-dominance/figures) · [图册SHA清单](figure-gallery-manifest.json)
|
||||
|
||||
使用√JS距离进行微调前后配对比较;保留JS散度作为尺度敏感性参考,避免混淆平方尺度与距离尺度。
|
||||
|
||||
## GSM8K微调前后配对图
|
||||
|
||||
[配对报告](../results/finetune-comparison/REPORT.md) · [CDF](../results/finetune-comparison/figures/paired_effective_heads_cdf.png) · [逐层分布](../results/finetune-comparison/figures/paired_effective_heads_by_layer.png) · [配对变化](../results/finetune-comparison/figures/paired_effective_heads_delta.png)
|
||||
|
||||
同目录保留PDF/SVG。图表随代码、原始数据和SHA清单一同提交,不依赖聊天附件。
|
||||
|
||||
## 高维壳与稀疏性对照
|
||||
|
||||

|
||||
|
||||
[条件定理、反例与数据说明](../results/sparse-shell/REPORT.md) · [PDF](../results/sparse-shell/sparse_shell_controls.pdf) · [SVG](../results/sparse-shell/sparse_shell_controls.svg)
|
||||
|
||||
## 两个实际2B检查点的参数球壳检验
|
||||
|
||||
[结论与解释](MODEL_SHELL_FINDINGS.md) · [实测报告、分组数量与限制](../results/model-shell/REPORT.md) · [固定协议](../model_shell/PROTOCOL.md) · [指标源表](../results/model-shell/metrics.csv) · [校验清单](../results/model-shell/audit.json)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
[微调前后配对图](../results/model-shell/figures/finetune_paired_radii.png) · [有限样本参与率](../results/model-shell/figures/participation_reference.png)。每幅图同目录均保存PDF/SVG,完整CDF及参照数据保存在`profiles.json.gz`,实测范数保存在`measured_radii.npz`;均随本次成果进入Git。
|
||||
@@ -0,0 +1,50 @@
|
||||
# 实际2B参数:比均匀参照更靠里吗?
|
||||
|
||||
**在明确的“校准最大半径以内”口径下,是;但数据同时显示更宽的径向分布,不能概括为整团参数向内收缩。此次GSM8K微调几乎没有改变这些几何指标。**
|
||||
|
||||
这轮直接读取了保留的Qwen3.5-2B权重和同一底座的已有纯LoRA GRPO检查点,在8.211.154.134上使用CPU完成。没有训练、推理或删除权重。
|
||||
|
||||
## 一个模型有多少组高维分布?
|
||||
|
||||
按事先固定的参数矩阵行/列与语言注意力头视图规则,每个模型有 **1,558组**:554个矩阵视图、1,004个按头视图。它们有重叠,不是模型固有的唯一分布数量。
|
||||
|
||||
主要汇总使用1,521个样本充足、未抽取坐标的视图。另有36个小样本视图和1个坐标抽样视图,全部单列并保留数据。整个检查点包括语言、视觉与MTP,共632个参数张量;319个一维张量和18个低维卷积核不满足这次“高维向量云”的规则。
|
||||
|
||||
## 有更多内侧质量,但也有更长的外尾
|
||||
|
||||
每组最多512个参数向量,一半校准中心及半径,另一半测量。对照也使用同样的校准规则;没有用所有向量的最大范数事后包住全部数据。
|
||||
|
||||
以原点为中心,比较归一化半径 `r / R_cal <= 0.9`:
|
||||
|
||||
|视图|组数|相对均匀球的内侧质量差中位数|相对匹配均值、逐坐标方差的均匀盒的质量差中位数|
|
||||
|---|---:|---:|---:|
|
||||
|矩阵行/列|517|+98.0个百分点|+97.7个百分点|
|
||||
|按头|1,004|+97.3个百分点|+97.3个百分点|
|
||||
|
||||
改用校准均值作为中心,结果仍有约96.9–97.7个百分点的差异。因此,这个现象并非仅来自中心放在原点。
|
||||
|
||||
但最大半径很容易受到少数大范数向量影响。换成各自的校准RMS尺度,并比较完整CDF后,**93.8%的矩阵视图和87.8%的头视图同时存在超过10个百分点的内尾、外尾差异**。去均值后分别为94.4%和86.4%。这说明两尾同时增加是普遍现象,比“所有向量整体更靠内”更符合这些数据。
|
||||
|
||||

|
||||
|
||||
这三组示例按模块角色固定:GDN的Q头、全注意力的Q头、MLP上投影行。上排用校准最大半径,下排用RMS;它们只是帮助读图,不代替全量统计。
|
||||
|
||||
## 是否说明稀疏或低维?
|
||||
|
||||
还不能如此推断。采样视图的逐组精确零值率中位数为0;点坐标能量参与率除以维度的中位数约0.31。径向内侧质量、坐标能量集中和样本间的有效维数是不同的测量对象。
|
||||
|
||||
本轮同时记录了有限样本Gram参与率,并与同样本数的均匀参照比较。它受校准样本秩上限限制,不能作为真实内在维度的直接估计。盒参照也只匹配边际范围或逐坐标矩,并未匹配相关结构。因此,本轮没有单独识别“稀疏支持”导致的效应。
|
||||
|
||||
## 微调前后改变了吗?
|
||||
|
||||
LoRA实际改变72个投影矩阵,影响972个视图,其中936个属于主要汇总。只对这些受影响的主要视图配对,以免大量未改动参数稀释差异。
|
||||
|
||||
原点中心下,逐组中位 `r/R_cal` 的配对变化中位数为 **6.30×10⁻⁷**,最大绝对变化 **4.03×10⁻⁴**。去均值后的结论相近。90%半径质量差在原点中心口径下未跨越当前经验CDF的分辨率;这不表示两套权重完全相同。
|
||||
|
||||
因此,这两个检查点不能支持“微调后、更好的模型更靠内”的结论;本轮也没有测任务质量。参数几何中的宽径向结构可以继续挖掘,但它本身还不是功能重复或可互相替代的证据。
|
||||
|
||||
## 数据与核验
|
||||
|
||||
[完整数值报告](../results/model-shell/REPORT.md) · [冻结协议](../model_shell/PROTOCOL.md) · [复现方式](../model_shell/README.md) · [指标CSV](../results/model-shell/metrics.csv) · [摘要JSON](../results/model-shell/summary.json) · [审计SHA](../results/model-shell/audit.json)
|
||||
|
||||
6,232个模型×中心×视图组合全部核验;CDF从保留的校准/留出范数复算,检查有限样本秩上限,原模型和适配器SHA均与既有记录一致。远程4项测试通过,覆盖索引、LoRA读取、中心与尺度、均匀球校准和稀疏贴壳反例。图表、完整CDF及对照摘要、实测范数一同保存。结论为描述性统计:视图相关且重叠,没有将其当作独立重复实验进行显著性检验。
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"source_commit": "098ea8650c7d0e06339c66e3a0509e38b85b3d7d",
|
||||
"base_model_revision": "15852e8c16360a2fea060d615a32b45270f8a8fc",
|
||||
"sqrt_js_effective_heads": {
|
||||
"median": 8.93182211792415,
|
||||
"p10": 5.7840811612328125,
|
||||
"p90": 11.67265834734814,
|
||||
"donor_heads": 16
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"path": "results/head-dominance/figures/retrieval_scale_sensitivity.png",
|
||||
"sha256": "4f2dac5fdb5506ee5282d459dcb86cc6b58fac05d494d6409c29ea6924365add",
|
||||
"immutable_url": "https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/retrieval_scale_sensitivity.png",
|
||||
"http_status": 200,
|
||||
"remote_sha_verified": true,
|
||||
"content_type": "image/png"
|
||||
},
|
||||
{
|
||||
"path": "results/head-dominance/figures/retrieval_scale_sensitivity.pdf",
|
||||
"sha256": "56a2f5655196018f4310dbccb29cb55c314111007598491496c9a36256958525",
|
||||
"immutable_url": "https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/retrieval_scale_sensitivity.pdf"
|
||||
},
|
||||
{
|
||||
"path": "results/head-dominance/figures/retrieval_scale_sensitivity.svg",
|
||||
"sha256": "f51803e68df40df6dda91bce7236c999f405ccf30be56e7819242147a5e9a5b8",
|
||||
"immutable_url": "https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/retrieval_scale_sensitivity.svg"
|
||||
},
|
||||
{
|
||||
"path": "results/head-dominance/figures/joint_removal_effects.png",
|
||||
"sha256": "7dc26da9fda80e62c6445c5dee29fe52c06146dea0cd65d444755cf0eb5bb729",
|
||||
"immutable_url": "https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/joint_removal_effects.png",
|
||||
"http_status": 200,
|
||||
"remote_sha_verified": true,
|
||||
"content_type": "image/png"
|
||||
},
|
||||
{
|
||||
"path": "results/head-dominance/figures/joint_removal_effects.pdf",
|
||||
"sha256": "b35132d3e1cf3d202bc6695e64f64c9e495196bc6c9a92659ccf65aceb566040",
|
||||
"immutable_url": "https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/joint_removal_effects.pdf"
|
||||
},
|
||||
{
|
||||
"path": "results/head-dominance/figures/joint_removal_effects.svg",
|
||||
"sha256": "03e6b299c1dbfa703ac72cbc7e9749e3173b649a22d829316dd5b5dccbe8728d",
|
||||
"immutable_url": "https://gitea.entroia.com/Zayden-Jung/exp-model-parameter-similarity/raw/commit/098ea8650c7d0e06339c66e3a0509e38b85b3d7d/results/head-dominance/figures/joint_removal_effects.svg"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
# Head influence concentration: measurement protocol
|
||||
|
||||
Target: quantify the statistical distribution of large and small upstream head
|
||||
influences on the next layer's Q/K/V; identity of dominant heads may vary at each
|
||||
sample, query token and recipient head. No training, GPU, deletion or model edits.
|
||||
|
||||
Scope: all 23 adjacent layer transitions of the retained Qwen3.5-2B text model,
|
||||
including 16-head linear attention and 8-head full attention. Measure effective
|
||||
Q/K/V, and retrieval probability changes where the recipient uses full attention.
|
||||
The intervening source-layer residual/MLP and recipient input normalization must
|
||||
be recomputed after interventions. Residual stream is preserved: removing an
|
||||
attention head is not removing all information reaching the recipient.
|
||||
|
||||
For each observation, remove one upstream attention head's projected contribution
|
||||
at a time. Record nonnegative influence magnitude d_i and its absolute scale.
|
||||
When sum(d_i)>0, p_i=d_i/sum(d_i) is normalized intervention influence, NOT an
|
||||
additive causal attribution or a native attention probability over upstream heads.
|
||||
All-zero influence has undefined concentration and must be flagged, not assigned
|
||||
uniform or concentrated values. Record small total influences explicitly.
|
||||
|
||||
Primary continuous measures:
|
||||
- Effective head count: N_eff=1/sum(p_i^2), range [1,H].
|
||||
- Effective head fraction: N_eff/H, supports different H.
|
||||
- Normalized concentration: C=(sum(p_i^2)-1/H)/(1-1/H), range [0,1].
|
||||
These are related summaries, not independent evidence. Report distributions over
|
||||
texts/tokens/recipient heads/layers, not only concentration of globally averaged
|
||||
influences. Primary query positions 7 onward avoid trivial short-prefix attention.
|
||||
|
||||
Secondary intuitive measures: top1/top25%/top50% influence share, bottom25%
|
||||
share, and number of heads reaching 90% influence. Preserve raw influence tables.
|
||||
No RMS activity threshold is used to define influence concentration.
|
||||
|
||||
Joint interventions are required: per observation's weak-head set and strong-head
|
||||
set must be removed together and measured, because individual ablations are not
|
||||
additive and may conceal cancellation or synergy. Rankings may be input-specific;
|
||||
these experiments cannot imply a universally removable fixed head set. Distinguish
|
||||
local next-layer QKV/probability effects from unmeasured final LM quality.
|
||||
|
||||
CPU measurements, scientific plots, tests and audits execute on the previously
|
||||
authorized server 8.211.154.134. All weights and existing caches remain retained.
|
||||
|
||||
## Fixed execution details (before real-model measurements)
|
||||
|
||||
Four texts are reused from crossqkv/fresh_samples.json (two Chinese/two English),
|
||||
32 tokens each; no independent generalization claim. All tokens are computed,
|
||||
queries7..31 are primary statistical observations. The observer caches source
|
||||
residual inputs and exact per-head projected output components; their sum is
|
||||
checked against the native branch output. First text's full forward is checked
|
||||
against the canonical streaming forward, and every transition has a null-mask
|
||||
control. No cached tensor is deleted.
|
||||
|
||||
For each query/recipient query-head, individual influence is the L2 change divided
|
||||
by that same baseline vector's L2 (floor1e-12). Q,K,V are analyzed separately.
|
||||
A declared balanced score sqrt((relative_Q^2+relative_K^2+relative_V^2)/3) is also
|
||||
analyzed; it does not treat their different physical scales as directly additive.
|
||||
Full attention: Q/K are measured after learned norm/partial RoPE, V before output
|
||||
mixing, and actual softmax retrieval JS is measured. Linear attention: Q/K/V are
|
||||
after causal convolution+SiLU; Q/K include the delta-rule L2 normalization and Q
|
||||
scale. It has no ordinary softmax retrieval distribution. Full-attention GQA K/V
|
||||
are repeated to query-head slots for aligned joint tests; these slots are not
|
||||
independent KV heads, and statistical observations are not independent samples.
|
||||
|
||||
Joint weak-half/strong-half/random-half/all-head removal uses a separate coherent
|
||||
sequence for each recipient query-head. At each source token, choose the donor
|
||||
half by that recipient query-head's QKV influence ranking at the same token.
|
||||
Recompute full recipient sequence; convolution and QK retrieval can therefore
|
||||
propagate changes between positions. Only the intended recipient head is scored
|
||||
for each scenario. This is an input-adaptive diagnostic, not a computationally
|
||||
free head-selection policy. Random uses fixed seed31000+sample_index*100+layer.
|
||||
Compare joint effects to sums of corresponding single effects but do not assume
|
||||
additivity. For JS use the same joint sets (selected by QKV, not by JS).
|
||||
|
||||
No success criterion assumes that dominance exists. Report effective-head and
|
||||
absolute-effect distributions even if contributions are diffuse. No final-LM
|
||||
NLL or deployable pruning quality claim. Scientific output includes all raw
|
||||
single/joint effects and deletion masks; large baseline caches remain external.
|
||||
@@ -0,0 +1,75 @@
|
||||
# Statistical head influence dominance (CPU)
|
||||
|
||||
This study answers how concentrated the **distribution of measured upstream-head
|
||||
influences** is, without assuming that dominant head identities are fixed across
|
||||
texts, positions or recipient heads. Read [registered protocol](PROTOCOL.md).
|
||||
|
||||
- `core.py`: normalized effective Q/K/V extraction for both attention types,
|
||||
source projected head decomposition, exact nonlinear downstream recomputation,
|
||||
coherent masks, continuous concentration and JS.
|
||||
- `run.py`: four fixed prior texts, all23 adjacent connections, single-head and
|
||||
weak/strong/random-half/all-head interventions, per-transition checkpointing,
|
||||
canonical-forward/null controls, preserved baseline caches.
|
||||
- `report.py`: full saved-data distributions, per-transition CSV, continuous
|
||||
effective head plots, influence rank curves, joint tests and Chinese report.
|
||||
- `audit.py`: independently recomputes concentration/masks from raw effects,
|
||||
validates scope/null/head sums, and hashes retained caches, source and results.
|
||||
- `tests/test_dominance.py`: continuous limiting cases, undefined zero-total,
|
||||
token-dependent masks, JS identity, both canonical mixed-layer paths, and joint
|
||||
interventions on a small checkpoint with known arrays.
|
||||
|
||||
Influence for Q/K/V is relative L2 change after deleting one whole donor attention
|
||||
head (at all sequence positions), preserving the prior residual and recomputing
|
||||
source MLP + recipient normalization. Source **output/value heads** are the units:
|
||||
16 for linear attention,8 for full attention. These are not arbitrary individual
|
||||
Q/K/V weight blocks. For a recipient query-head at one token, normalize donor
|
||||
influences to p. Primary continuous summary is N_eff=1/sum(p²), and N_eff/H.
|
||||
C=(sum(p²)-1/H)/(1-1/H) is a related0..1 concentration score. These are not
|
||||
independent confirmations. No RMS near-zero threshold or R fitting is used.
|
||||
|
||||
Q/K/V are separate primary scales; balanced QKV score is RMS of their three
|
||||
relative changes. It is a declared summary, not a norm in a single physical space.
|
||||
Zero total implies undefined concentration, not a uniform distribution. Single-head relative effects before head-share normalization and true joint
|
||||
effects are retained as well as shares. The saved metric named max_absolute is
|
||||
the largest unsigned relative-L2 effect, not an unnormalized hidden-space norm.
|
||||
The total field sums individual relative effects; it is not the measured joint
|
||||
effect of removing the whole attention branch.
|
||||
|
||||
Full-attention recipients additionally have real token-key probability JS changes;
|
||||
linear attention does not have an ordinary softmax attention probability matrix.
|
||||
Full-attention K/V repeat their GQA groups to query-head slots for aligned joint
|
||||
experiments, not as extra independent KV observations. Every headline statistic
|
||||
is descriptive: query/token/head observations are dependent, and four short prior
|
||||
texts do not establish universal dominance or independent generalization.
|
||||
|
||||
Joint masks vary per source token and recipient head. Recompute a coherent full
|
||||
sequence for each recipient head, scoring that intended head afterward. Rank by
|
||||
single QKV influence, remove weakest half/strongest half/a fixed-seed random half,
|
||||
or all attention heads. This investigates interactions and cross-token effects;
|
||||
it is not a validated free selector, fixed removable head subset or LM pruning.
|
||||
|
||||
Only run model work and scientific plotting on the authorized CPU server:
|
||||
```
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m unittest tests.test_dominance -v
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m dominance.run --source runs/cpu-qwen35-2b --out runs/NEW_DOMINANCE_DIR --seconds 7200
|
||||
venv/bin/python -B -m dominance.report runs/NEW_DOMINANCE_DIR
|
||||
venv/bin/python -B -m dominance.audit runs/NEW_DOMINANCE_DIR runs/cpu-qwen35-2b
|
||||
```
|
||||
|
||||
No training, GPU, new model download or automatic deletion. Raw intervention
|
||||
arrays and masks are delivered to Git; large baseline caches stay on the server
|
||||
with path/size/SHA metadata. Existing checkpoints/caches are never removed.
|
||||
|
||||
The saved sum of selected individual effects is only a query-wise mask-weighted
|
||||
reference: individual ablations remove a head at all positions, whereas joint
|
||||
masks can vary across positions. Their difference cannot isolate pure nonlinear
|
||||
interaction, since temporal intervention supports also differ. Use the measured
|
||||
weak/strong/random joint effects directly; do not call this reference an additive
|
||||
causal decomposition or a Shapley attribution.
|
||||
|
||||
Scale sensitivity: after reviewing the first complete summaries, add sqrt(JS)
|
||||
(Jensen–Shannon distance) alongside primary JS divergence. Divergence is roughly
|
||||
quadratic for small changes, so shares and effective head counts depend on this
|
||||
scale. All original primary statistics and raw interventions remain unchanged;
|
||||
primary-analysis-summary.json preserves the pre-sensitivity aggregate for exact
|
||||
audit comparison. Retrieval-scale plots and source tables show both definitions.
|
||||
@@ -0,0 +1,90 @@
|
||||
"""Recompute saved concentration, masks, scale and scope checks; preserve caches."""
|
||||
import json,hashlib,csv,sys
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from .core import concentration
|
||||
|
||||
|
||||
def main(root,source):
|
||||
root=Path(root);source=Path(source);status=json.loads((root/'status.json').read_text());assert status['state']=='completed'
|
||||
samples=json.loads((root/'samples.json').read_text());assert len(samples)==4 and all(len(s['token_ids'])==32 for s in samples)
|
||||
expected={(s['id'],i) for s in samples for i in range(23)};actual={(x['sample'],x['source']) for x in status['completed_links']};assert actual==expected and len(status['completed_links'])==92
|
||||
cfg=json.loads((source/'model_config.json').read_text())['text_config'];obs=dict(np.load(root/'observations.npz'));lookup=sorted(s['id'] for s in samples);counts={};undefined={};full_js_links=0;joint_values={}
|
||||
for sample,layer in sorted(actual):
|
||||
f=root/'raw'/f'{sample}-link-{layer:02d}.npz';d=dict(np.load(f));hs=8 if cfg['layer_types'][layer]=='full_attention' else 16;hr=8 if cfg['layer_types'][layer+1]=='full_attention' else 16
|
||||
if hr==8:
|
||||
full_js_links+=1;d['single_sqrtJS']=np.sqrt(d['single_JS'])
|
||||
for label in ('weak_half','strong_half','random_half','all_heads'):
|
||||
d['joint_'+label+'_sqrtJS']=np.sqrt(d['joint_'+label+'_JS'])
|
||||
mask=d.get('mask_'+label,np.ones((hr,32,hs),dtype=np.float32))
|
||||
d['individual_sum_'+label+'_sqrtJS']=np.sum(d['single_sqrtJS'].transpose(2,1,0)*mask,-1).T
|
||||
d['null_sqrtJS']=np.sqrt(d['null_JS'])
|
||||
masks={label:d['mask_'+label] for label in ('weak_half','strong_half','random_half')}
|
||||
for label,m in masks.items():
|
||||
assert m.shape==(hr,32,hs);assert np.isin(m,[0,1]).all();np.testing.assert_array_equal(m.sum(-1),hs//2)
|
||||
np.testing.assert_array_equal(masks['weak_half']+masks['strong_half'],1)
|
||||
ranked=np.argsort(d['single_QKV'].transpose(2,1,0),axis=-1,kind='stable')
|
||||
np.testing.assert_array_equal(np.take_along_axis(masks['weak_half'],ranked[...,:hs//2],-1),1)
|
||||
for key in ('Q','K','V','QKV')+(('JS','sqrtJS') if hr==8 else ()):
|
||||
single=d['single_'+key];assert single.shape==(hs,32,hr) and np.isfinite(single).all() and np.min(single)>=0
|
||||
effect=single[:,7:,:].transpose(1,2,0);stats=concentration(effect);counts[key]=counts.get(key,0)+effect.shape[0]*hr;undefined[key]=undefined.get(key,0)+int((~stats['valid']).sum())
|
||||
choose=(obs[key+'_source']==layer)&(obs[key+'_sample_index']==lookup.index(sample))
|
||||
assert int(choose.sum())==25*hr
|
||||
for metric,values in stats.items():
|
||||
if metric=='valid':continue
|
||||
np.testing.assert_allclose(obs[key+'_'+metric][choose],values.ravel(),rtol=1e-6,atol=1e-7,equal_nan=True)
|
||||
for label in ('weak_half','strong_half','random_half','all_heads'):
|
||||
mask=masks.get(label,np.ones((hr,32,hs),dtype=np.float32));expected_sum=np.sum(single.transpose(2,1,0)*mask,-1).T
|
||||
np.testing.assert_allclose(d['individual_sum_'+label+'_'+key],expected_sum,rtol=1e-6,atol=1e-8)
|
||||
assert d['joint_'+label+'_'+key].shape==(32,hr) and np.isfinite(d['joint_'+label+'_'+key]).all()
|
||||
joint_values.setdefault((key,label),[]).extend(d['joint_'+label+'_'+key][7:].ravel())
|
||||
assert float(np.max(d['null_'+key]))<=2e-5
|
||||
assert full_js_links==24
|
||||
summary=json.loads((root/'analysis-summary.json').read_text())
|
||||
def check_stats(values,record):
|
||||
v=np.asarray(values,dtype=np.float64);v=v[np.isfinite(v)];assert len(v)==record['count']
|
||||
if len(v):
|
||||
for name,x in zip(['p10','median','p90','mean'],[*np.quantile(v,[.1,.5,.9]),v.mean()]):np.testing.assert_allclose(record[name],x,rtol=2e-6,atol=1e-8)
|
||||
for key in counts:
|
||||
for metric,record in summary['concentration'][key].items():check_stats(obs[key+'_'+metric],record)
|
||||
primary=json.loads((root/'primary-analysis-summary.json').read_text())
|
||||
for section in ('concentration','joint','paired_joint','by_recipient_type'):
|
||||
for key,value in primary[section].items():assert summary[section][key]==value,(section,key)
|
||||
full_sources=sorted({x['source'] for x in status['completed_links'] if x['full_attention_recipient']})
|
||||
assert summary['full_attention_source_indices']==full_sources
|
||||
for key,groups in summary['by_recipient_type'].items():
|
||||
src=obs[key+'_source']
|
||||
for label,metrics in groups.items():
|
||||
choose=np.isin(src,full_sources) if label=='full_attention' else ~np.isin(src,full_sources)
|
||||
for metric,record in metrics.items():check_stats(obs[key+'_'+metric][choose],record)
|
||||
for (key,label),values in joint_values.items():check_stats(values,summary['joint'][key][label])
|
||||
for key in counts:
|
||||
weak=np.asarray(joint_values[(key,'weak_half')]);strong=np.asarray(joint_values[(key,'strong_half')]);random=np.asarray(joint_values[(key,'random_half')]);valid=weak>0;record=summary['paired_joint'][key]
|
||||
assert record['zero_weak_effect_count']==int((~valid).sum())
|
||||
np.testing.assert_allclose(record['weak_less_than_strong_fraction'],np.mean(weak<strong))
|
||||
np.testing.assert_allclose(record['weak_less_than_random_fraction'],np.mean(weak<random))
|
||||
check_stats(strong[valid]/weak[valid],record['strong_over_weak']);check_stats(random[valid]/weak[valid],record['random_over_weak'])
|
||||
controls=json.loads((root/'head-sum-controls.json').read_text());assert len(controls)==96 and max(x['relative_l2'] for x in controls)<2e-5
|
||||
assert status['canonical_forward_relative_error']<2e-5
|
||||
caches=[]
|
||||
for f in sorted((root/'cache').rglob('*')):
|
||||
if f.is_file():caches.append({'path':str(f.resolve()),'bytes':f.stat().st_size,'sha256':hashlib.sha256(f.read_bytes()).hexdigest()})
|
||||
weights=list((source/'weights').rglob('*.safetensors'));assert weights and sum(f.stat().st_size for f in weights)==4548221488
|
||||
manifest=json.loads((source/'manifest.json').read_text());weight_records=[]
|
||||
for f in weights:
|
||||
with f.open('rb') as stream:sha=hashlib.file_digest(stream,'sha256').hexdigest()
|
||||
expected=next(x['upstream_sha256'] for x in manifest['files'] if x['name']==f.name);assert sha==expected
|
||||
weight_records.append({'path':str(f.resolve()),'bytes':f.stat().st_size,'sha256':sha,'matches_upstream':True})
|
||||
external={'host':'8.211.154.134','checkpoint_directory':str((source/'weights').resolve()),'checkpoint_bytes':sum(f.stat().st_size for f in weights),'checkpoint_files':weight_records,'revision':'15852e8c16360a2fea060d615a32b45270f8a8fc','baseline_caches':caches,'automatic_deletion':False,'prior_caches_untouched':True}
|
||||
(root/'external-caches.json').write_text(json.dumps(external,indent=2)+'\n')
|
||||
reference=json.loads((source/'reference-check.json').read_text())
|
||||
assert reference['passed'] and all(x['passed'] for x in reference['tests'])
|
||||
assert hashlib.sha256(Path('functional/model.py').read_bytes()).hexdigest()==reference['implementation_sha256']
|
||||
(root/'prior-official-reference-check.json').write_bytes((source/'reference-check.json').read_bytes())
|
||||
files=list(Path('dominance').glob('*.py'))+[Path('dominance/PROTOCOL.md'),Path('dominance/README.md'),Path('tests/test_dominance.py'),Path('functional/model.py'),Path('crossqkv/fresh_samples.json')]
|
||||
(root/'source-hashes.json').write_text(json.dumps({str(f):hashlib.sha256(f.read_bytes()).hexdigest() for f in files if not f.name.startswith('._')},indent=2)+'\n')
|
||||
audit={'passed':True,'transitions':23,'texts':4,'link_observations':92,'primary_observations_per_metric':counts,'undefined_zero_total_per_metric':undefined,'full_attention_js_links':full_js_links,'head_sum_controls':96,'canonical_forward_relative_error':status['canonical_forward_relative_error'],'all_raw_concentration_and_masks_recomputed':True,'pooled_concentration_and_joint_summary_recomputed':True,'original_primary_summaries_unchanged':True,'sqrt_JS_scale_sensitivity_recomputed':True,'retained_baseline_cache_files':len(caches),'checkpoint_sha_matches_upstream':True,'prior_official_reference_check_passed_same_implementation':True,'prior_official_reference_tests':len(reference['tests'])}
|
||||
(root/'audit.json').write_text(json.dumps(audit,indent=2)+'\n');print(json.dumps(audit,indent=2),flush=True)
|
||||
included=[f for f in root.rglob('*') if f.is_file() and 'cache' not in f.relative_to(root).parts and f.name!='checksums.json']
|
||||
(root/'checksums.json').write_text(json.dumps({str(f.relative_to(root)):hashlib.sha256(f.read_bytes()).hexdigest() for f in sorted(included)},indent=2)+'\n')
|
||||
if __name__=='__main__':main(sys.argv[1],sys.argv[2])
|
||||
@@ -0,0 +1,85 @@
|
||||
"""Frozen-model head interventions and continuous influence concentration."""
|
||||
import numpy as np
|
||||
from functional.model import StreamingLM,PREFIX,rope,causal_conv,attention
|
||||
|
||||
|
||||
def concentration(d):
|
||||
"""Last axis donor head; zero total is undefined, represented by NaNs."""
|
||||
d=np.asarray(d,dtype=np.float64)
|
||||
if not np.isfinite(d).all() or np.any(d<0):raise ValueError('Finite nonnegative influences required')
|
||||
h=d.shape[-1];total=d.sum(-1);valid=total>0
|
||||
p=np.divide(d,total[...,None],out=np.zeros_like(d),where=valid[...,None]);square=np.sum(p*p,-1)
|
||||
neff=np.divide(1,square,out=np.full_like(total,np.nan),where=valid)
|
||||
ordered=np.sort(p,axis=-1)[...,::-1]
|
||||
return {'total':total,'max_absolute':d.max(-1),'valid':valid,'effective_heads':neff,'effective_fraction':neff/h,
|
||||
'concentration':np.where(valid,(square-1/h)/(1-1/h),np.nan),
|
||||
'top1':np.where(valid,ordered[...,0],np.nan),'top25':np.where(valid,ordered[...,:max(1,h//4)].sum(-1),np.nan),
|
||||
'top50':np.where(valid,ordered[...,:max(1,h//2)].sum(-1),np.nan),
|
||||
'bottom25':np.where(valid,ordered[...,-max(1,h//4):].sum(-1),np.nan),
|
||||
'heads90':np.where(valid,1+np.sum(np.cumsum(ordered,axis=-1)<.9,axis=-1),np.nan)}
|
||||
|
||||
|
||||
def masks_from_influences(d,weak=True):
|
||||
"""d [donor,T,recipient]; output masks [recipient,T,donor]."""
|
||||
ranked=np.argsort(d.transpose(2,1,0),axis=-1,kind='stable');n=d.shape[0]//2
|
||||
selected=ranked[...,:n] if weak else ranked[...,-n:]
|
||||
mask=np.zeros_like(ranked,dtype=np.float32);np.put_along_axis(mask,selected,1,axis=-1)
|
||||
return mask
|
||||
|
||||
|
||||
def js_rows(a,b):
|
||||
a=np.asarray(a,dtype=np.float64);b=np.asarray(b,dtype=np.float64);m=(a+b)/2
|
||||
def term(x):return np.where(x>0,x*np.log(np.maximum(x,1e-300)/np.maximum(m,1e-300)),0)
|
||||
return np.maximum(0,.5*np.sum(term(a)+term(b),axis=-1))
|
||||
|
||||
|
||||
class InfluenceLM(StreamingLM):
|
||||
capturing=False
|
||||
def linear(self,x,name,rows=256):
|
||||
y=super().linear(x,name,rows)
|
||||
if self.capturing and (name.endswith('self_attn.o_proj') or name.endswith('linear_attn.out_proj')):
|
||||
layer=int(name.split('.')[1]);nh=self.config['num_attention_heads'] if 'self_attn' in name else self.config['linear_num_value_heads']
|
||||
xx=x.reshape(*x.shape[:2],nh,-1);dim=xx.shape[-1];t=self.tensors[PREFIX+name+'.weight'];od,idim=t.shape
|
||||
out=np.empty((*x.shape[:2],nh,od),dtype=np.float32)
|
||||
for start in range(0,od,256):
|
||||
self.guard();stop=min(od,start+256);w=t.read(slice(start*idim,stop*idim)).reshape(stop-start,idim)
|
||||
for head in range(nh):out[:,:,head,start:stop]=xx[:,:,head]@w[:,head*dim:(head+1)*dim].T
|
||||
del w;t.evict()
|
||||
err=float(np.linalg.norm(out.sum(2).astype(np.float64)-y)/max(np.linalg.norm(y.astype(np.float64)),1e-30))
|
||||
if err>2e-5:raise AssertionError(('head sum mismatch',layer,err))
|
||||
self.head_outputs=out;self.head_sum_errors.append({'layer':layer,'relative_l2':err})
|
||||
return y
|
||||
|
||||
def baseline(self,ids,root):
|
||||
h=self.embedding(ids);self.head_sum_errors=[]
|
||||
for layer,kind in enumerate(self.config['layer_types']):
|
||||
raw=h.copy();n=self.normalization(h,f'layers.{layer}.input_layernorm');self.capturing=True
|
||||
out,_=self.full_attention(n,layer) if kind=='full_attention' else (self.linear_attention(n,layer),None)
|
||||
self.capturing=False;heads=self.head_outputs;self.head_outputs=None
|
||||
mid=raw+out;h=mid+self.mlp(self.normalization(mid,f'layers.{layer}.post_attention_layernorm'),layer)
|
||||
np.savez(root/f'layer-{layer}.npz',raw=raw,out=out,heads=heads,next_raw=h)
|
||||
print('baseline layer',layer,flush=True)
|
||||
return h
|
||||
|
||||
def recipient(self,raw,layer):
|
||||
h=self.normalization(raw,f'layers.{layer}.input_layernorm');c=self.config;b,t=h.shape[:2]
|
||||
if c['layer_types'][layer]=='full_attention':
|
||||
p=f'layers.{layer}.self_attn.';nh=c['num_attention_heads'];nk=c['num_key_value_heads'];d=c['head_dim']
|
||||
q=self.linear(h,p+'q_proj').reshape(b,t,nh,2*d)[...,:d];k=self.linear(h,p+'k_proj').reshape(b,t,nk,d);v=self.linear(h,p+'v_proj').reshape(b,t,nk,d)
|
||||
q=self.normalization(q,p+'q_norm');k=self.normalization(k,p+'k_norm');r=c['rope_parameters'];q,k=(rope(z,r['rope_theta'],r['partial_rotary_factor']) for z in (q,k))
|
||||
k=np.repeat(k,nh//nk,axis=2);v=np.repeat(v,nh//nk,axis=2)
|
||||
_,prob=attention(q,k,v)
|
||||
return {'Q':q,'K':k,'V':v,'P':prob}
|
||||
p=f'layers.{layer}.linear_attn.';kh=c['linear_num_key_heads'];vh=c['linear_num_value_heads'];kd=c['linear_key_head_dim'];vd=c['linear_value_head_dim']
|
||||
x=causal_conv(self.linear(h,p+'in_proj_qkv'),self.small(p+'conv1d.weight')[:,0,:]);q,k,v=np.split(x,[kh*kd,2*kh*kd],axis=-1)
|
||||
q=q.reshape(b,t,kh,kd);k=k.reshape(b,t,kh,kd);v=v.reshape(b,t,vh,vd)
|
||||
if vh!=kh:q,k=np.repeat(q,vh//kh,axis=2),np.repeat(k,vh//kh,axis=2)
|
||||
q=q/np.sqrt(np.sum(q*q,axis=-1,keepdims=True)+1e-6)/np.float32(np.sqrt(kd));k=k/np.sqrt(np.sum(k*k,axis=-1,keepdims=True)+1e-6)
|
||||
return {'Q':q,'K':k,'V':v}
|
||||
|
||||
def intervene(self,cache,layer,masks):
|
||||
# Each scenario has a full coherent token-dependent deletion mask.
|
||||
removed=np.einsum('bth,thd->btd',masks,cache['heads'][0],optimize=True)
|
||||
mid=cache['raw']+cache['out']-removed
|
||||
nxt=mid+self.mlp(self.normalization(mid,f'layers.{layer}.post_attention_layernorm'),layer)
|
||||
return self.recipient(nxt,layer+1)
|
||||
@@ -0,0 +1,140 @@
|
||||
"""Saved-data scientific analysis; no model invocation or fitting."""
|
||||
import csv,json
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
from .core import concentration
|
||||
|
||||
|
||||
def stats(x):
|
||||
x=np.asarray(x,dtype=np.float64);valid=x[np.isfinite(x)]
|
||||
if not valid.size:return {'count':0,'p10':None,'median':None,'p90':None,'mean':None}
|
||||
q=np.quantile(valid,[.1,.5,.9]);return {'count':int(valid.size),'p10':float(q[0]),'median':float(q[1]),'p90':float(q[2]),'mean':float(valid.mean())}
|
||||
|
||||
|
||||
def csvwrite(p,rows):
|
||||
with p.open('w') as f:
|
||||
w=csv.DictWriter(f,fieldnames=list(rows[0]));w.writeheader();w.writerows(rows)
|
||||
|
||||
|
||||
def main(root):
|
||||
root=Path(root);figdir=root/'figures';figdir.mkdir(exist_ok=True);status=json.loads((root/'status.json').read_text());assert status['state']=='completed'
|
||||
rows=[];joint_rows=[];pool={};curves={};joint_pool={};obs={};winner=[];joint_by_layer={}
|
||||
for entry in status['completed_links']:
|
||||
sample=entry['sample'];source=entry['source'];data=dict(np.load(root/'raw'/f'{sample}-link-{source:02d}.npz'))
|
||||
if 'single_JS' in data:
|
||||
data['single_sqrtJS']=np.sqrt(data['single_JS'])
|
||||
for label in ('weak_half','strong_half','random_half','all_heads'):
|
||||
data['joint_'+label+'_sqrtJS']=np.sqrt(data['joint_'+label+'_JS'])
|
||||
masks=data.get('mask_'+label,np.ones_like(data['mask_weak_half']))
|
||||
data['individual_sum_'+label+'_sqrtJS']=np.sum(data['single_sqrtJS'].transpose(2,1,0)*masks,-1).T
|
||||
for key in ('Q','K','V','QKV','JS','sqrtJS'):
|
||||
if 'single_'+key not in data:continue
|
||||
d=data['single_'+key][:,7:,:].transpose(1,2,0);c=concentration(d);valid=c['valid'];h=d.shape[-1]
|
||||
metric={k:v.reshape(-1) for k,v in c.items() if k!='valid'}
|
||||
row={'sample':sample,'source':source,'recipient':source+1,'metric':key,'source_heads':h,'recipient_attention_type':'full_attention' if entry['full_attention_recipient'] else 'linear_attention','observations':d.shape[0]*d.shape[1],'undefined_zero_total':int((~valid).sum())}
|
||||
for k,v in metric.items():
|
||||
pool.setdefault(key,{}).setdefault(k,[]).extend(v)
|
||||
for s,z in stats(v).items():row[k+'_'+s]=z
|
||||
rows.append(row)
|
||||
# Raw per-observation statistics for independently reproducing figures.
|
||||
for k,v in metric.items():obs.setdefault(key+'_'+k,[]).append(v.astype(np.float32))
|
||||
n=d.shape[0]*d.shape[1]
|
||||
for k,v in [('source',np.full(n,source)),('sample_index',np.full(n,sorted({e['sample'] for e in status['completed_links']}).index(sample))),('token',np.repeat(np.arange(7,32),d.shape[1])),('recipient_head',np.tile(np.arange(d.shape[1]),25))]:obs.setdefault(key+'_'+k,[]).append(v.astype(np.int16))
|
||||
p=np.divide(d,d.sum(-1,keepdims=True),out=np.zeros_like(d),where=d.sum(-1,keepdims=True)>0);cum=np.concatenate([np.zeros((*d.shape[:2],1)),np.cumsum(np.sort(p,-1)[...,::-1],-1)],-1)
|
||||
grid=np.linspace(0,1,101);cc=np.array([np.interp(grid,np.linspace(0,1,h+1),v) for v in cum[valid]])
|
||||
curves.setdefault(key,[]).extend(cc)
|
||||
win=np.argmax(d,-1);counts=np.bincount(win[valid],minlength=h)
|
||||
winner.append({'sample':sample,'source':source,'metric':key,'most_frequent_winner_fraction':float(counts.max()/max(counts.sum(),1)),'distinct_winning_heads':int((counts>0).sum()),'head_counts':json.dumps(counts.tolist())})
|
||||
for label in ('weak_half','strong_half','random_half','all_heads'):
|
||||
values=data['joint_'+label+'_'+key][7:];summed=data['individual_sum_'+label+'_'+key][7:]
|
||||
jr={'sample':sample,'source':source,'recipient':source+1,'metric':key,'removed':label}
|
||||
for k,x in [('joint_effect',values),('sum_individual',summed)]:
|
||||
for s,z in stats(x).items():jr[k+'_'+s]=z
|
||||
joint_rows.append(jr);joint_pool.setdefault(key,{}).setdefault(label,[]).extend(values.ravel());joint_by_layer.setdefault((key,label,source),[]).extend(values.ravel())
|
||||
csvwrite(root/'concentration-by-link.csv',rows);csvwrite(root/'joint-by-link.csv',joint_rows);csvwrite(root/'winner-identities.csv',winner)
|
||||
np.savez_compressed(root/'observations.npz',**{k:np.concatenate(v) for k,v in obs.items()})
|
||||
pooled={k:{m:stats(v) for m,v in metrics.items()} for k,metrics in pool.items()};joint_stats={k:{m:stats(v) for m,v in metrics.items()} for k,metrics in joint_pool.items()}
|
||||
paired={}
|
||||
for key,labels in joint_pool.items():
|
||||
weak=np.asarray(labels['weak_half']);strong=np.asarray(labels['strong_half']);random=np.asarray(labels['random_half']);valid=weak>0
|
||||
paired[key]={'weak_less_than_strong_fraction':float(np.mean(weak<strong)),'weak_less_than_random_fraction':float(np.mean(weak<random)),'zero_weak_effect_count':int((~valid).sum()),'strong_over_weak':stats(strong[valid]/weak[valid]),'random_over_weak':stats(random[valid]/weak[valid])}
|
||||
full_sources=sorted({x['source'] for x in status['completed_links'] if x['full_attention_recipient']})
|
||||
by_type={}
|
||||
for key in pool:
|
||||
src=np.concatenate(obs[key+'_source']);by_type[key]={}
|
||||
for label,choose in [('full_attention',np.isin(src,full_sources)),('linear_attention',~np.isin(src,full_sources))]:
|
||||
if not choose.any():continue
|
||||
by_type[key][label]={m:stats(np.concatenate(obs[key+'_'+m])[choose]) for m in pool[key]}
|
||||
summary={'scale_sensitivity':'sqrt(JS) added after reviewing completed primary summaries; primary JS and all raw interventions unchanged; squared divergences cannot be equated to probability mass or linear-scale effects','by_recipient_type':by_type,'full_attention_source_indices':full_sources,'paired_joint':paired,'pooling':'query7..31, per text/token/recipient-query-head; descriptive dependent observations, not independent samples','concentration':pooled,'joint':joint_stats,'counts':{'links':len(status['completed_links']),'texts':len(json.loads((root/'samples.json').read_text())),'layer_transitions':23},'sample_index_key':sorted({e['sample'] for e in status['completed_links']}),'winner_identity_file':'winner-identities.csv'}
|
||||
(root/'analysis-summary.json').write_text(json.dumps(summary,indent=2,allow_nan=False)+'\n')
|
||||
def save(fig,name):
|
||||
for ext in ('png','pdf','svg'):fig.savefig(figdir/(name+'.'+ext),dpi=180)
|
||||
plt.close(fig)
|
||||
fig,axs=plt.subplots(1,2,figsize=(14,4.8),layout='constrained')
|
||||
colors={'Q':'C0','K':'C1','V':'C2','QKV':'C3'}
|
||||
for key in colors:
|
||||
for ax,metric in zip(axs,['effective_fraction','top1']):
|
||||
med=[];lo=[];hi=[]
|
||||
source= np.concatenate(obs[key+'_source']);vals=np.concatenate(obs[key+'_'+metric])
|
||||
for layer in range(23):
|
||||
z=stats(vals[source==layer]);lo.append(z['p10']);med.append(z['median']);hi.append(z['p90'])
|
||||
ax.plot(range(1,24),med,label=key,color=colors[key]);ax.fill_between(range(1,24),lo,hi,color=colors[key],alpha=.10)
|
||||
axs[0].set(title='Continuous effective-head fraction (median, p10–p90)',ylabel='N_eff / number of donor heads')
|
||||
axs[1].set(title='Largest donor-head influence share',ylabel='Top-1 normalized ablation effect')
|
||||
for ax in axs:
|
||||
for j,source in enumerate(full_sources):ax.axvspan(source+.6,source+1.4,color='gray',alpha=.08,label='Full-attention receiver' if j==0 else None)
|
||||
ax.set(xlabel='Recipient layer index',ylim=(0,1.02));ax.legend();ax.grid(alpha=.2)
|
||||
fig.suptitle('All 23 adjacent transitions; four texts, query positions 7–31; no training')
|
||||
save(fig,'continuous_dominance')
|
||||
fig,axs=plt.subplots(1,2,figsize=(13,4.8),layout='constrained');curve_rows=[]
|
||||
for key in colors:
|
||||
a=np.asarray(curves[key]);lo,med,hi=np.quantile(a,[.1,.5,.9],axis=0);x=np.linspace(0,1,101)
|
||||
axs[0].plot(x,med,label=key,color=colors[key]);axs[0].fill_between(x,lo,hi,color=colors[key],alpha=.1)
|
||||
for j,xx in enumerate(x):curve_rows.append({'metric':key,'fraction_ranked_heads':xx,'p10':lo[j],'median':med[j],'p90':hi[j]})
|
||||
v=np.sort(np.asarray(pool[key]['effective_fraction']));axs[1].plot(v,np.arange(1,len(v)+1)/len(v),label=key,color=colors[key])
|
||||
axs[0].plot([0,1],[0,1],':',color='gray',label='Uniform');axs[0].set(title='Influence concentration curve',xlabel='Fraction of donor heads, largest first',ylabel='Cumulative normalized single-head effects')
|
||||
axs[1].set(title='Continuous effective-head fraction: empirical CDF',xlabel='N_eff / donor heads',ylabel='Fraction of observed cases')
|
||||
for ax in axs:ax.set(xlim=(0,1),ylim=(0,1.02));ax.legend();ax.grid(alpha=.2)
|
||||
fig.suptitle('Observation-wise ranking; dominant identities can differ; shaded p10–p90')
|
||||
csvwrite(root/'concentration-curve.csv',curve_rows);save(fig,'ranked_influence_distribution')
|
||||
fig,axs=plt.subplots(1,2,figsize=(14,4.8),layout='constrained')
|
||||
for label,color in zip(['weak_half','strong_half','random_half','all_heads'],['C0','C3','C1','gray']):
|
||||
for ax,key in zip(axs,['QKV','JS']):
|
||||
selected=[r for r in joint_rows if r['metric']==key and r['removed']==label]
|
||||
xs=sorted(set(r['recipient'] for r in selected));ys=[np.median(joint_by_layer[(key,label,x-1)]) for x in xs]
|
||||
ax.plot(xs,np.maximum(ys,1e-12),'o-',label=label,color=color,markersize=4)
|
||||
axs[0].set(title='Joint removal: balanced QKV relative effect',ylabel='Median token/head relative L2 score')
|
||||
axs[1].set(title='Full-attention recipients: retrieval change',ylabel='Median token/head JS divergence (nats)')
|
||||
for ax in axs:ax.set(xlabel='Recipient layer index',yscale='log');ax.legend();ax.grid(alpha=.2)
|
||||
fig.suptitle('Equal-count weak/strong/random removal; token-wise masks; log display floor 1e-12')
|
||||
save(fig,'joint_removal_effects')
|
||||
fig,axs=plt.subplots(1,2,figsize=(13,4.8),layout='constrained')
|
||||
for key,label,color in [('JS','JS divergence (squared scale)','C4'),('sqrtJS','sqrt(JS) distance','C5')]:
|
||||
a=np.asarray(curves[key]);lo,med,hi=np.quantile(a,[.1,.5,.9],axis=0);x=np.linspace(0,1,101)
|
||||
axs[0].plot(x,med,label=label,color=color);axs[0].fill_between(x,lo,hi,color=color,alpha=.12)
|
||||
for j,xx in enumerate(x):curve_rows.append({'metric':key,'fraction_ranked_heads':xx,'p10':lo[j],'median':med[j],'p90':hi[j]})
|
||||
v=np.sort(np.asarray(pool[key]['effective_fraction']));axs[1].plot(v,np.arange(1,len(v)+1)/len(v),label=label,color=color)
|
||||
axs[0].plot([0,1],[0,1],':',color='gray',label='Uniform');axs[0].set(title='Retrieval influence rank curve',xlabel='Fraction of donor heads, largest first',ylabel='Cumulative normalized intervention effects')
|
||||
axs[1].set(title='Sensitivity to divergence versus distance scale',xlabel='Effective donor-head fraction',ylabel='Fraction of observations')
|
||||
for ax in axs:ax.set(xlim=(0,1),ylim=(0,1.02));ax.legend();ax.grid(alpha=.2)
|
||||
fig.suptitle('Full-attention recipients; sqrt(JS) is post-summary scale sensitivity, not a new model run')
|
||||
csvwrite(root/'concentration-curve.csv',curve_rows);save(fig,'retrieval_scale_sensitivity')
|
||||
lines=['# 上游注意力头对下一层 Q/K/V 的影响集中度','', '实测全部23个相邻层连接、4条既有中英文文本各32 token。主统计取query7–31,按文本/token/接收query头分别计算,再汇总。不是独立样本的显著性检验。','', '影响是移除上游一个头后,下一层Q/K/V向量的相对L2变化;重新计算中间MLP/残差/归一化。各头影响归一化仅构成消融影响分布,不是天然可相加的贡献概率。','', '| 对象 | 有效头比例中位数 [P10,P90] | 最大头份额中位数 | 前25%头份额中位数 | 最小25%头份额中位数 | 90%影响所需头数中位数 |','|---|---:|---:|---:|---:|---:|']
|
||||
for k in ('Q','K','V','QKV','JS','sqrtJS'):
|
||||
if k not in pooled:continue
|
||||
z=pooled[k];a=z['effective_fraction'];lines.append(f"| {k} | {a['median']:.3f} [{a['p10']:.3f},{a['p90']:.3f}] | {z['top1']['median']:.1%} | {z['top25']['median']:.1%} | {z['bottom25']['median']:.1%} | {z['heads90']['median']:.1f} |")
|
||||
lines+=['','sqrtJS为JS距离尺度敏感性分析:在初次完整汇总后增加,原始消融和原JS主结果不变。JS散度近似平方尺度,归一化后会放大强弱差距;JS影响份额不是注意力概率质量份额。','', '按接收层类型分层(避免总体分布混合不同机制):','', '| 接收层类型 | Q有效头比例中位数 | K | V | QKV |','|---|---:|---:|---:|---:|']
|
||||
for label in ('linear_attention','full_attention'):
|
||||
lines.append('| '+label+' | '+' | '.join(format(by_type[k][label]['effective_fraction']['median'],'.3f') for k in ('Q','K','V','QKV'))+' |')
|
||||
lines+=['','QKV是三个相对变化平方的均值再开根号,避免混加不同Q/K/V尺度;JS仅普通注意力接收层有。普通注意力GQA的K/V复制到query头索引用于配对,不是额外独立KV头。','', '| 联合移除 | QKV相对影响中位数 [P10,P90] | 检索JS中位数 [P10,P90] |','|---|---:|---:|']
|
||||
for label in ('weak_half','strong_half','random_half','all_heads'):
|
||||
a=joint_stats['QKV'][label];b=joint_stats['JS'][label];lines.append(f"| {label} | {a['median']:.5f} [{a['p10']:.5f},{a['p90']:.5f}] | {b['median']:.6f} [{b['p10']:.6f},{b['p90']:.6f}] |")
|
||||
lines+=['', '配对观测:QKV弱半数的实际联合影响小于强半数的比例为'+format(paired['QKV']['weak_less_than_strong_fraction'],'.1%')+';强/弱影响比中位数为'+format(paired['QKV']['strong_over_weak']['median'],'.3f')+'。这是逐观测比值的中位数,不是两个总体中位数之比。弱效应为零的观测另计,不做除法。', '', '联合实验的弱/强/随机半数头,在各token、各接收头上分别选择,形成完整序列再重算。排名依据单头QKV影响,同样用于JS;它是输入自适应诊断,不是免费可用的剪枝策略。线性注意力的卷积和普通注意力的QK可能传播跨token影响。所有上游头移除仍保留残差背景,不能把它称为删除全部上游信息。', '', '连续指标:N_eff=1/Σp²;有效头比例=N_eff/H;C=(Σp²−1/H)/(1−1/H)。全零总影响时集中度未定义,原始数组保留NaN并在统计时排除、另计数量。单头相对L2影响在做头间占比归一化之前的总和及最大值均保留,避免把微小效应中的集中误认作重要。字段max_absolute指最大无符号相对效应,并非隐藏坐标中的未归一化L2;total是单头效应之和,真正全头联合效果另测。', '', '联合实验中保存的单头影响之和仅为按query掩码加权的参考。单头消融移除整段序列的一个头,联合掩码则可跨位置变化;二者的差不能单独解释成纯非线性交互,因为时间支持也不同。应直接比较实际弱/强/随机联合效果。', '', '## 文件与限制','', '`raw/*.npz`保留每次单头影响、联合影响、相应单头影响之和、删除掩码及空操作对照;`observations.npz`保留逐观测连续指标及索引;CSV和JSON为全部图表源表。原模型权重和大基线缓存继续保留在服务器。','', '只测短文本上的局部下一层作用;不代表全LM质量、可直接删头、所有输入普遍集中,或相似头可互相替代。所有头贡献可能是广泛分布的;报告不以发现稀疏为成功条件。','',f"CPU测量耗时{status['elapsed_seconds']:.1f}秒,峰值RSS{status['peak_rss_kib']/1024:.1f} MiB;无训练、GPU或清理。"]
|
||||
(root/'REPORT.md').write_text('\n'.join(lines)+'\n')
|
||||
print((root/'REPORT.md').read_text())
|
||||
if __name__=='__main__':
|
||||
import sys
|
||||
main(sys.argv[1])
|
||||
@@ -0,0 +1,84 @@
|
||||
"""All adjacent layers, input-dependent influence distributions; CPU only."""
|
||||
import argparse,json,time,resource,hashlib,traceback
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from tokenizers import Tokenizer
|
||||
from functional.model import StreamingLM
|
||||
from .core import InfluenceLM,concentration,masks_from_influences,js_rows
|
||||
|
||||
|
||||
def dump(path,data):path.write_text(json.dumps(data,indent=2,allow_nan=False)+'\n')
|
||||
|
||||
|
||||
def distances(base,changed):
|
||||
out={}
|
||||
for key in ('Q','K','V'):
|
||||
a=base[key].astype(np.float64);b=changed[key].astype(np.float64)
|
||||
out[key]=np.linalg.norm(b-a,axis=-1)/np.maximum(np.linalg.norm(a,axis=-1),1e-12)
|
||||
out['QKV']=np.sqrt(sum(out[k]**2 for k in ('Q','K','V'))/3)
|
||||
if 'P' in base:out['JS']=js_rows(base['P'],changed['P']).transpose(0,2,1)
|
||||
return out
|
||||
|
||||
|
||||
def link(lm,cache,layer,path,seed):
|
||||
started=time.monotonic();base=lm.recipient(cache['next_raw'],layer+1);hs=cache['heads'].shape[2];t=cache['raw'].shape[1];hr=base['Q'].shape[2]
|
||||
# Whole donor head across the full sequence is the single-ablation intervention.
|
||||
singles={k:[] for k in ('Q','K','V','QKV')+ (('JS',) if 'P' in base else ())}
|
||||
for start in range(0,hs,4):
|
||||
index=list(range(start,min(start+4,hs)));masks=np.zeros((len(index),t,hs),dtype=np.float32)
|
||||
for n,h in enumerate(index):masks[n,:,h]=1
|
||||
scores=distances(base,lm.intervene(cache,layer,masks))
|
||||
for k,v in scores.items():singles[k].extend(v)
|
||||
singles={k:np.asarray(v,dtype=np.float32) for k,v in singles.items()}
|
||||
# Identical cardinality weak/strong/random removals, ranking by balanced QKV influence.
|
||||
# One coherent full-sequence mask per recipient head; only that head's output scored.
|
||||
rank=singles['QKV'];rng=np.random.default_rng(seed)
|
||||
weak=masks_from_influences(rank,True);strong=masks_from_influences(rank,False)
|
||||
random=np.zeros_like(weak)
|
||||
for r in range(hr):
|
||||
for q in range(t):random[r,q,rng.choice(hs,hs//2,replace=False)]=1
|
||||
joint={};sum_individual={}
|
||||
for label,masks in [('weak_half',weak),('strong_half',strong),('random_half',random),('all_heads',np.ones_like(weak))]:
|
||||
values={k:[] for k in singles}
|
||||
for start in range(0,hr,4):
|
||||
stop=min(start+4,hr);scores=distances(base,lm.intervene(cache,layer,masks[start:stop]))
|
||||
for k,v in scores.items():
|
||||
for n,r in enumerate(range(start,stop)):values[k].append(v[n,:,r])
|
||||
for k,v in values.items():
|
||||
joint[label+'_'+k]=np.asarray(v,dtype=np.float32).T
|
||||
sum_individual[label+'_'+k]=np.sum(singles[k].transpose(2,1,0)*masks,axis=-1).T
|
||||
null=distances(base,lm.intervene(cache,layer,np.zeros((1,t,hs),dtype=np.float32)))
|
||||
if max(float(np.max(v)) for v in null.values())>2e-5:raise AssertionError('Null intervention changed recipient')
|
||||
payload={'single_'+k:v for k,v in singles.items()};payload.update({'joint_'+k:v for k,v in joint.items()});payload.update({'individual_sum_'+k:v for k,v in sum_individual.items()})
|
||||
payload.update({'mask_weak_half':weak,'mask_strong_half':strong,'mask_random_half':random})
|
||||
payload.update({'null_'+k:v for k,v in null.items()})
|
||||
np.savez_compressed(path,**payload)
|
||||
return {'source':layer,'recipient':layer+1,'source_heads':hs,'recipient_query_heads':hr,'full_attention_recipient':'P' in base,'elapsed_seconds':time.monotonic()-started,'null_max':max(float(np.max(v)) for v in null.values())}
|
||||
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--source',type=Path,required=True);p.add_argument('--out',type=Path,required=True);p.add_argument('--seconds',type=int,default=7200);a=p.parse_args()
|
||||
a.out.mkdir(parents=True,exist_ok=False);(a.out/'cache').mkdir();(a.out/'raw').mkdir();started=time.monotonic()
|
||||
protocol={'scope':'all 23 adjacent layer transitions; source attention head contribution to next effective Q/K/V','samples':'4 previously authored zh/en texts, first32 tokens, descriptive','primary_queries':list(range(7,32)), 'influence':'L2 change / baseline token recipient-head L2; QKV score sqrt(mean of three squared relative changes))','linear_QK':'after causal convolution/SiLU and delta-rule L2 normalization; Q additionally divided by sqrt(key dim)','full_QK':'QK norm and partial RoPE applied; K/V repeated to query heads for indexing (not independent KV observations)','single_ablation':'remove complete source head projected output at all tokens; recompute source postattention normalization, MLP, residual and next input normalization','joint_ablation':'weak/strong/random half and all attention heads; one coherent token-varying removal mask for each recipient query head; ranking uses QKV single effects; no fitting','continuous':'effective heads=1/sum(p^2); fraction=effective/H; concentration=(sum(p^2)-1/H)/(1-1/H)','zero_total':'undefined concentration (NaN arrays), count explicitly','cost_budget_seconds':a.seconds,'no_training':True,'keep_all_weights_and_caches':True,'limitations':['not final LM quality or pruning proof','individual effects not additive; normalized scores not true contribution probabilities','token-varying masks are input-specific diagnostic and not a deployable fixed head subset','linear attention does not have an ordinary softmax probability matrix','Q/K/V scales handled separately; combined QKV is a declared balanced relative-effect score']}
|
||||
dump(a.out/'protocol.json',protocol);status={'state':'running','completed_links':[]};dump(a.out/'status.json',status)
|
||||
try:
|
||||
lm=InfluenceLM(a.source/'weights',json.loads((a.source/'model_config.json').read_text()),seconds=a.seconds)
|
||||
samples=json.loads(Path('crossqkv/fresh_samples.json').read_text())['samples'];tok=Tokenizer.from_file(str(a.source/'tokenizer.json'));controls=[]
|
||||
for si,s in enumerate(samples):
|
||||
lm.guard();s['token_ids']=tok.encode(s['text']).ids[:32];ids=np.array([s['token_ids']],dtype=np.int64);cache=a.out/'cache'/s['id'];cache.mkdir()
|
||||
final=lm.baseline(ids,cache);np.save(cache/'final.npy',final)
|
||||
for x in lm.head_sum_errors:controls.append({'sample':s['id'],**x})
|
||||
if si==0:
|
||||
reference,_=StreamingLM.forward(lm,ids);normalized=lm.normalization(final,'norm');err=float(np.linalg.norm(normalized-reference)/max(np.linalg.norm(reference),1e-30));assert err<2e-5;status['canonical_forward_relative_error']=err
|
||||
dump(a.out/'head-sum-controls.json',controls);dump(a.out/'samples.json',samples)
|
||||
for layer in range(23):
|
||||
target=a.out/'raw'/f'{s["id"]}-link-{layer:02d}.npz'
|
||||
with np.load(cache/f'layer-{layer}.npz') as data:loaded={k:data[k] for k in data.files}
|
||||
info=link(lm,loaded,layer,target,31000+si*100+layer)
|
||||
del loaded
|
||||
status['completed_links'].append({'sample':s['id'],**info});status['elapsed_seconds']=time.monotonic()-started;dump(a.out/'status.json',status)
|
||||
print('completed',s['id'],layer,'seconds',round(info['elapsed_seconds'],2),flush=True)
|
||||
status.update(state='completed',elapsed_seconds=time.monotonic()-started,peak_rss_kib=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss);dump(a.out/'status.json',status)
|
||||
except BaseException as e:
|
||||
status.update(state='failed',error=repr(e),elapsed_seconds=time.monotonic()-started);dump(a.out/'status.json',status);raise
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,42 @@
|
||||
# Paired task-finetuning comparison (registered before reading finetuned effects)
|
||||
|
||||
Primary checkpoint: Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo,
|
||||
HF revision038d8be9bd0edd3883fa019651b02bdf65609468, pure lora/seed0,
|
||||
step150 after shared40-step warmup. GSM8K GRPO, not SFT. Selected by smallest
|
||||
seed index before observing concentration, not by benchmark score or our metric.
|
||||
No gate01/gate02 arm or architecture changes. Exact base revision matches retained
|
||||
Qwen/Qwen3.5-2B15852e8c16360a2fea060d615a32b45270f8a8fc.
|
||||
|
||||
Download existing18.9MB F32 LoRA tensors, verify official file SHA. All144 tensors
|
||||
must form72 A/B pairs on the4 declared GDN projections of18 linear-attention
|
||||
layers, rank16 alpha32. Apply FP32 effective W +2BA in streamed row chunks, also
|
||||
when decomposing source output heads. Do not quantize merged weights, mutate or
|
||||
save over base weights, execute foreign .pt files, train or use GPU. Validate
|
||||
against separate base-output +2B(Ax) forward and check head sums/null masks.
|
||||
|
||||
Primary comparison exactly matches the reported8.931822/16 statistic: all six
|
||||
ordinary attention receivers3/7/11/15/19/23, previous-layer16 donor output heads,
|
||||
all32 tokens computed, query7..31, original4 plain-text inputs and same token IDs.
|
||||
Reuse corresponding immutable base single-ablation arrays, recompute FT baselines
|
||||
and all16 single donor removals, source MLP/residual/recipient normalization exact.
|
||||
Use the same sqrt(JS) distance influence, normalized shares and N_eff=1/sum(p²).
|
||||
Preserve JS divergence as a sensitivity row; no change of ranking or threshold.
|
||||
All4800 per-token/query-head observations are paired. No new joint-mask search:
|
||||
the requested statistic depends on single removals, not the previous joint tests.
|
||||
|
||||
Secondary task-conditioned comparison: first4 original GSM8K test questions with
|
||||
at least32 base-tokenizer tokens (length selection only, before model effects),
|
||||
question-only plain text, first32 tokens. Freeze original author repository commit,
|
||||
JSONL SHA, item indices, question hashes and exact token IDs. No answers, generation,
|
||||
chat-template change or accuracy claim. Compute both base and FT on these same
|
||||
questions; never compare old general-text base to new GSM8K FT as if paired.
|
||||
|
||||
Report overall median/P10/P90, paired differences, per receiver layer and per text,
|
||||
strong/weak-quartile shares, and dominant donor identity agreement. No iid-token
|
||||
p-values, no claim over training seeds (one fixed trained seed), no proof of
|
||||
GSM8K accuracy improvement or long-context behavior. Positive, negative and near
|
||||
zero changes all count as results. Source cohort remains4+4 short texts.
|
||||
|
||||
All model work/tests/plots on authorized CPU server8.211.154.134, bounded7200s.
|
||||
Preserve all base/FT weights, adapters and caches; no automatic cleanup. Save raw
|
||||
arrays, source provenance, SHA manifests, fixed chart gallery and reviewable PR.
|
||||
@@ -0,0 +1,61 @@
|
||||
# Existing GSM8K fine-tune: paired head-concentration comparison
|
||||
|
||||
First restore the original charts through [the fixed figure gallery](../docs/FIGURE_GALLERY.md).
|
||||
The original 8.931822/16, P10=5.784081 and P90=11.672658 refer to sqrt(JS)
|
||||
influences of all16 prior-layer heads on the six full-attention receivers.
|
||||
|
||||
Selected release: [Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo](https://huggingface.co/Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo),
|
||||
pinned038d8be9bd0edd3883fa019651b02bdf65609468, pure lora/seed0. The publisher
|
||||
records GSM8K GRPO from a shared warmup, rank16 alpha32, exact same original
|
||||
Qwen3.5-2B revision. This is extra RL fine-tuning of the post-trained release,
|
||||
not pretraining-to-SFT, and not a beta-gate architecture modification. Our seed
|
||||
choice is fixed before seeing effects; no new training is performed.
|
||||
|
||||
`lora.py` validates all144 tensors/72 pairs, maps only declared GDN projections,
|
||||
and provides read-only FP32 effective row chunks W+2BA. Source head decomposition
|
||||
uses the same effective weights. `ExplicitLoRA` adds2B(Ax) independently to the
|
||||
base projection as a numerical reference. No BF16 re-rounding is introduced:
|
||||
the author's training code also warns that rounding merged increments can erase
|
||||
small LoRA changes. Author configuration commit/SHA and public HF metadata are
|
||||
saved alongside the protocol; foreign training code and pickle checkpoints are
|
||||
not executed.
|
||||
|
||||
`run.py` reuses the exact original single-ablation arrays for the original cohort,
|
||||
then computes matched finetuned states; it computes both models on4 question-only
|
||||
GSM8K test prefixes as a separate cohort. Every input has32 tokens. All16 donor
|
||||
heads, six receiver layers andquery7..31 remain identical to the original metric.
|
||||
The task corpus is the canonical author's test JSONL at a fixed Git commit, and
|
||||
selection uses only the first4 items with at least32 tokenizer tokens. All item
|
||||
indices, question hashes and token IDs are recorded; answers are not model inputs.
|
||||
|
||||
`report.py` generates paired CDFs, per-layer medians/quantiles, paired change
|
||||
histograms, raw observations and tables. `audit.py` independently reconstructs
|
||||
effective-head counts via(sum d)^2/sum(d^2), checks pairing, exact old baselines,
|
||||
head sums, null masks, adapter/dataset/base SHA and retained external caches.
|
||||
`tests/test_finetune_compare.py` checks streamed row arithmetic, an independent
|
||||
low-rank forward and head decomposition, plus exact zero-scale restoration.
|
||||
|
||||
No iid-token p-values, training-seed generalization, GSM8K accuracy result,
|
||||
long-context claim, pruning recommendation or functional-duplicate claim.
|
||||
The paired delta median is distinguished from the difference of pooled medians.
|
||||
All weights, adapters and caches remain on the authorized CPU server until user
|
||||
explicit deletion. Git stores all raw influence arrays, not the model/adapter.
|
||||
|
||||
Remote workflow on8.211.154.134:
|
||||
```
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m unittest tests.test_finetune_compare -v
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -B -m finetune_compare.run --source runs/cpu-qwen35-2b --parent runs/head-dominance --assets runs/finetune-head-comparison --out runs/finetune-head-comparison/NEW_EXPERIMENT
|
||||
venv/bin/python -B -m finetune_compare.report runs/finetune-head-comparison/NEW_EXPERIMENT
|
||||
venv/bin/python -B -m finetune_compare.audit runs/finetune-head-comparison/NEW_EXPERIMENT runs/head-dominance runs/finetune-head-comparison runs/cpu-qwen35-2b
|
||||
```
|
||||
|
||||
The supplemental QKV field is measured only on the same six full-attention
|
||||
receivers, so its baseline must not be confused with the older76.0% pooled
|
||||
QKV effective-head fraction across all23 adjacent transitions. The gallery
|
||||
preserves that original table separately; the requested8.931822 metric uses
|
||||
exactly the matching six receivers in both studies.
|
||||
|
||||
The audit also records all72 low-rank update Frobenius norms (via small Gram
|
||||
matrices) and final pre-normalization residual changes per text. These separate
|
||||
a stable concentration statistic from an accidentally inactive adapter. Residual
|
||||
changes are not logit distributions, accuracy differences or capability scores.
|
||||
@@ -0,0 +1,74 @@
|
||||
"""Independent paired effective-head, source, preservation and delivery checks."""
|
||||
import json,hashlib,sys
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
|
||||
def sha(path):
|
||||
with Path(path).open('rb') as f:return hashlib.file_digest(f,'sha256').hexdigest()
|
||||
def main(root,parent,assets,source):
|
||||
root,parent,assets,source=map(Path,[root,parent,assets,source]);status=json.loads((root/'status.json').read_text());assert status['state']=='completed' and len(status['links'])==96
|
||||
samples=json.loads((root/'samples.json').read_text());assert set(samples)=={'legacy','gsm8k'} and all(len(v)==4 for v in samples.values());assert all(len(s['token_ids'])==32 for ss in samples.values() for s in ss)
|
||||
assert status['explicit_lora_forward_relative_error']<1e-4;rawstats={};expected=set();obs=dict(np.load(root/'observations.npz'));summary=json.loads((root/'summary.json').read_text())
|
||||
def check(x,record):
|
||||
x=np.asarray(x,dtype=np.float64);x=x[np.isfinite(x)];assert record['count']==len(x)
|
||||
for name,value in zip(('p10','median','p90','mean'),[*np.quantile(x,[.1,.5,.9]),x.mean()]):np.testing.assert_allclose(record[name],value,atol=1e-8,rtol=1e-6)
|
||||
for cohort,ss in samples.items():
|
||||
for role in ('base','finetuned'):
|
||||
for sample in ss:
|
||||
for layer in (2,6,10,14,18,22):
|
||||
name=f'{cohort}-{role}-{sample["id"]}-{layer:02d}.npz';expected.add(name);d=dict(np.load(root/'raw'/name))
|
||||
for key in ('Q','K','V','QKV','JS'):
|
||||
assert d['single_'+key].shape==(16,32,8) and np.isfinite(d['single_'+key]).all() and np.min(d['single_'+key])>=0
|
||||
assert np.max(d['null_'+key])<2e-5
|
||||
if cohort=='legacy' and role=='base':
|
||||
with np.load(parent/'raw'/f'{sample["id"]}-link-{layer:02d}.npz') as original:
|
||||
for key in d:np.testing.assert_array_equal(d[key],original[key])
|
||||
for metric,impacts in [('distance',np.sqrt(d['single_JS'])),('divergence',d['single_JS']),('QKV',d['single_QKV'])]:
|
||||
x=impacts[:,7:,:].transpose(1,2,0).astype(np.float64);total=x.sum(-1);den=np.sum(x*x,-1);assert np.all(den>0)
|
||||
neff=total*total/den
|
||||
rawstats.setdefault((cohort,role,metric),[]).append(neff.ravel())
|
||||
assert expected=={f.name for f in (root/'raw').glob('*.npz')}
|
||||
for cohort in samples:
|
||||
for metric in ('distance','divergence','QKV'):
|
||||
for role in ('base','finetuned'):
|
||||
x=np.concatenate(rawstats[(cohort,role,metric)]);assert len(x)==4800
|
||||
np.testing.assert_allclose(obs['__'.join((cohort,role,metric,'effective_heads'))],x,rtol=1e-8,atol=1e-8)
|
||||
check(x,summary[cohort][metric][role]['effective_heads'])
|
||||
before=np.concatenate(rawstats[(cohort,'base',metric)]);after=np.concatenate(rawstats[(cohort,'finetuned',metric)]);check(after-before,summary[cohort][metric]['paired']['effective_heads_delta'])
|
||||
base=summary['legacy']['distance']['base']['effective_heads'];np.testing.assert_allclose([base[x] for x in ('median','p10','p90')],[8.93182211792415,5.7840811612328125,11.67265834734814],rtol=1e-10)
|
||||
controls=json.loads((root/'head-sum-controls.json').read_text());assert len(controls)==288 and all(c['relative_l2']<2e-5 for c in controls)
|
||||
refs=json.loads((root/'baseline-references.json').read_text());assert len(refs)==24 and all(sha(v['source'])==v['sha256'] for v in refs)
|
||||
assert sha(assets/'adapter.safetensors')=='93a3f43a4356f84da0d13ecc622fee13e41ba15d237cdaad6094f243899c62d6'
|
||||
dataset=json.loads((root/'gsm8k-source.json').read_text());assert sha(assets/'gsm8k-test.jsonl')==dataset['sha256']
|
||||
oldweights=list((source/'weights').glob('*.safetensors'));assert len(oldweights)==1
|
||||
base_sha=sha(oldweights[0]);assert base_sha=='aa33250c4fc64891ddfaba3a314fd9542ea371843c387178b425fbcc5ed680b1'
|
||||
from pilot.tensors import load_tensors
|
||||
import re
|
||||
tensors=load_tensors(assets);pairs={}
|
||||
for name,t in tensors.items():
|
||||
stem,which=name.split('.lora_');pairs.setdefault(stem,{})[which[0]]=t.read().reshape(t.shape).copy();t.evict()
|
||||
updates=[]
|
||||
for name,pair in pairs.items():
|
||||
a=pair['A'].astype(np.float64);b=pair['B'].astype(np.float64)
|
||||
norm2=4*float(np.sum((b.T@b)*(a@a.T).T))
|
||||
updates.append({'module':name,'delta_frobenius':float(np.sqrt(max(norm2,0))),'A_nonzero':int(np.count_nonzero(a)),'B_nonzero':int(np.count_nonzero(b))})
|
||||
assert len(updates)==72 and any(x['delta_frobenius']>0 for x in updates)
|
||||
(root/'weight-update-summary.json').write_text(json.dumps({'scale':2,'modules':updates,'nonzero_update_modules':sum(x['delta_frobenius']>0 for x in updates),'norm_identity':'||2BA||_F^2 = 4 trace((B^T B)(A A^T))'},indent=2)+'\n')
|
||||
changes=[]
|
||||
for cohort,ss in samples.items():
|
||||
for sample in ss:
|
||||
basefile=parent/'cache'/sample['id']/'final.npy' if cohort=='legacy' else root/'cache'/f"{cohort}-base-{sample['id']}"/'final.npy'
|
||||
ftfile=root/'cache'/f"{cohort}-finetuned-{sample['id']}"/'final.npy'
|
||||
before=np.load(basefile).astype(np.float64);after=np.load(ftfile).astype(np.float64)
|
||||
changes.append({'cohort':cohort,'sample':sample['id'],'final_pre_norm_residual_relative_l2':float(np.linalg.norm(after-before)/np.linalg.norm(before))})
|
||||
assert any(x['final_pre_norm_residual_relative_l2']>0 for x in changes)
|
||||
(root/'hidden-state-changes.json').write_text(json.dumps({'definition':'final residual before final RMSNorm, not logits, accuracy or LM quality','changes':changes},indent=2)+'\n')
|
||||
caches=[{'path':str(p.resolve()),'bytes':p.stat().st_size,'sha256':sha(p)} for p in sorted((root/'cache').rglob('*')) if p.is_file()]
|
||||
assert len(caches)==300
|
||||
(root/'external-caches.json').write_text(json.dumps({'host':'8.211.154.134','base_weights':str(oldweights[0].resolve()),'base_sha256':base_sha,'adapter_path':str((assets/'adapter.safetensors').resolve()),'adapter_sha256':sha(assets/'adapter.safetensors'),'caches':caches,'automatic_deletion':False},indent=2)+'\n')
|
||||
files=list(Path('finetune_compare').glob('*.py'))+[Path('finetune_compare/PROTOCOL.md'),Path('tests/test_finetune_compare.py'),Path('dominance/core.py'),Path('dominance/run.py'),Path('functional/model.py')]
|
||||
(root/'source-hashes.json').write_text(json.dumps({str(f):sha(f) for f in files},indent=2)+'\n')
|
||||
proof={'passed':True,'links':96,'paired_observations_per_cohort_metric':4800,'legacy_baseline_exact':True,'effective_head_formula_independently_recomputed':True,'head_sum_checks':288,'explicit_lora_forward_relative_error':status['explicit_lora_forward_relative_error'],'adapter_sha_verified':True,'base_sha_verified':True,'dataset_sha_verified':True,'retained_cache_files':len(caches),'nonzero_update_modules':sum(x['delta_frobenius']>0 for x in updates),'nonzero_hidden_state_changes_verified':True}
|
||||
(root/'audit.json').write_text(json.dumps(proof,indent=2)+'\n');print(json.dumps(proof,indent=2),flush=True)
|
||||
included=[p for p in root.rglob('*') if p.is_file() and 'cache' not in p.relative_to(root).parts and p.name!='checksums.json'];(root/'checksums.json').write_text(json.dumps({str(p.relative_to(root)):sha(p) for p in sorted(included)},indent=2)+'\n')
|
||||
if __name__=='__main__':main(*sys.argv[1:])
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"source_repository": "https://github.com/avifenesh/gdn-beta-gate",
|
||||
"source_revision": "f12f61f24ebe5997aac58667f413dcd1dcd96f54",
|
||||
"lora_configuration_path": "src/gdn_gate/broad/arms.py",
|
||||
"lora_configuration_sha256": "fc5b8de096eaa259ab166b8083bb774f9e14859d566ce82ea15986cc8d6eb5b5",
|
||||
"verified_fields": [
|
||||
"LoraConfig r=rank",
|
||||
"lora_alpha=2*rank",
|
||||
"use_rslora not enabled"
|
||||
],
|
||||
"effective_scale": 2
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
93a3f43a4356f84da0d13ecc622fee13e41ba15d237cdaad6094f243899c62d6 lora/seed0/adapter.safetensors
|
||||
b8d4737a5b940bcdfed72258600227a89f883dc863e9724bf84e457b46a53703 lora/seed0/adapter_meta.json
|
||||
63d54e1c2f6bf7d07ca0f6e83a3299bd4b6d00740919bc7cae0b422af05a828e lora/seed1/adapter.safetensors
|
||||
f8be6c4218876b7b12a47945cafe18fcc27d59ff06447db6d3e5b21f0bb9fc29 lora/seed1/adapter_meta.json
|
||||
702b764e2c39b3529914dac1547148ef2f462d9ee04e256201e79f00b20ccc62 lora/seed2/adapter.safetensors
|
||||
9acee331b9383f49a81cfc057163e034f06ea1ba4b8167fea441f0fbfd490f94 lora/seed2/adapter_meta.json
|
||||
7dbf35899fe1186453e599ad8c7a85c56b7fad3d630e371ca026a1e95da2c5a7 lora/seed3/adapter.safetensors
|
||||
b5bfbefa8ce6b428feea761c39a148f003bf02396ca6e01b68abfba2ab3f71af lora/seed3/adapter_meta.json
|
||||
a5cb1e7fa74dff467bd7f163e1db23d30ef8b1a1c935cfa55dcc8cd1b39082a7 lora/seed4/adapter.safetensors
|
||||
23a6c3f198978e79014361a326af20ec364ea266cf9b5e9ced4c9da06feab30e lora/seed4/adapter_meta.json
|
||||
d513d499dfd409da88b3db7da025ba9872fb48ec92d6b29bc2ce7a092a69745d lora/seed5/adapter.safetensors
|
||||
9384d0b4ce4cec6b3dc15756fb4d46c5625a4dacd3805af728fc37b89627d0ed lora/seed5/adapter_meta.json
|
||||
fda9b4c15d283ef8ee778c4416d69b12e1922527ea330bfc67bab5cde1b6741a gate01/seed0/adapter.safetensors
|
||||
131e60bc768412f4d344e5b17cbc811f35d149aad0c328bc6503646513bbd8fc gate01/seed0/adapter_meta.json
|
||||
6ada79d07414641bed58d74fd23090937abcf52337e75e8f06483d502fa64c57 gate01/seed1/adapter.safetensors
|
||||
0350240ed838a93a26f406ef0d63f29ced21ea2284c9430d07aefccd30f8d924 gate01/seed1/adapter_meta.json
|
||||
a9359e3f3be68468604f9bf93f20f4b65114084f3fc6a3c13363e7062c4cf547 gate01/seed2/adapter.safetensors
|
||||
17fa2e876770ec636f8a0a0eb0b3f7b58c91a5f6f9910c09c38c593d856b035f gate01/seed2/adapter_meta.json
|
||||
a2d0c27fee0263c9a8152e0849975edefedc9d10061bbf789a3ead223db8703c gate01/seed3/adapter.safetensors
|
||||
4da32ea52fe6e7c2a0a8858e4d3255540fcc7adf18a7ab2ce9fd3164e4bb0a05 gate01/seed3/adapter_meta.json
|
||||
810b8f8d6147af3620cf08d2cf575c0eb2b0134ae0253a93ceeae5be9dca8695 gate01/seed4/adapter.safetensors
|
||||
f943fc6874af4e4b24763ee6e0cf6e737bc62720045190441d0b33dd561a439f gate01/seed4/adapter_meta.json
|
||||
b34e8d999612415c7395f341633ff3d2365a020b9e27b7e371c5f80f0105a486 gate01/seed5/adapter.safetensors
|
||||
98983ecbf303bf1b10e11c816f850db13af8a0ca5ff2e4efd121f7fd70262918 gate01/seed5/adapter_meta.json
|
||||
1fc5a4a4392c35820c26e24d0075824b3426c4a77f3119713b4a1e577d31df5b gate02/seed0/adapter.safetensors
|
||||
0a17ea0542fb52751d0e628985f8d07240a3ccc4b44a7e2c970e7029c00f6c3f gate02/seed0/adapter_meta.json
|
||||
b742f4ffed0e293f27e4646c364a85ae359a3eae1690d3840e531dca7fba9cd8 gate02/seed1/adapter.safetensors
|
||||
4b6c7bf77edf3049ca904863d59d4d3bfdbe1d0b1b3f563b7fd3bea7f179f97c gate02/seed1/adapter_meta.json
|
||||
dc36c27a98379535007f2df798953624b6a67f0677bd41dec42349f8ce868afa gate02/seed2/adapter.safetensors
|
||||
20009502b1bd6aa9c67b509b77eac0aa0d367af7f347caf4d05c7a51367b8f61 gate02/seed2/adapter_meta.json
|
||||
1dcb6132afeec8101daf9a3fd73d42141fb871bff11fff28069f238dcff6afd0 gate02/seed3/adapter.safetensors
|
||||
518289370e0eb9fc064c3226c2b3811f94cec180a9ae366a026f30cf1d3a3131 gate02/seed3/adapter_meta.json
|
||||
5b97b0601585925c19bf849ecb11ad68597d1b0d55551b917ec0f5091f85c2ff gate02/seed4/adapter.safetensors
|
||||
8419e8e22aa583f97e570950baf37e7c6370856b7cacefaf9c5ebeb0ea4f731c gate02/seed4/adapter_meta.json
|
||||
3f944a6d210958de5840e5b76e263f2105b9f49d15b9ab505950c2b29a5343af gate02/seed5/adapter.safetensors
|
||||
94d9c1e202f7962da61fa060d27941bbef7ff3d23ca5548f5d73fb6f5ac39aac gate02/seed5/adapter_meta.json
|
||||
9108bce2acfcc3ccd38d0dfae67ac33253b95bdc94133bd25deb4daa45d41700 warmup/seed0/adapter.safetensors
|
||||
d2d4346179104830410be9d2776d79983481503daeb5c8383e2a062de43714ef warmup/seed0/adapter_meta.json
|
||||
@@ -0,0 +1,379 @@
|
||||
{
|
||||
"_id": "6accb5a881b0c228f413b5e5",
|
||||
"id": "Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo",
|
||||
"private": false,
|
||||
"pipeline_tag": "text-generation",
|
||||
"library_name": "pytorch",
|
||||
"tags": [
|
||||
"pytorch",
|
||||
"lora",
|
||||
"gated-deltanet",
|
||||
"qwen3.5",
|
||||
"beta-gate",
|
||||
"grpo",
|
||||
"reasoning",
|
||||
"math",
|
||||
"safetensors",
|
||||
"research",
|
||||
"text-generation",
|
||||
"en",
|
||||
"dataset:openai/gsm8k",
|
||||
"base_model:Qwen/Qwen3.5-2B",
|
||||
"base_model:adapter:Qwen/Qwen3.5-2B",
|
||||
"license:apache-2.0",
|
||||
"region:us"
|
||||
],
|
||||
"downloads": 0,
|
||||
"likes": 2,
|
||||
"modelId": "Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo",
|
||||
"author": "Avifenesh",
|
||||
"sha": "038d8be9bd0edd3883fa019651b02bdf65609468",
|
||||
"lastModified": "2026-11-09T19:45:55.000Z",
|
||||
"gated": false,
|
||||
"disabled": false,
|
||||
"widgetData": [
|
||||
{
|
||||
"text": "Hi, what can you help me with?"
|
||||
},
|
||||
{
|
||||
"text": "What is 84 * 3 / 2?"
|
||||
},
|
||||
{
|
||||
"text": "Tell me an interesting fact about the universe!"
|
||||
},
|
||||
{
|
||||
"text": "Explain quantum computing in simple terms."
|
||||
}
|
||||
],
|
||||
"model-index": null,
|
||||
"config": {},
|
||||
"cardData": {
|
||||
"license": "apache-2.0",
|
||||
"base_model": "Qwen/Qwen3.5-2B",
|
||||
"base_model_relation": "adapter",
|
||||
"library_name": "pytorch",
|
||||
"pipeline_tag": "text-generation",
|
||||
"language": [
|
||||
"en"
|
||||
],
|
||||
"datasets": [
|
||||
"openai/gsm8k"
|
||||
],
|
||||
"tags": [
|
||||
"lora",
|
||||
"gated-deltanet",
|
||||
"qwen3.5",
|
||||
"beta-gate",
|
||||
"grpo",
|
||||
"reasoning",
|
||||
"math",
|
||||
"safetensors",
|
||||
"research"
|
||||
]
|
||||
},
|
||||
"siblings": [
|
||||
{
|
||||
"rfilename": ".gitattributes",
|
||||
"blobId": "a6344aac8c09253b3b630fb776ae94478aa0275b",
|
||||
"size": 1519
|
||||
},
|
||||
{
|
||||
"rfilename": "README.md",
|
||||
"blobId": "916419ce9530318d51d71325023fb2a5024475f0",
|
||||
"size": 6527
|
||||
},
|
||||
{
|
||||
"rfilename": "SHA256SUMS",
|
||||
"blobId": "cc8927482e300cb79fed740be333a8ac5639386c",
|
||||
"size": 3700
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed0/adapter.safetensors",
|
||||
"blobId": "86a05f3f118a88940a9122fab59a8e7db73d4b4f",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "fda9b4c15d283ef8ee778c4416d69b12e1922527ea330bfc67bab5cde1b6741a",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed0/adapter_meta.json",
|
||||
"blobId": "0652fd0ab9647ed184e2c65a670da74de1a24a4e",
|
||||
"size": 661
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed1/adapter.safetensors",
|
||||
"blobId": "596ed265e665aea6f674b81eecfdaaada202be45",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "6ada79d07414641bed58d74fd23090937abcf52337e75e8f06483d502fa64c57",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed1/adapter_meta.json",
|
||||
"blobId": "934875448487af7efe63e3eae775b24d2d388964",
|
||||
"size": 661
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed2/adapter.safetensors",
|
||||
"blobId": "6413c056f06232ad2ca3d513fa44cd01a90d251b",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "a9359e3f3be68468604f9bf93f20f4b65114084f3fc6a3c13363e7062c4cf547",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed2/adapter_meta.json",
|
||||
"blobId": "abc653d6a65aa8b3b1f2a18aaf12dc1260409573",
|
||||
"size": 661
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed3/adapter.safetensors",
|
||||
"blobId": "f17c2715463cadb293f36a0fc2c15fb0542990a6",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "a2d0c27fee0263c9a8152e0849975edefedc9d10061bbf789a3ead223db8703c",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed3/adapter_meta.json",
|
||||
"blobId": "f511293207bf322ce11a4c26dc83cc57b20edf52",
|
||||
"size": 661
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed4/adapter.safetensors",
|
||||
"blobId": "32503f87fd062bf0631c8eac7d8dbba09ef0e6cb",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "810b8f8d6147af3620cf08d2cf575c0eb2b0134ae0253a93ceeae5be9dca8695",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed4/adapter_meta.json",
|
||||
"blobId": "3fef81591cd7a41c636c39e72e22d5b3394dc6a5",
|
||||
"size": 661
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed5/adapter.safetensors",
|
||||
"blobId": "63b9a6dd509a288e6095ed9531fe76a055e2e5b4",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "b34e8d999612415c7395f341633ff3d2365a020b9e27b7e371c5f80f0105a486",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate01/seed5/adapter_meta.json",
|
||||
"blobId": "d0daa05e6348923237cdac83935118e4f020e9f7",
|
||||
"size": 661
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed0/adapter.safetensors",
|
||||
"blobId": "d566d86611edc89edb7cac62dc73d72619df55bd",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "1fc5a4a4392c35820c26e24d0075824b3426c4a77f3119713b4a1e577d31df5b",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed0/adapter_meta.json",
|
||||
"blobId": "36173814d1d838077da330e92fa5f0b1b222ba17",
|
||||
"size": 660
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed1/adapter.safetensors",
|
||||
"blobId": "cba04a7ef1bcb48952a723b6aa80d1b6847ef8dc",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "b742f4ffed0e293f27e4646c364a85ae359a3eae1690d3840e531dca7fba9cd8",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed1/adapter_meta.json",
|
||||
"blobId": "3c7751cefbe375871d0b99bfda0b3ba1e6ca896c",
|
||||
"size": 660
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed2/adapter.safetensors",
|
||||
"blobId": "af547c0fcaa9e69024e14818eb82c46f155dfa59",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "dc36c27a98379535007f2df798953624b6a67f0677bd41dec42349f8ce868afa",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed2/adapter_meta.json",
|
||||
"blobId": "baaefc1b64b0dce0c87bbc2a7c4342f87111aba6",
|
||||
"size": 660
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed3/adapter.safetensors",
|
||||
"blobId": "21066e00dfc55fc619ca74202ff8ad8dd6017d4e",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "1dcb6132afeec8101daf9a3fd73d42141fb871bff11fff28069f238dcff6afd0",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed3/adapter_meta.json",
|
||||
"blobId": "f675496569bbec647fcb31784c4a6d9d83872ee0",
|
||||
"size": 660
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed4/adapter.safetensors",
|
||||
"blobId": "bec0713c08368303a25e2ccef690d37a8cf2d54b",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "5b97b0601585925c19bf849ecb11ad68597d1b0d55551b917ec0f5091f85c2ff",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed4/adapter_meta.json",
|
||||
"blobId": "8535e4793f089b37fa8bf5724cf49ac24fd2750c",
|
||||
"size": 660
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed5/adapter.safetensors",
|
||||
"blobId": "128821f8b3b0591990a3b18c70ca66a16d69aff3",
|
||||
"size": 21293968,
|
||||
"lfs": {
|
||||
"sha256": "3f944a6d210958de5840e5b76e263f2105b9f49d15b9ab505950c2b29a5343af",
|
||||
"size": 21293968,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "gate02/seed5/adapter_meta.json",
|
||||
"blobId": "ae2076c513dc6898a8e30f2cf0fafc4486d8f7c3",
|
||||
"size": 660
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed0/adapter.safetensors",
|
||||
"blobId": "c3d80937be6f8262769b08a53f5e19548c516420",
|
||||
"size": 18932336,
|
||||
"lfs": {
|
||||
"sha256": "93a3f43a4356f84da0d13ecc622fee13e41ba15d237cdaad6094f243899c62d6",
|
||||
"size": 18932336,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed0/adapter_meta.json",
|
||||
"blobId": "c67a9c7f3db4db8f73cc71d27d4a8a664967b624",
|
||||
"size": 573
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed1/adapter.safetensors",
|
||||
"blobId": "5f0b88be4fa8d1a7fd586ecc640b7ac73fb8a68d",
|
||||
"size": 18932336,
|
||||
"lfs": {
|
||||
"sha256": "63d54e1c2f6bf7d07ca0f6e83a3299bd4b6d00740919bc7cae0b422af05a828e",
|
||||
"size": 18932336,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed1/adapter_meta.json",
|
||||
"blobId": "2f1ebca329c8579362d80f0e9e731b832a139349",
|
||||
"size": 573
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed2/adapter.safetensors",
|
||||
"blobId": "d66df32e3e1e67c4c6b3eccf6229f223fa61a5f8",
|
||||
"size": 18932336,
|
||||
"lfs": {
|
||||
"sha256": "702b764e2c39b3529914dac1547148ef2f462d9ee04e256201e79f00b20ccc62",
|
||||
"size": 18932336,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed2/adapter_meta.json",
|
||||
"blobId": "7e4737b99685c9f9542f7d15ad4efebc45fc26f3",
|
||||
"size": 573
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed3/adapter.safetensors",
|
||||
"blobId": "abb761e518f2bcd7285c7c2cb11579943b942d55",
|
||||
"size": 18932336,
|
||||
"lfs": {
|
||||
"sha256": "7dbf35899fe1186453e599ad8c7a85c56b7fad3d630e371ca026a1e95da2c5a7",
|
||||
"size": 18932336,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed3/adapter_meta.json",
|
||||
"blobId": "655fd5600b67568bc9da02e4480a14483e0a1067",
|
||||
"size": 573
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed4/adapter.safetensors",
|
||||
"blobId": "8bd506ae2220c7d0b025d69a4fbeb9ddaf37198d",
|
||||
"size": 18932336,
|
||||
"lfs": {
|
||||
"sha256": "a5cb1e7fa74dff467bd7f163e1db23d30ef8b1a1c935cfa55dcc8cd1b39082a7",
|
||||
"size": 18932336,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed4/adapter_meta.json",
|
||||
"blobId": "d8d7b0df8c3d7d1e2f5ef2f2f6e02e22478e2055",
|
||||
"size": 573
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed5/adapter.safetensors",
|
||||
"blobId": "487c771e11d8e7ca1fa5bd2670d060e8f77fbaee",
|
||||
"size": 18932336,
|
||||
"lfs": {
|
||||
"sha256": "d513d499dfd409da88b3db7da025ba9872fb48ec92d6b29bc2ce7a092a69745d",
|
||||
"size": 18932336,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "lora/seed5/adapter_meta.json",
|
||||
"blobId": "26fc54919eeaffc92a453ddd31cec660c2ab7f0b",
|
||||
"size": 573
|
||||
},
|
||||
{
|
||||
"rfilename": "warmup/seed0/adapter.safetensors",
|
||||
"blobId": "378bc7e4f70afb2e947fc6f53ae822dc4bc422d2",
|
||||
"size": 18932344,
|
||||
"lfs": {
|
||||
"sha256": "9108bce2acfcc3ccd38d0dfae67ac33253b95bdc94133bd25deb4daa45d41700",
|
||||
"size": 18932344,
|
||||
"pointerSize": 133
|
||||
}
|
||||
},
|
||||
{
|
||||
"rfilename": "warmup/seed0/adapter_meta.json",
|
||||
"blobId": "20989af8c7f2ff5959625878167aca5e0fc7203a",
|
||||
"size": 576
|
||||
}
|
||||
],
|
||||
"spaces": [],
|
||||
"createdAt": "2026-10-12T10:25:44.000Z",
|
||||
"usedStorage": 388053976
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"record": "qwen3.5-2b-grpo",
|
||||
"arm": "lora",
|
||||
"receipt_arm": "ctrl",
|
||||
"seed": 0,
|
||||
"step": 150,
|
||||
"base_model": "Qwen/Qwen3.5-2B",
|
||||
"base_revision": "15852e8c16360a2fea060d615a32b45270f8a8fc",
|
||||
"recipe": "GRPO, correctness-gated length penalty alpha 0.2, 150 steps from the shared warm-up (paper Section 4)",
|
||||
"lora_rank": 16,
|
||||
"lora_alpha": 32,
|
||||
"lora_targets": [
|
||||
"in_proj_qkv",
|
||||
"in_proj_a",
|
||||
"in_proj_b",
|
||||
"out_proj"
|
||||
],
|
||||
"gate": null,
|
||||
"n_tensors": 144,
|
||||
"n_params": 4727808,
|
||||
"source_sha256": "de2794c085f5096fea53374ba1cea31075071bb6de3f227bb3350b3035970447"
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Read-only FP32 effective weights for an existing pure-LoRA checkpoint."""
|
||||
import re
|
||||
import numpy as np
|
||||
from functional.model import PREFIX,StreamingLM
|
||||
from pilot.tensors import load_tensors
|
||||
BASE_REVISION='15852e8c16360a2fea060d615a32b45270f8a8fc'
|
||||
TARGETS={'in_proj_qkv','in_proj_a','in_proj_b','out_proj'}
|
||||
|
||||
class EffectiveWeight:
|
||||
def __init__(self,base,a,b,scale):
|
||||
assert a.ndim==b.ndim==2 and (b.shape[0],a.shape[1])==base.shape and a.shape[0]==b.shape[1]
|
||||
self.base,self.a,self.b,self.scale=base,a,b,scale
|
||||
self.shape,self.numel,self.dtype=base.shape,base.numel,'F32'
|
||||
def read(self,selector=slice(None)):
|
||||
if not isinstance(selector,slice):raise ValueError('Only contiguous row chunks supported')
|
||||
start,stop,step=selector.indices(self.numel);dim=self.shape[1]
|
||||
if step!=1 or start%dim or stop%dim:raise ValueError('Row aligned chunks required')
|
||||
w=self.base.read(slice(start,stop)).reshape(-1,dim)
|
||||
return (w+self.scale*(self.b[start//dim:stop//dim]@self.a)).astype(np.float32).reshape(-1)
|
||||
def evict(self):self.base.evict()
|
||||
|
||||
|
||||
def install(lm,directory,meta,multiplier=1.):
|
||||
assert meta['base_model']=='Qwen/Qwen3.5-2B' and meta['base_revision']==BASE_REVISION and meta['gate'] is None and meta['arm']=='lora'
|
||||
tensors=load_tensors(directory);pairs={};pattern=re.compile(r'^base_model\.model\.model\.(layers\.(\d+)\.linear_attn\.(in_proj_qkv|in_proj_a|in_proj_b|out_proj))\.lora_([AB])\.default\.weight$')
|
||||
for name,tensor in tensors.items():
|
||||
match=pattern.fullmatch(name)
|
||||
if not match:raise ValueError('Unexpected trainable tensor: '+name)
|
||||
target=PREFIX+match[1]+'.weight';assert lm.config['layer_types'][int(match[2])]=='linear_attention'
|
||||
assert target in lm.tensors
|
||||
value=tensor.read().reshape(tensor.shape).copy();tensor.evict();assert np.isfinite(value).all()
|
||||
pairs.setdefault(target,{})[match[4]]=value
|
||||
expected={PREFIX+f'layers.{layer}.linear_attn.{role}.weight' for layer,kind in enumerate(lm.config['layer_types']) if kind=='linear_attention' for role in TARGETS}
|
||||
assert set(pairs)==expected and len(tensors)==meta['n_tensors']
|
||||
scale=meta['lora_alpha']/meta['lora_rank']*multiplier
|
||||
for target,pair in pairs.items():
|
||||
assert set(pair)=={'A','B'} and pair['A'].shape[0]==meta['lora_rank']
|
||||
lm.tensors[target]=EffectiveWeight(lm.tensors[target],pair['A'],pair['B'],scale)
|
||||
return pairs,scale
|
||||
|
||||
|
||||
class ExplicitLoRA(StreamingLM):
|
||||
"""Independent reference: base projection + scaled low-rank output, no W merge."""
|
||||
def linear(self,x,name,rows=256):
|
||||
y=super().linear(x,name,rows);pair=self.pairs.get(PREFIX+name+'.weight')
|
||||
if pair is not None:y=y+self.scale*((x@pair['A'].T)@pair['B'].T)
|
||||
return y.astype(np.float32)
|
||||
@@ -0,0 +1,73 @@
|
||||
"""Paired concentration changes from saved immutable intervention arrays."""
|
||||
import csv,json,sys
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
from dominance.core import concentration
|
||||
|
||||
def stats(x):
|
||||
x=np.asarray(x,dtype=np.float64);v=x[np.isfinite(x)];q=np.quantile(v,[.1,.5,.9])
|
||||
return {'count':int(v.size),'p10':float(q[0]),'median':float(q[1]),'p90':float(q[2]),'mean':float(v.mean())}
|
||||
def csvwrite(path,rows):
|
||||
with path.open('w') as f:w=csv.DictWriter(f,fieldnames=list(rows[0]));w.writeheader();w.writerows(rows)
|
||||
def main(root):
|
||||
root=Path(root);status=json.loads((root/'status.json').read_text());assert status['state']=='completed';samples=json.loads((root/'samples.json').read_text());pool={};observations={};summary={};rows=[];layer_rows=[]
|
||||
for cohort in ('legacy','gsm8k'):
|
||||
for role in ('base','finetuned'):
|
||||
for sample in samples[cohort]:
|
||||
for source in (2,6,10,14,18,22):
|
||||
data=np.load(root/'raw'/f'{cohort}-{role}-{sample["id"]}-{source:02d}.npz')
|
||||
for metric,key,transform in [('distance','JS',np.sqrt),('divergence','JS',lambda x:x),('QKV','QKV',lambda x:x)]:
|
||||
impacts=transform(data['single_'+key])[:,7:,:].transpose(1,2,0);c=concentration(impacts)
|
||||
record={'cohort':cohort,'role':role,'sample':sample['id'],'recipient':source+1,'metric':metric}
|
||||
for name,x in c.items():
|
||||
observations.setdefault((cohort,role,metric,name),[]).append(x.reshape(-1))
|
||||
if name!='valid':
|
||||
for stat,value in stats(x).items():record[name+'_'+stat]=value
|
||||
pool.setdefault((cohort,role,metric,'recipient'),[]).append(np.full(200,source+1))
|
||||
pool.setdefault((cohort,role,metric,'sample'),[]).append(np.full(200,sample['id']))
|
||||
observations.setdefault((cohort,role,metric,'winner'),[]).append(np.argmax(impacts,-1).reshape(-1))
|
||||
rows.append(record)
|
||||
arrays={k:np.concatenate(v) for k,v in observations.items()};np.savez_compressed(root/'observations.npz',**{'__'.join(k):v for k,v in arrays.items()})
|
||||
for cohort in ('legacy','gsm8k'):
|
||||
summary[cohort]={}
|
||||
for metric in ('distance','divergence','QKV'):
|
||||
item={role:{name:stats(arrays[(cohort,role,metric,name)]) for name in ('effective_heads','effective_fraction','concentration','top1','top25','bottom25','heads90','total')} for role in ('base','finetuned')}
|
||||
before=arrays[(cohort,'base',metric,'effective_heads')];after=arrays[(cohort,'finetuned',metric,'effective_heads')];delta=after-before
|
||||
item['paired']={'effective_heads_delta':stats(delta),'increased_fraction':float(np.mean(delta>0)),'decreased_fraction':float(np.mean(delta<0)),'winner_agreement':float(np.mean(arrays[(cohort,'base',metric,'winner')]==arrays[(cohort,'finetuned',metric,'winner')]))}
|
||||
summary[cohort][metric]=item
|
||||
recipients=np.concatenate(pool[(cohort,'base',metric,'recipient')]);names=np.concatenate(pool[(cohort,'base',metric,'sample')])
|
||||
for layer in (3,7,11,15,19,23):
|
||||
which=recipients==layer;a=stats(before[which]);b=stats(after[which]);d=stats(delta[which]);layer_rows.append({'cohort':cohort,'metric':metric,'recipient':layer,'base_median':a['median'],'base_p10':a['p10'],'base_p90':a['p90'],'finetuned_median':b['median'],'finetuned_p10':b['p10'],'finetuned_p90':b['p90'],'paired_delta_median':d['median']})
|
||||
for sample in samples[cohort]:
|
||||
which=names==sample['id'];item.setdefault('per_text',{})[sample['id']]={'base':stats(before[which]),'finetuned':stats(after[which]),'paired_delta':stats(delta[which])}
|
||||
expected=(8.93182211792415,5.7840811612328125,11.67265834734814);b=summary['legacy']['distance']['base']['effective_heads'];np.testing.assert_allclose([b[k] for k in ['median','p10','p90']],expected,rtol=1e-10)
|
||||
(root/'summary.json').write_text(json.dumps(summary,indent=2)+'\n');csvwrite(root/'per-text-layer.csv',rows);csvwrite(root/'per-layer.csv',layer_rows)
|
||||
figs=root/'figures';figs.mkdir(exist_ok=True)
|
||||
def save(fig,name):
|
||||
for ext in ('png','pdf','svg'):fig.savefig(figs/(name+'.'+ext),dpi=180)
|
||||
plt.close(fig)
|
||||
fig,axs=plt.subplots(1,2,figsize=(13,4.8),layout='constrained')
|
||||
for ax,cohort in zip(axs,['legacy','gsm8k']):
|
||||
for role,label,color in [('base','Original release','C0'),('finetuned','GSM8K GRPO LoRA seed0','C1')]:
|
||||
x=np.sort(arrays[(cohort,role,'distance','effective_heads')]);ax.plot(x,np.arange(1,len(x)+1)/len(x),label=label,color=color)
|
||||
ax.set(title='Original four texts' if cohort=='legacy' else 'Four GSM8K held-out question prefixes',xlabel='Effective donor heads: sqrt(JS) influence',ylabel='Empirical CDF',xlim=(1,16),ylim=(0,1));ax.grid(alpha=.2);ax.legend()
|
||||
fig.suptitle('Same inputs before/after existing task fine-tuning; 32 tokens; one training seed; no training here');save(fig,'paired_effective_heads_cdf')
|
||||
fig,axs=plt.subplots(1,2,figsize=(13,4.8),layout='constrained')
|
||||
for ax,cohort in zip(axs,['legacy','gsm8k']):
|
||||
for role,prefix,color in [('base','base','C0'),('finetuned','finetuned','C1')]:
|
||||
rr=[r for r in layer_rows if r['cohort']==cohort and r['metric']=='distance'];x=[r['recipient'] for r in rr];med=[r[prefix+'_median'] for r in rr];lo=[r[prefix+'_p10'] for r in rr];hi=[r[prefix+'_p90'] for r in rr];ax.plot(x,med,'o-',color=color,label=role);ax.fill_between(x,lo,hi,color=color,alpha=.12)
|
||||
ax.set(title=cohort,xlabel='Full-attention recipient layer index',ylabel='Effective donor heads: median / P10–P90',ylim=(1,16));ax.legend();ax.grid(alpha=.2)
|
||||
fig.suptitle('All six full-attention receivers, sixteen donor heads each; descriptive dependent observations');save(fig,'paired_effective_heads_by_layer')
|
||||
fig,axs=plt.subplots(1,2,figsize=(13,4.8),layout='constrained')
|
||||
for ax,cohort in zip(axs,['legacy','gsm8k']):
|
||||
delta=arrays[(cohort,'finetuned','distance','effective_heads')]-arrays[(cohort,'base','distance','effective_heads')];ax.hist(delta,bins=60,density=True,alpha=.7);ax.axvline(0,color='black',linestyle='--');ax.axvline(np.median(delta),color='C3',label='Paired median');ax.set(title=cohort,xlabel='Finetuned minus original effective head count',ylabel='Density');ax.legend()
|
||||
fig.suptitle('Paired changes; positive = more distributed, negative = more concentrated');save(fig,'paired_effective_heads_delta')
|
||||
lines=['# GSM8K任务微调前后的有效头数','', '比较原Qwen3.5-2B发布权重与同一revision上的纯LoRA seed0(额外GSM8K GRPO,非SFT)。没有训练新模型。主指标为√JS距离消融影响的N_eff;正变化表示更分散,负变化表示更集中。','', '| 输入组 | 原权重中位数 [P10,P90] | 微调后中位数 [P10,P90] | 配对变化中位数 | 增加的观测比例 |','|---|---:|---:|---:|---:|']
|
||||
for cohort,label in [('legacy','原四条文本'),('gsm8k','GSM8K测试题前缀')]:
|
||||
item=summary[cohort]['distance'];a=item['base']['effective_heads'];b=item['finetuned']['effective_heads'];d=item['paired']['effective_heads_delta'];lines.append(f"| {label} | {a['median']:.6f} [{a['p10']:.6f},{a['p90']:.6f}] | {b['median']:.6f} [{b['p10']:.6f},{b['p90']:.6f}] | {d['median']:+.6f} | {item['paired']['increased_fraction']:.1%} |")
|
||||
lines+=['', '每组4条输入×6个接收层×25个query位置×8个接收query头=4800个配对观测;它们不是4800个独立文本样本。前后使用同一原模型tokenizer、完全相同token IDs。原四条输入的基线8.931822/16已精确复现。','', 'GSM8K输入取原作者固定版本test split中前4道至少32token的题目,仅用题目前32token,不含答案,不套不同聊天模板。另算了同组GSM8K输入的原权重基线;没有把旧通用文本与新任务文本混作配对。','', '## 方法与限定','', '所有6个普通注意力接收层和16个上游输出头均保留;每次移除一个上游头在全序列的投影输出,重算中间MLP/残差/归一化和检索分布。微调只改变18个GDN层的指定投影,普通注意力权重不变;隐藏状态和上游贡献仍会变化。','', '采用read-only FP32有效权重W+2BA,未把增量舍入为BF16、未修改底座;另用base projection+2B(Ax)独立前向校验。头输出求和、空消融和源数组复用校验均记录。JS散度及QKV复合相对变化也保留,避免只展示有利度量。这里QKV补充指标仅覆盖相同六个普通注意力接收层,其原基线不能与旧研究全部23连接的76.0%混作同一统计量。','', '单个发布者训练seed、4条短文本/组,仅支持这些输入上的描述性变化;不推广为所有微调都会如此,不报告GSM8K准确率,不据此推断删头可用或最终LM能力。配对变化中位数与两个总体中位数之差不是同一个统计量。','', '[公开微调权重与训练说明](https://huggingface.co/Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo);固定版本、参数SHA、dataset版本和题目索引见protocol.json/gsm8k-source.json/samples.json。所有权重、适配器和缓存继续保留。']
|
||||
(root/'REPORT.md').write_text('\n'.join(lines)+'\n');print((root/'REPORT.md').read_text(),end='')
|
||||
if __name__=='__main__':main(sys.argv[1])
|
||||
@@ -0,0 +1,72 @@
|
||||
"""Paired CPU-only existing-adapter comparison for the published sqrt(JS) metric."""
|
||||
import argparse,json,hashlib,time,resource,gc
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
from tokenizers import Tokenizer
|
||||
from dominance.core import InfluenceLM,concentration
|
||||
from dominance.run import distances
|
||||
from .lora import install,ExplicitLoRA,BASE_REVISION
|
||||
SOURCES=(2,6,10,14,18,22)
|
||||
|
||||
def dump(p,d):p.write_text(json.dumps(d,indent=2,allow_nan=False)+'\n')
|
||||
def single(lm,cache,layer,path):
|
||||
base=lm.recipient(cache['next_raw'],layer+1);hs=cache['heads'].shape[2];t=cache['raw'].shape[1];assert hs==16
|
||||
scores={k:[] for k in ('Q','K','V','QKV','JS')}
|
||||
for start in range(0,hs,4):
|
||||
masks=np.zeros((4,t,hs),dtype=np.float32)
|
||||
for n in range(4):masks[n,:,start+n]=1
|
||||
effects=distances(base,lm.intervene(cache,layer,masks))
|
||||
for k,v in effects.items():scores[k].extend(v)
|
||||
null=distances(base,lm.intervene(cache,layer,np.zeros((1,t,hs),dtype=np.float32)))
|
||||
assert max(float(np.max(v)) for v in null.values())<2e-5
|
||||
payload={'single_'+k:np.asarray(v,dtype=np.float32) for k,v in scores.items()};payload.update({'null_'+k:v for k,v in null.items()});np.savez_compressed(path,**payload)
|
||||
|
||||
def main():
|
||||
p=argparse.ArgumentParser();p.add_argument('--source',type=Path,required=True);p.add_argument('--parent',type=Path,required=True);p.add_argument('--assets',type=Path,required=True);p.add_argument('--out',type=Path,required=True);a=p.parse_args();a.out.mkdir(parents=True,exist_ok=False);(a.out/'cache').mkdir();(a.out/'raw').mkdir()
|
||||
started=time.monotonic();meta=json.loads((a.assets/'adapter_meta.json').read_text());assert meta['base_revision']==BASE_REVISION
|
||||
adapter_sha=hashlib.sha256((a.assets/'adapter.safetensors').read_bytes()).hexdigest();assert adapter_sha=='93a3f43a4356f84da0d13ecc622fee13e41ba15d237cdaad6094f243899c62d6'
|
||||
tok=Tokenizer.from_file(str(a.source/'tokenizer.json'));legacy=json.loads((a.parent/'samples.json').read_text());gsm=[]
|
||||
for s in legacy:assert s['token_ids']==tok.encode(s['text']).ids[:32]
|
||||
for index,line in enumerate((a.assets/'gsm8k-test.jsonl').read_text().splitlines()):
|
||||
q=json.loads(line)['question'];ids=tok.encode(q).ids
|
||||
if len(ids)<32:continue
|
||||
gsm.append({'id':f'gsm8k-test-{index:04d}','row_index':index,'text':q,'question_sha256':hashlib.sha256(q.encode()).hexdigest(),'token_ids':ids[:32]})
|
||||
if len(gsm)==4:break
|
||||
assert len(gsm)==4
|
||||
cohorts={'legacy':legacy,'gsm8k':gsm};dump(a.out/'samples.json',cohorts);dump(a.out/'adapter_meta.json',meta);dump(a.out/'gsm8k-source.json',json.loads((a.assets/'gsm8k-source.json').read_text()))
|
||||
protocol={'primary':'same six full-attention receivers and original4x32 token cohort as published8.931822/16','adapter_repo':'Avifenesh/gdn-beta-gate-qwen3.5-2b-grpo','adapter_revision':'038d8be9bd0edd3883fa019651b02bdf65609468','adapter_file':'lora/seed0/adapter.safetensors','adapter_sha256':adapter_sha,'base_revision':BASE_REVISION,'scale':2,'rank':16,'arm':'pure LoRA','training':'publisher-reported GSM8K GRPO; we do no training','sample_choice':'four original texts; first4 canonical GSM8K test questions with >=32tokens, length selection only, first32tokens; question only','source_layers':SOURCES,'primary_queries':list(range(7,32)),'main_metric':'concentration(sqrt(single_JS)); same FP32 tensors and sequence-wide donor-head deletion as prior run','cohort_pairing':'each comparison uses same question/tokenIDs before and after; base legacy arrays reused with elementwise checks','runtime':'read-only FP32 effective W+2BA; no BF16 re-rounding or quantization','controls':'head sum, null mask, explicit low-rank versus effective-weight full forward relL2<1e-4','budget_seconds':7200,'keep_all_weights_and_caches':True,'limitations':['one existing training seed','4 texts per cohort, 32 tokens each','dependent query/head observations, not iid textual samples','no generation or accuracy measurement','GDN targets only; ordinary attention weights stay unchanged','no pruning or functional interchangeability claim']}
|
||||
dump(a.out/'protocol.json',protocol);status={'state':'running','links':[]};dump(a.out/'status.json',status);cfg=json.loads((a.source/'model_config.json').read_text());controls=[];references=[]
|
||||
try:
|
||||
for cohort,samples in cohorts.items():
|
||||
for role in ('base','finetuned'):
|
||||
reuse=cohort=='legacy' and role=='base';lm=None
|
||||
if not reuse:
|
||||
lm=InfluenceLM(a.source/'weights',cfg,seconds=max(1,7200-(time.monotonic()-started)))
|
||||
if role=='finetuned':pairs,scale=install(lm,a.assets,meta)
|
||||
for si,s in enumerate(samples):
|
||||
if time.monotonic()-started>7200:raise TimeoutError('Paired CPU budget')
|
||||
if not reuse:
|
||||
cache=a.out/'cache'/f'{cohort}-{role}-{s["id"]}';cache.mkdir();ids=np.array([s['token_ids']],dtype=np.int64);final=lm.baseline(ids,cache);np.save(cache/'final.npy',final)
|
||||
controls.extend({'cohort':cohort,'role':role,'sample':s['id'],**v} for v in lm.head_sum_errors)
|
||||
if cohort=='legacy' and role=='finetuned' and si==0:
|
||||
ref=ExplicitLoRA(a.source/'weights',cfg,seconds=max(1,7200-(time.monotonic()-started)));ref.pairs,ref.scale=pairs,scale;expected,_=ref.forward(ids);actual=lm.normalization(final,'norm');error=float(np.linalg.norm(actual.astype(np.float64)-expected)/np.linalg.norm(expected.astype(np.float64)));assert error<1e-4
|
||||
status['explicit_lora_forward_relative_error']=error;del ref;gc.collect()
|
||||
for layer in SOURCES:
|
||||
out=a.out/'raw'/f'{cohort}-{role}-{s["id"]}-{layer:02d}.npz'
|
||||
if reuse:
|
||||
old=a.parent/'raw'/f'{s["id"]}-link-{layer:02d}.npz'
|
||||
with np.load(old) as d:payload={prefix+k:d[prefix+k] for prefix in ('single_','null_') for k in ('Q','K','V','QKV','JS')}
|
||||
np.savez_compressed(out,**payload)
|
||||
with np.load(out) as d:
|
||||
for k,v in payload.items():np.testing.assert_array_equal(d[k],v)
|
||||
references.append({'source':str(old.resolve()),'sha256':hashlib.sha256(old.read_bytes()).hexdigest(),'derived':out.name})
|
||||
else:
|
||||
with np.load(cache/f'layer-{layer}.npz') as d:loaded={k:d[k] for k in d.files}
|
||||
single(lm,loaded,layer,out);del loaded
|
||||
status['links'].append({'cohort':cohort,'role':role,'sample':s['id'],'source':layer,'path':str(out.relative_to(a.out))});status['elapsed_seconds']=time.monotonic()-started;dump(a.out/'status.json',status);print('completed',cohort,role,s['id'],layer,flush=True)
|
||||
dump(a.out/'head-sum-controls.json',controls);dump(a.out/'baseline-references.json',references)
|
||||
if lm is not None:del lm;gc.collect()
|
||||
status.update(state='completed',elapsed_seconds=time.monotonic()-started,peak_rss_kib=resource.getrusage(resource.RUSAGE_SELF).ru_maxrss);dump(a.out/'status.json',status)
|
||||
except BaseException as e:
|
||||
status.update(state='failed',error=repr(e),elapsed_seconds=time.monotonic()-started);dump(a.out/'status.json',status);raise
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,83 @@
|
||||
# Actual-model parameter clouds: frozen grouping and null protocol
|
||||
|
||||
Assets: retained Qwen3.5-2B original15852e8c16360a2fea060d615a32b45270f8a8fc,
|
||||
and pure GSM8K GRPO LoRA seed0 at HF038d8be9bd0edd3883fa019651b02bdf65609468.
|
||||
Use the established read-only FP32 W+2BA wrapper. No training, GPU, new models,
|
||||
weight mutation, inference requirement or deletion. Every retained asset stays.
|
||||
|
||||
## What constitutes a distribution
|
||||
|
||||
A model has no unique canonical number of parameter distributions. Enumerate a
|
||||
fixed family, not "all possible distributions":
|
||||
1. Each ndim>=2 tensor flattened as [axis0, product(other axes)]: row vectors
|
||||
and column vectors, when point count>=16 and feature dimension>=32.
|
||||
2. Decoder language/MTP full-attention Q and interleaved gate rows per query
|
||||
head; K/V rows per KV head. GDN concatenated Q/K/V rows per corresponding head.
|
||||
No claim that these groups are disjoint or iid; whole-matrix views overlap.
|
||||
3. Primary sample-size stratum has >=64 available points;16..63 is small-sample
|
||||
descriptive only. One-dimensional norm/bias vectors have no cloud of vectors;
|
||||
GDN kernel row dimension4 is low dimensional and excluded with explicit reason.
|
||||
Vision parameters are covered by matrix/flattened views, not vision-head splits.
|
||||
|
||||
Include all checkpoint components (language, vision and MTP). Per view choose
|
||||
up to512 point indices without replacement, split deterministically into calibration
|
||||
and held-out halves. Use full vector coordinates up to dimension8192; only larger
|
||||
vectors use a fixed random coordinate subset, labelled projected rather than full.
|
||||
Use identical indices, coordinates and null random draws for original/FT.
|
||||
No overlap-group parameter savings or total distribution counts are additive.
|
||||
|
||||
## Centers and radius/scaling
|
||||
|
||||
Analyze origin and calibration-mean centers separately. Fit R_max using calibration
|
||||
norms only; do not silently clip held-out points outside R_max. Also fit calibration
|
||||
RMS radius. Store held-out maximum, outside-radius mass and radial spread.
|
||||
|
||||
Null A: uniform d-dimensional ball. Simulate the SAME center-fitting and calibration
|
||||
maximum/RMS fitting before held-out evaluation. For origin, also retain exact
|
||||
expected max-fitted null CDF a^d*n_cal/(n_cal+1), a<=1; log probabilities remain
|
||||
available and zero Monte Carlo hits are not exact zeros.
|
||||
Null B: independent coordinate-uniform box bounded by calibration min/max,
|
||||
including asymmetric coordinates. Fit its center/radii using its own calibration
|
||||
sample by exactly the same procedure. Record energy/range mismatch and held-out
|
||||
coordinate violations; this null is conditional on fitted bounds, not a statement
|
||||
that all real vectors lie inside that box.
|
||||
Null C: independent coordinate-uniform box with calibration mean mu and standard
|
||||
deviation sigma, bounds mu +/- sqrt(3)*sigma (sample variance ddof1). This matches
|
||||
first and diagonal second moments in its generating law. Use its own calibration
|
||||
and held-out center/max/RMS fits too; RMS-normalized comparisons target shape
|
||||
rather than a change of global scale. Matching diagonal moments is not covariance
|
||||
matching and does not preserve correlations.
|
||||
|
||||
Use512 validation null draws (not iid model observations), same calibration count
|
||||
as each data cloud. Reuse isotropic-ball nulls only for identical dimension/count
|
||||
and center-fitting rules. Monte Carlo resolution/error must be stated. Fit both
|
||||
centers from the same raw draws where applicable; paired FT uses common randomness.
|
||||
|
||||
## Metrics and interpretation
|
||||
|
||||
Retain measured norm arrays, empirical CDF grids, max-normalized interior fractions
|
||||
at0.5/0.75/0.9/0.95/0.99 and outside1, RMS-normalized CDF from0.5 to1.5,
|
||||
median radial ratios and radial spread. Prefer probability-point differences over
|
||||
astronomical ratios against tiny a^d. Inspect positive AND negative CDF gaps:
|
||||
more inner tail plus more outer tail is not global inward stochastic dominance.
|
||||
|
||||
Record exact zeros, coordinate energy participation (sum squares)^2/sum fourths,
|
||||
coordinate-variance participation, empirical covariance/second-moment participation
|
||||
via calibration Gram matrices. Label sample rank ceiling n_cal-1 (mean centered)
|
||||
or n_cal (origin); compare to equally sampled nulls, do not interpret the raw
|
||||
finite-sample participation as true intrinsic dimension.
|
||||
|
||||
Report both full-radius and moment-controlled results for each center, whole-view
|
||||
and head subgroups, primary versus small sample/projection strata, original and
|
||||
changed72-LoRA-target groups. Unchanged parameter views can reuse identical results
|
||||
with explicit references rather than re-read/recompute. Results describe parameters,
|
||||
not activations, model quality, functional duplicates, or pruning gains.
|
||||
|
||||
Execution budget: one CPU, 512 MiB RSS ceiling, 7200 seconds per invocation;
|
||||
checkpoint every group, resume without replacing completed groups. Any incomplete
|
||||
coverage is reported before interpretation. No numerical analysis runs locally.
|
||||
|
||||
Illustrative radial CDFs use these fixed original/origin views, selected by module
|
||||
role before the census completes, not by the resulting similarity/interior score:
|
||||
language layer0 linear-attention Q head0, layer3 full-attention Q head0, and layer0
|
||||
MLP up-projection rows. Their plots are illustrations, not independent replications.
|
||||
@@ -0,0 +1,42 @@
|
||||
# Actual-model shell census
|
||||
|
||||
Read [PROTOCOL.md](PROTOCOL.md) before interpreting the results. This analyzes
|
||||
retained parameter arrays, not model activations or task accuracy.
|
||||
|
||||
Run only on the authorized CPU server from the repository root:
|
||||
|
||||
```sh
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -m unittest model_shell.test_analysis -v
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -m model_shell.analyze
|
||||
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -m model_shell.report
|
||||
```
|
||||
|
||||
Inputs are the already retained `runs/cpu-qwen35-2b/weights` and
|
||||
`runs/finetune-head-comparison/adapter.safetensors` with their existing JSON
|
||||
configuration and metadata. The adapter is evaluated as FP32 W+2BA. No weights
|
||||
are modified, no training or inference is run, and no files are deleted.
|
||||
|
||||
`runs/model-shell/checkpoints` is a resumable group ledger. Re-running skips
|
||||
completed groups; do not reuse a ledger after changing its protocol/code/inputs.
|
||||
One invocation stops at 7,200 seconds, RSS above 512 MiB or available memory below
|
||||
128 MiB. Resume after addressing a resource stop; do not relax guards silently.
|
||||
|
||||
`results/model-shell` contains the report, group inventory, per-profile metric
|
||||
CSV, compressed complete CDF/control summaries, and measured calibration/held-out
|
||||
radii. The NPZ keys are `GROUPINDEX_MODEL_CENTER_cal` / `_eval`, with zero-based
|
||||
group indices into `inventory.json`. Unchanged fine-tune profiles explicitly
|
||||
reference the original profiles in `profiles.json.gz`; the CSV expands both.
|
||||
Raw null draws are reproducible from the recorded deterministic seeds; null CDFs,
|
||||
scales and participation summaries are stored. `audit.json` verifies coverage,
|
||||
recomputes empirical CDFs from the saved norms, checks finite-sample rank limits,
|
||||
verifies the original asset SHA256 values, and hashes the output artifacts.
|
||||
`example_radii.npz` also saves calibration/held-out radii for the three fixed role
|
||||
examples and their regenerated nulls; their grid CDFs are checked against the
|
||||
original ledger before plotting full empirical step curves from radius zero.
|
||||
|
||||
The count of views is defined by the protocol and is not a unique number of
|
||||
distributions inherent in a neural network. These overlapping views are equally
|
||||
weighted for description; they are not independent replicates. The box nulls
|
||||
match fitted marginal ranges or moments, not correlations. The maximum fitted
|
||||
radius is not the unknown support boundary. Quantities near numerical or Monte
|
||||
Carlo resolution cannot support a definitive population statement.
|
||||
@@ -0,0 +1,124 @@
|
||||
"""CPU-only, read-only parameter cloud census with paired uniform references."""
|
||||
import argparse, hashlib, json, math, os, time
|
||||
from pathlib import Path
|
||||
from types import SimpleNamespace
|
||||
import numpy as np
|
||||
from pilot.tensors import load_tensors
|
||||
from finetune_compare.lora import install
|
||||
from model_shell.groups import enumerate_groups
|
||||
|
||||
MAX_GRID=np.array([.5,.75,.9,.95,.99,1.,1.05,1.1,1.25])
|
||||
RMS_GRID=np.linspace(.5,1.5,41)
|
||||
|
||||
def seed(key):return int.from_bytes(hashlib.sha256(key.encode()).digest()[:8],'little')
|
||||
|
||||
def guard(start):
|
||||
mem=dict((s.split(':')[0],int(s.split()[1])) for s in Path('/proc/meminfo').read_text().splitlines() if s.startswith('MemAvailable:'))
|
||||
rss=int(Path('/proc/self/statm').read_text().split()[1])*os.sysconf('SC_PAGE_SIZE')
|
||||
if rss>512*1024**2 or mem['MemAvailable']<128*1024 or time.monotonic()-start>7200:
|
||||
raise RuntimeError(f'Resource guard: RSS={rss}, available_kB={mem}, elapsed={time.monotonic()-start:.0f}')
|
||||
|
||||
def sample(t,g):
|
||||
rng=np.random.default_rng(seed(g['id']+'/indices'))
|
||||
n=min(512,g['population']);d=min(8192,g['dimension'])
|
||||
points=np.sort(rng.choice(g['population'],n,replace=False))
|
||||
features=np.sort(rng.choice(g['dimension'],d,replace=False)) if d<g['dimension'] else np.arange(d)
|
||||
width=math.prod(t.shape[1:]);out=np.empty((n,d),np.float32)
|
||||
if g['orientation']=='rows':
|
||||
for j,i in enumerate(points):
|
||||
row=i+g['start'];out[j]=t.read(slice(row*width,(row+1)*width))[features]
|
||||
if j%32==0:t.evict()
|
||||
else:
|
||||
for j,i in enumerate(features):
|
||||
out[:,j]=t.read(slice(i*width,(i+1)*width))[points]
|
||||
if j%32==0:t.evict()
|
||||
t.evict();out=out[rng.permutation(n)]
|
||||
digest=hashlib.sha256(points.tobytes()+features.tobytes()).hexdigest()
|
||||
return out,digest
|
||||
|
||||
def participation(y):
|
||||
gram=y@y.T;energy=float(np.trace(gram));den=float(np.square(gram).sum())
|
||||
return energy**2/den if den else 0.
|
||||
|
||||
def geometry(x,ncal,center,raw=False):
|
||||
# Float64 arithmetic; bounded sample matrix, no model-wide conversion.
|
||||
z=x.astype(np.float64);mu=z[:ncal].mean(0) if center=='mean' else np.zeros(z.shape[1])
|
||||
y=z-mu;norm=np.linalg.norm(y,axis=1);cal=norm[:ncal];r=norm[ncal:]
|
||||
maximum=float(cal.max());rms=float(np.sqrt(np.mean(cal**2)))
|
||||
valid=maximum>0 and rms>0
|
||||
a=r/maximum if maximum else np.zeros_like(r);b=r/rms if rms else np.zeros_like(r)
|
||||
coordvar=z[:ncal].var(0,ddof=1);cv=float(coordvar.sum()**2/np.square(coordvar).sum()) if coordvar.any() else 0.
|
||||
e=np.square(y[ncal:]);den=np.square(e).sum(1)
|
||||
pe=np.divide(e.sum(1)**2,den,out=np.zeros(len(e)),where=den>0)
|
||||
out=dict(valid=bool(valid),ncal=ncal,neval=len(r),d=z.shape[1],rmax=maximum,rms=rms,
|
||||
median_max=float(np.median(a)),median_rms=float(np.median(b)),
|
||||
p10_rms=float(np.quantile(b,.1)),p90_rms=float(np.quantile(b,.9)),
|
||||
outside=float(np.mean(a>1)),cdf_max=[float(np.mean(a<=v)) for v in MAX_GRID],
|
||||
cdf_rms=[float(np.mean(b<=v)) for v in RMS_GRID],
|
||||
covariance_participation=participation(y[:ncal]),rank_ceiling=ncal-(center=='mean'),
|
||||
coordinate_variance_participation=cv,point_energy_participation_median=float(np.median(pe)),
|
||||
zero_fraction=float(np.mean(z==0)))
|
||||
if raw:out.update(cal_norm=cal.tolist(),eval_norm=r.tolist())
|
||||
return out
|
||||
|
||||
BALL_CACHE={}
|
||||
def references(x,ncal,key):
|
||||
d=x.shape[1];cachekey=(d,ncal)
|
||||
if cachekey not in BALL_CACHE:
|
||||
rng=np.random.default_rng(seed(f'ball/{d}/{ncal}'))
|
||||
y=rng.standard_normal((ncal+512,d),dtype=np.float32)
|
||||
y*=((rng.random(len(y))**(1/d))/np.linalg.norm(y,axis=1))[:,None]
|
||||
BALL_CACHE[cachekey]={c:geometry(y,ncal,c) for c in ('origin','mean')}
|
||||
cal=x[:ncal].astype(np.float64);lo=cal.min(0);hi=cal.max(0);mu=cal.mean(0);sd=cal.std(0,ddof=1)
|
||||
rng=np.random.default_rng(seed(key+'/uniform'))
|
||||
u=rng.random((ncal+512,d),dtype=np.float32)
|
||||
refs={'ball':BALL_CACHE[cachekey]}
|
||||
for name,left,right in [('range_box',lo,hi),('moment_box',mu-np.sqrt(3)*sd,mu+np.sqrt(3)*sd)]:
|
||||
y=(left+(right-left)*u).astype(np.float32)
|
||||
refs[name]={c:geometry(y,ncal,c) for c in ('origin','mean')}
|
||||
return refs,dict(heldout_outside_coordinate_range=float(np.mean((x[ncal:]<lo)|(x[ncal:]>hi))),
|
||||
range_box_expected_energy=float(np.sum((lo**2+lo*hi+hi**2)/3)),
|
||||
observed_cal_energy=float(np.mean(np.sum(cal**2,axis=1))))
|
||||
|
||||
def analyze(x,key):
|
||||
ncal=len(x)//2;refs,extra=references(x,ncal,key);out={}
|
||||
for center in ('origin','mean'):
|
||||
p=geometry(x,ncal,center,True);p['references']=refs; p.update(extra)
|
||||
p['comparisons']={}
|
||||
for name,bycenter in refs.items():
|
||||
ref=bycenter[center];diff=np.array(p['cdf_rms'])-ref['cdf_rms']
|
||||
p['comparisons'][name]=dict(interior90_gap=p['cdf_max'][2]-ref['cdf_max'][2],
|
||||
interior95_gap=p['cdf_max'][3]-ref['cdf_max'][3],
|
||||
rms_cdf_positive_gap=float(max(0,diff.max())),rms_cdf_negative_gap=float(max(0,-diff.min())),
|
||||
median_rms_delta=p['median_rms']-ref['median_rms'],
|
||||
participation_ratio=p['covariance_participation']/ref['covariance_participation'] if ref['covariance_participation'] else None)
|
||||
p['ball_origin_log_expected_cdf90']=float(x.shape[1]*np.log(.9)+np.log(ncal/(ncal+1)))
|
||||
out[center]=p
|
||||
return out
|
||||
|
||||
def main():
|
||||
ap=argparse.ArgumentParser();ap.add_argument('--root',default='runs');ap.add_argument('--out',default='runs/model-shell');args=ap.parse_args()
|
||||
root=Path(args.root);out=Path(args.out);out.mkdir(exist_ok=True,parents=True);(out/'checkpoints').mkdir(exist_ok=True)
|
||||
cfg=json.loads((root/'cpu-qwen35-2b/model_config.json').read_text())['text_config']
|
||||
base=load_tensors(root/'cpu-qwen35-2b/weights');ft=SimpleNamespace(tensors=dict(base),config=cfg)
|
||||
meta=json.loads((root/'finetune-head-comparison/adapter_meta.json').read_text())
|
||||
pairs,scale=install(ft,root/'finetune-head-comparison',meta)
|
||||
groups,skips=enumerate_groups(base,cfg)
|
||||
manifest=dict(groups=groups,skips=skips,total_tensors=len(base),parameters=sum(t.numel for t in base.values()),changed_tensors=sorted(pairs),adapter_meta=meta,
|
||||
max_grid=MAX_GRID.tolist(),rms_grid=RMS_GRID.tolist(),null_eval=512,point_cap=512,feature_cap=8192)
|
||||
(out/'inventory.json').write_text(json.dumps(manifest,indent=2));start=time.monotonic()
|
||||
for i,g in enumerate(groups):
|
||||
target=out/'checkpoints'/f'{i:04d}.json'
|
||||
if target.exists():continue
|
||||
guard(start);x,digest=sample(base[g['tensor']],g);p=analyze(x,g['id']);del x
|
||||
changed=g['tensor'] in pairs
|
||||
if changed:
|
||||
guard(start);x,digest2=sample(ft.tensors[g['tensor']],g);assert digest==digest2
|
||||
q=analyze(x,g['id']);del x
|
||||
else:q=None
|
||||
record=dict(group=g,sampling_sha256=digest,changed=changed,original=p,finetuned=q,finetuned_reuses_original=not changed)
|
||||
temp=target.with_suffix('.tmp');temp.write_text(json.dumps(record,allow_nan=False));temp.replace(target)
|
||||
if i%10==0:print(f'{i+1}/{len(groups)} elapsed={time.monotonic()-start:.1f}s',flush=True)
|
||||
print('COMPLETE',len(groups),flush=True)
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,29 @@
|
||||
"""Deterministic finite family of matrix/vector clouds; no data-dependent choice."""
|
||||
import math,re
|
||||
|
||||
def enumerate_groups(tensors,cfg):
|
||||
groups=[];skips=[]
|
||||
for name,t in sorted(tensors.items()):
|
||||
if len(t.shape)<2:skips.append({'name':name,'reason':'one vector, no vector cloud','shape':t.shape});continue
|
||||
rows=t.shape[0];cols=math.prod(t.shape[1:]);count=0
|
||||
for axis,n,d in [('rows',rows,cols),('columns',cols,rows)]:
|
||||
if n>=16 and d>=32:
|
||||
groups.append({'id':name+'::'+axis,'tensor':name,'kind':'matrix','orientation':axis,'start':0,'stop':rows,'population':n,'dimension':d,'stratum':'primary' if n>=64 else 'small_sample'});count+=1
|
||||
if not count:skips.append({'name':name,'reason':'insufficient points or dimension <32','shape':t.shape})
|
||||
if not (name.startswith('model.language_model.layers.') or name.startswith('mtp.layers.')):continue
|
||||
segments=[]
|
||||
if name.endswith('.linear_attn.in_proj_qkv.weight'):
|
||||
kh,kd,vh,vd=[cfg[k] for k in ('linear_num_key_heads','linear_key_head_dim','linear_num_value_heads','linear_value_head_dim')]
|
||||
for role,num,dim,offset in [('Q',kh,kd,0),('K',kh,kd,kh*kd),('V',vh,vd,2*kh*kd)]:
|
||||
for h in range(num):segments.append((role,h,offset+h*dim,offset+(h+1)*dim))
|
||||
elif name.endswith('.self_attn.q_proj.weight'):
|
||||
dim=cfg['head_dim'];assert rows==cfg['num_attention_heads']*2*dim
|
||||
for h in range(cfg['num_attention_heads']):
|
||||
for role,offset in [('Q',0),('gate',dim)]:segments.append((role,h,h*2*dim+offset,h*2*dim+offset+dim))
|
||||
elif name.endswith(('.self_attn.k_proj.weight','.self_attn.v_proj.weight')):
|
||||
role='K' if '.k_proj.' in name else 'V';dim=cfg['head_dim'];assert rows==cfg['num_key_value_heads']*dim
|
||||
for h in range(cfg['num_key_value_heads']):segments.append((role,h,h*dim,(h+1)*dim))
|
||||
for role,h,start,stop in segments:
|
||||
assert stop<=rows
|
||||
groups.append({'id':name+f'::{role}_head{h}','tensor':name,'kind':'head_rows','orientation':'rows','start':start,'stop':stop,'population':stop-start,'dimension':cols,'stratum':'primary' if stop-start>=64 else 'small_sample'})
|
||||
return groups,skips
|
||||
@@ -0,0 +1,176 @@
|
||||
"""Validate complete checkpoints; write compact scientific data, figures and report."""
|
||||
import argparse,csv,gzip,hashlib,json,platform,sys
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
from model_shell.analyze import MAX_GRID,RMS_GRID,sample,seed
|
||||
from pilot.tensors import load_tensors
|
||||
|
||||
def sha(p):
|
||||
h=hashlib.sha256()
|
||||
with p.open('rb') as f:
|
||||
for b in iter(lambda:f.read(1024*1024),b''):h.update(b)
|
||||
return h.hexdigest()
|
||||
|
||||
def main():
|
||||
ap=argparse.ArgumentParser();ap.add_argument('--input',default='runs/model-shell');ap.add_argument('--out',default='results/model-shell');a=ap.parse_args()
|
||||
source=Path(a.input);out=Path(a.out);out.mkdir(parents=True,exist_ok=True);figdir=out/'figures';figdir.mkdir(exist_ok=True)
|
||||
inventory=json.loads((source/'inventory.json').read_text());groups=inventory['groups'];records=[];rows=[];radii={}
|
||||
for i,g in enumerate(groups):
|
||||
r=json.loads((source/'checkpoints'/f'{i:04d}.json').read_text());assert r['group']==g
|
||||
assert r['changed']==(g['tensor'] in inventory['changed_tensors'])
|
||||
for model in ('original','finetuned'):
|
||||
profiles=r[model] if r[model] is not None else r['original']
|
||||
for center,p in profiles.items():
|
||||
if center=='origin':
|
||||
p['ball_log_expected_max_cdf']=[float(p['d']*np.log(z)+np.log(p['ncal']/(p['ncal']+1))) for z in MAX_GRID if z<=1]
|
||||
assert p['valid'] and p['d']==min(8192,g['dimension'])
|
||||
assert p['covariance_participation']<=p['rank_ceiling']+1e-6
|
||||
v=np.asarray(p['eval_norm']);cal=np.asarray(p['cal_norm'])
|
||||
assert abs(p['rmax']-cal.max())<1e-12
|
||||
assert abs(p['outside']-np.mean(v>p['rmax']))<1e-12
|
||||
np.testing.assert_allclose(p['cdf_max'],[np.mean(v<=z*p['rmax']) for z in MAX_GRID])
|
||||
np.testing.assert_allclose(p['cdf_rms'],[np.mean(v<=z*p['rms']) for z in RMS_GRID])
|
||||
key=f'{i}_{model}_{center}';radii[key+'_cal']=cal;radii[key+'_eval']=v
|
||||
row=dict(group_index=i,group=g['id'],model=model,center=center,kind=g['kind'],stratum=g['stratum'],changed=r['changed'],projected=g['dimension']>8192,
|
||||
dimension=g['dimension'],analyzed_dimension=p['d'],population=g['population'],ncal=p['ncal'],neval=p['neval'],sampling_sha256=r['sampling_sha256'])
|
||||
for k in ('median_max','median_rms','p10_rms','p90_rms','outside','rmax','rms','covariance_participation','rank_ceiling','coordinate_variance_participation','point_energy_participation_median','zero_fraction','heldout_outside_coordinate_range'):
|
||||
row[k]=p[k]
|
||||
for name,c in p['comparisons'].items():
|
||||
for k,vv in c.items():row[name+'_'+k]=vv
|
||||
rows.append(row)
|
||||
# Compact profiles keep CDF and controls; raw measured radii live in NPZ.
|
||||
for model in ('original','finetuned'):
|
||||
if r[model] is not None:
|
||||
for p in r[model].values():p.pop('cal_norm');p.pop('eval_norm')
|
||||
records.append(r)
|
||||
with gzip.open(out/'profiles.json.gz','wt',encoding='utf-8') as f:json.dump(records,f,allow_nan=False)
|
||||
np.savez_compressed(out/'measured_radii.npz',**radii)
|
||||
with (out/'metrics.csv').open('w',newline='') as f:
|
||||
w=csv.DictWriter(f,fieldnames=list(rows[0]));w.writeheader();w.writerows(rows)
|
||||
(out/'inventory.json').write_text(json.dumps(inventory,indent=2))
|
||||
def subset(model='original',center='origin',kind=None,changed=None):
|
||||
return [r for r in rows if r['model']==model and r['center']==center and r['stratum']=='primary' and not r['projected'] and (kind is None or r['kind']==kind) and (changed is None or r['changed']==changed)]
|
||||
summary={}
|
||||
for center in ('origin','mean'):
|
||||
for kind in ('matrix','head_rows'):
|
||||
rs=subset(center=center,kind=kind);s={'n':len(rs),
|
||||
'median_zero_fraction':float(np.median([r['zero_fraction'] for r in rs])),
|
||||
'median_coordinate_energy_participation_fraction':float(np.median([r['point_energy_participation_median']/r['analyzed_dimension'] for r in rs])),
|
||||
'median_coordinate_variance_participation_fraction':float(np.median([r['coordinate_variance_participation']/r['analyzed_dimension'] for r in rs]))}
|
||||
for ref in ('ball','range_box','moment_box'):
|
||||
gap=np.array([r[ref+'_interior90_gap'] for r in rs]);pos=np.array([r[ref+'_rms_cdf_positive_gap'] for r in rs]);neg=np.array([r[ref+'_rms_cdf_negative_gap'] for r in rs])
|
||||
s[ref]=dict(median_interior90_gap=float(np.median(gap)),fraction_gap_gt10pp=float(np.mean(gap>.1)),median_positive_rms_gap=float(np.median(pos)),median_negative_rms_gap=float(np.median(neg)),
|
||||
fraction_two_sided_rms_gt10pp=float(np.mean((pos>.1)&(neg>.1))),median_participation_ratio=float(np.median([r[ref+'_participation_ratio'] for r in rs])))
|
||||
summary[center+'/'+kind]=s
|
||||
paired={}
|
||||
for center in ('origin','mean'):
|
||||
b=subset(center=center,changed=True);t=subset(model='finetuned',center=center,changed=True);assert [r['group'] for r in b]==[r['group'] for r in t]
|
||||
paired[center]={'n':len(b)}
|
||||
for field in ('median_max','median_rms','covariance_participation','moment_box_interior90_gap'):
|
||||
delta=np.array([q[field]-p[field] for p,q in zip(b,t)])
|
||||
paired[center][field]=dict(median=float(np.median(delta)),p10=float(np.quantile(delta,.1)),p90=float(np.quantile(delta,.9)),max_abs=float(np.max(abs(delta))))
|
||||
secondary=[]
|
||||
for model in ('original','finetuned'):
|
||||
for center in ('origin','mean'):
|
||||
for label in ('small_sample','projected'):
|
||||
ss=[r for r in rows if r['model']==model and r['center']==center and (r['stratum']=='small_sample' if label=='small_sample' else r['projected'])]
|
||||
secondary.append(dict(model=model,center=center,stratum=label,n=len(ss),median_max=float(np.median([r['median_max'] for r in ss])),moment_interior90_gap=float(np.median([r['moment_box_interior90_gap'] for r in ss]))))
|
||||
(out/'summary.json').write_text(json.dumps(dict(strata=summary,paired_changed=paired,secondary=secondary),indent=2))
|
||||
plt.rcParams.update({'font.size':10,'axes.spines.top':False,'axes.spines.right':False})
|
||||
def save(fig,name):
|
||||
fig.tight_layout()
|
||||
for ext in ('png','pdf','svg'):fig.savefig(figdir/(name+'.'+ext),dpi=180,bbox_inches='tight')
|
||||
plt.close(fig)
|
||||
fig,axs=plt.subplots(2,2,figsize=(11,7),sharex=True,sharey=True)
|
||||
for i,center in enumerate(('origin','mean')):
|
||||
for j,kind in enumerate(('matrix','head_rows')):
|
||||
rs=subset(center=center,kind=kind);ax=axs[i,j]
|
||||
for ref,label in [('ball','Uniform ball'),('range_box','Range-matched box'),('moment_box','Moment-matched box')]:
|
||||
v=np.sort([r[ref+'_interior90_gap'] for r in rs]);ax.plot(v,np.arange(1,len(v)+1)/len(v),label=label)
|
||||
ax.axvline(0,color='gray',lw=.8);ax.set_title(f'{center} center / {kind}, n={len(rs)}');ax.set_xlabel('F(data r/Rcal <= 0.9) - F(null)');ax.set_ylabel('Fraction of sampled groups')
|
||||
axs[0,0].legend(fontsize=8);fig.suptitle('Actual Qwen3.5-2B: interior mass depends on the reference');save(fig,'interior_reference_sensitivity')
|
||||
fig,axs=plt.subplots(1,2,figsize=(11,4.3))
|
||||
for ax,center in zip(axs,('origin','mean')):
|
||||
for kind,marker in [('matrix','o'),('head_rows','.')]:
|
||||
rs=subset(center=center,kind=kind);ax.scatter([r['moment_box_rms_cdf_positive_gap'] for r in rs],[r['moment_box_rms_cdf_negative_gap'] for r in rs],s=10,alpha=.25,label=kind,marker=marker)
|
||||
ax.axvline(.1,color='gray',lw=.7);ax.axhline(.1,color='gray',lw=.7);ax.set(xlabel='Largest positive CDF gap (more inner tail)',ylabel='Largest negative CDF gap (more outer tail)',title=f'{center} / moment-matched box',xlim=(-.02,1),ylim=(-.02,1));ax.legend()
|
||||
fig.suptitle('RMS-normalized radial shape: both tails can grow together');save(fig,'radial_shape_two_tails')
|
||||
fig,axs=plt.subplots(1,2,figsize=(11,4.3))
|
||||
for ax,center in zip(axs,('origin','mean')):
|
||||
b=subset(center=center,changed=True);t=subset(model='finetuned',center=center,changed=True)
|
||||
x=[r['median_max'] for r in b];y=[r['median_max'] for r in t];ax.scatter(x,y,s=10,alpha=.3);low=min(x+y);high=max(x+y);ax.plot([low,high],[low,high],color='gray',lw=1)
|
||||
ax.set(xlabel='Original median r/Rcal',ylabel='GRPO-LoRA median r/Rcal',title=f'{center}, changed primary groups n={len(b)}')
|
||||
fig.suptitle('Paired same-index comparison; unchanged groups excluded');save(fig,'finetune_paired_radii')
|
||||
fig,axs=plt.subplots(1,2,figsize=(11,4.3))
|
||||
for ax,center in zip(axs,('origin','mean')):
|
||||
for kind in ('matrix','head_rows'):
|
||||
rs=subset(center=center,kind=kind);v=np.sort([r['moment_box_participation_ratio'] for r in rs]);ax.plot(v,np.arange(1,len(v)+1)/len(v),label=kind)
|
||||
ax.set(xlabel='Empirical participation / equal-sample moment-box reference',ylabel='Fraction of groups',title=center);ax.axvline(1,color='gray',lw=.8);ax.legend()
|
||||
fig.suptitle('Finite-sample participation is not the true intrinsic dimension');save(fig,'participation_reference')
|
||||
examples=[('model.language_model.layers.0.linear_attn.in_proj_qkv.weight::Q_head0','L0 GDN Q head0'),
|
||||
('model.language_model.layers.3.self_attn.q_proj.weight::Q_head0','L3 full-attention Q head0'),
|
||||
('model.language_model.layers.0.mlp.up_proj.weight::rows','L0 MLP up rows')]
|
||||
fig,axs=plt.subplots(2,3,figsize=(13,7),sharey=True)
|
||||
byid={r['group']['id']:r for r in records}
|
||||
indices={g['id']:i for i,g in enumerate(groups)}
|
||||
base=load_tensors(Path('runs/cpu-qwen35-2b/weights'));example_radii={}
|
||||
for j,(gid,label) in enumerate(examples):
|
||||
p=byid[gid]['original']['origin']
|
||||
g=byid[gid]['group'];x,digest=sample(base[g['tensor']],g);assert digest==byid[gid]['sampling_sha256']
|
||||
ncal=len(x)//2;d=x.shape[1];cal=x[:ncal].astype(np.float64)
|
||||
rng=np.random.default_rng(seed(gid+'/uniform'));u=rng.random((ncal+512,d),dtype=np.float32)
|
||||
mu=cal.mean(0);sd=cal.std(0,ddof=1);lo=mu-np.sqrt(3)*sd;hi=mu+np.sqrt(3)*sd
|
||||
moment=(lo+(hi-lo)*u).astype(np.float32)
|
||||
rng=np.random.default_rng(seed(f'ball/{d}/{ncal}'));ball=rng.standard_normal((ncal+512,d),dtype=np.float32)
|
||||
ball*=((rng.random(len(ball))**(1/d))/np.linalg.norm(ball,axis=1))[:,None]
|
||||
arrays={'Actual weights':(radii[f'{indices[gid]}_original_origin_cal'],radii[f'{indices[gid]}_original_origin_eval'])}
|
||||
for name,ref,raw in [('Uniform ball','ball',ball),('Moment box','moment_box',moment)]:
|
||||
nr=np.linalg.norm(raw.astype(np.float64),axis=1);arrays[name]=(nr[:ncal],nr[ncal:])
|
||||
np.testing.assert_allclose([np.mean(nr[ncal:]/nr[:ncal].max()<=z) for z in MAX_GRID],p['references'][ref]['origin']['cdf_max'])
|
||||
np.testing.assert_allclose([np.mean(nr[ncal:]/np.sqrt(np.mean(nr[:ncal]**2))<=z) for z in RMS_GRID],p['references'][ref]['origin']['cdf_rms'])
|
||||
for name,(nc,ne) in arrays.items():example_radii[f'example{j}_{name.replace(" ","_")}_cal']=nc;example_radii[f'example{j}_{name.replace(" ","_")}_eval']=ne
|
||||
for i,(field,grid) in enumerate([('cdf_max',MAX_GRID),('cdf_rms',RMS_GRID)]):
|
||||
ax=axs[i,j]
|
||||
for name,(nc,ne) in arrays.items():
|
||||
scale=nc.max() if i==0 else np.sqrt(np.mean(nc**2));v=np.sort(ne/scale)
|
||||
ax.step(np.r_[0,v, max(1.5,float(v[-1]))],np.r_[0,np.arange(1,len(v)+1)/len(v),1],where='post',label=name,lw=1.8,ls='-' if name=='Actual weights' else '--')
|
||||
ax.set(title=label,xlabel='r / calibration '+('maximum' if i==0 else 'RMS'),ylabel='Held-out CDF',ylim=(-.03,1.03),xlim=(0,1.5));ax.legend(fontsize=8)
|
||||
np.savez_compressed(out/'example_radii.npz',**example_radii)
|
||||
fig.suptitle('Fixed role examples: maximum-radius and RMS normalization');save(fig,'fixed_role_radial_cdfs')
|
||||
lines=['# 两个实际2B检查点:参数云的球壳检验','',f'完整覆盖:{len(groups)}组/模型,{len(rows)}个模型×中心组合。632个参数张量,2,274,069,824个参数(包含语言、视觉和MTP)。',
|
||||
'','## 分布计数与范围','', '固定规则给出554个矩阵行/列视图、1,004个语言/MTP头视图;视图互相重叠,不能相加成参数节省量。1,522组有至少64个可用点,36组只有16个点;1组高维嵌入列视图使用8,192个抽样坐标。主表只汇总样本充足且没有投影的1,521组。319个一维张量和18个低维卷积核不构成此规则下的高维样本云。',
|
||||
'','## 原模型结果(逐组等权,非独立观测)','', '|中心|视图|组数|相对均匀球:90%半径内质量差中位数|相对矩匹配均匀盒:质量差中位数|矩匹配且RMS归一后,内外两尾差均>10个百分点的组占比|','|---|---|---:|---:|---:|---:|']
|
||||
for key,s in summary.items():
|
||||
c,k=key.split('/');lines.append(f'|{c}|{k}|{s["n"]}|{s["ball"]["median_interior90_gap"]:.3f}|{s["moment_box"]["median_interior90_gap"]:.3f}|{s["moment_box"]["fraction_two_sided_rms_gt10pp"]:.1%}|')
|
||||
lines+=['','这些是描述性质量差,不是显著性检验。正差表示所指定半径以内有更多样本;不能将其自动解释为整条径向分布向内平移。若RMS归一后内外尾均变多,更准确的解释是径向分布更宽。',
|
||||
'', '|中心/视图|逐组零值率中位数|点坐标能量参与率÷维度,中位数|坐标方差参与率÷维度,中位数|','|---|---:|---:|---:|']
|
||||
for key,s in summary.items():lines.append(f'|{key}|{s["median_zero_fraction"]:.6g}|{s["median_coordinate_energy_participation_fraction"]:.4f}|{s["median_coordinate_variance_participation_fraction"]:.4f}|')
|
||||
lines+=['','能量参与率衡量坐标能量集中程度,依赖坐标基;有限样本Gram参与率反映样本间几何,另见图。两者均不是精确非零坐标计数,也不是模型功能的有效维度。',
|
||||
'','## 微调前后','', '原模型是官方Qwen3.5-2B;第二个模型是在同一revision上进行GSM8K GRPO的已有纯LoRA检查点,不是另一个完整模型。72个投影矩阵使用只读W+2BA展开,其余参数共享。972个视图受影响;其中936个属于主分析。未改变视图复用完全相同的分析结果。','', '|中心|指标|配对变化中位数|P10|P90|最大绝对变化|','|---|---|---:|---:|---:|---:|']
|
||||
for c,p in paired.items():
|
||||
for k,v in p.items():
|
||||
if k!='n':lines.append(f'|{c}|{k}|{v["median"]:.6g}|{v["p10"]:.6g}|{v["p90"]:.6g}|{v["max_abs"]:.6g}|')
|
||||
lines+=['','## 单独描述的小样本与坐标抽样组','', '|模型|中心|类别|组数|中位r/Rcal的组间中位数|相对矩匹配盒的90%半径质量差中位数|','|---|---|---|---:|---:|---:|']
|
||||
for s in secondary:lines.append(f'|{s["model"]}|{s["center"]}|{s["stratum"]}|{s["n"]}|{s["median_max"]:.4f}|{s["moment_interior90_gap"]:.4f}|')
|
||||
lines+=['','## 如何读图','', '1. `interior_reference_sensitivity`:不同均匀参照下,90%校准半径内质量差的组间CDF。横轴向右表示更多内侧质量。','2. `radial_shape_two_tails`:匹配矩且按各自校准RMS归一后的最大正/负CDF差。右上角同时增加两尾,并非单纯向内。','3. `finetune_paired_radii`:同一视图的微调前后中位半径;对角线表示不变。','4. `participation_reference`:Gram矩阵参与率相对同样本量参照的比值。受样本秩上限影响,不能当作真实内在维度。',
|
||||
'5. `fixed_role_radial_cdfs`:预先按角色固定的GDN Q、全注意力Q和MLP上投影示例,上排按校准最大半径、下排按RMS归一化。不是按结果挑选最明显的组。',
|
||||
'','## 方法与限制','', '每组最多512个不同参数向量,一半校准、一半留出;模型固定,留出指未用于拟合中心/半径的参数向量,不是独立训练模型。对照每组512个验证向量,最坏单项二项标准误约2.21个百分点;模型留出样本的误差还取决于样本数,且参数向量不保证独立。10个百分点仅是描述性筛选尺度,没有多重检验或总体显著性结论。',
|
||||
'','均匀球、坐标范围均匀盒、匹配均值和逐坐标方差的均匀盒都按同一规则拟合自身中心、最大半径及RMS。均匀球原点中心的精确拟合半径CDF为a^d*ncal/(ncal+1),保留其对数以避免把模拟零命中误报成零概率。盒对照不是协方差匹配。校准最大半径不是已知总体支撑边界;留出越界率已记录。',
|
||||
'','`origin`保留坐标均值贡献;`mean`使用校准向量均值。没有使用所有数据来选边界、训练或推理;没有删除模型。坐标稀疏性、有限样本参与率与径向内侧质量分别测量,不能相互代替。该实验不能证明更好的模型更靠里,也不能证明功能重复、可剪枝或可复用。',
|
||||
'','复现:`OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 venv/bin/python -m model_shell.analyze`,完成后 `... python -m model_shell.report`。只在已授权CPU服务器运行。分组协议见 `model_shell/PROTOCOL.md`;全量指标在metrics.csv,完整CDF/参照在profiles.json.gz,实测范数在measured_radii.npz。']
|
||||
(out/'REPORT.md').write_text('\n'.join(lines)+'\n')
|
||||
sources={'base':Path('runs/cpu-qwen35-2b/weights/model.safetensors-00001-of-00001.safetensors'),'adapter':Path('runs/finetune-head-comparison/adapter.safetensors'),
|
||||
'config':Path('runs/cpu-qwen35-2b/model_config.json'),'adapter_meta':Path('runs/finetune-head-comparison/adapter_meta.json')}
|
||||
sourcehash={k:dict(path=str(p),bytes=p.stat().st_size,sha256=sha(p)) for k,p in sources.items()}
|
||||
(out/'environment.json').write_text(json.dumps(dict(python=sys.version,platform=platform.platform(),numpy=np.__version__,matplotlib=matplotlib.__version__,
|
||||
source_code_sha256={str(p):sha(p) for p in sorted(Path('model_shell').glob('*.py'))},protocol_sha256=sha(Path('model_shell/PROTOCOL.md')),seed='first 8 SHA256 bytes, little endian; group id plus purpose suffix',
|
||||
thread_limit=1,server='8.211.154.134',training=False,inference=False,gpu=False),indent=2))
|
||||
assert sourcehash['base']['sha256']=='aa33250c4fc64891ddfaba3a314fd9542ea371843c387178b425fbcc5ed680b1'
|
||||
assert sourcehash['adapter']['sha256']=='93a3f43a4356f84da0d13ecc622fee13e41ba15d237cdaad6094f243899c62d6'
|
||||
audit=dict(complete_groups=len(groups),profile_rows=len(rows),all_finite=True,cdf_recomputed=True,sample_rank_checked=True,sources=sourcehash,files={str(p.relative_to(out)):sha(p) for p in sorted(out.rglob('*')) if p.is_file() and p.name!='audit.json'})
|
||||
(out/'audit.json').write_text(json.dumps(audit,indent=2));print(json.dumps(dict(summary=summary,paired=paired),indent=2))
|
||||
|
||||
if __name__=='__main__':main()
|
||||
@@ -0,0 +1,49 @@
|
||||
"""Run on the authorized CPU server: python -m unittest model_shell.test_analysis."""
|
||||
import unittest
|
||||
import numpy as np
|
||||
from model_shell.analyze import sample,geometry,analyze,seed
|
||||
from finetune_compare.lora import EffectiveWeight
|
||||
|
||||
class ArrayTensor:
|
||||
def __init__(self,x):self.x=x;self.shape=x.shape;self.numel=x.size;self.dtype='F32'
|
||||
def read(self,s=slice(None)):return self.x.reshape(-1)[s].copy()
|
||||
def evict(self):pass
|
||||
|
||||
class Checks(unittest.TestCase):
|
||||
def test_sampling_and_lora(self):
|
||||
rng=np.random.default_rng(17);w=rng.normal(size=(80,64)).astype('f');a=rng.normal(size=(2,64)).astype('f');b=rng.normal(size=(80,2)).astype('f')
|
||||
effective=EffectiveWeight(ArrayTensor(w),a,b,2);explicit=ArrayTensor(w+2*b@a)
|
||||
for axis,n,d,start,stop in [('rows',80,64,0,80),('columns',64,80,0,80),('rows',32,64,16,48)]:
|
||||
g=dict(id=axis+str(start),orientation=axis,population=n,dimension=d,start=start,stop=stop)
|
||||
x,h=sample(effective,g);y,k=sample(explicit,g);np.testing.assert_allclose(x,y,atol=2e-6,rtol=1e-5);self.assertEqual(h,k)
|
||||
self.assertEqual(x.shape,(n,d))
|
||||
rr=np.random.default_rng(seed(g['id']+'/indices'));indices=np.sort(rr.choice(n,n,replace=False));order=rr.permutation(n)
|
||||
cloud=explicit.x[start:stop] if axis=='rows' else explicit.x.T
|
||||
np.testing.assert_allclose(y,cloud[indices][order],atol=0,rtol=0)
|
||||
def test_center_scale_and_rank(self):
|
||||
rng=np.random.default_rng(5);x=rng.normal(size=(128,96)).astype('f')
|
||||
for center in ('origin','mean'):
|
||||
p=geometry(x,64,center);q=geometry(x*3,64,center)
|
||||
np.testing.assert_allclose(p['cdf_rms'],q['cdf_rms']);self.assertLessEqual(p['covariance_participation'],p['rank_ceiling']+1e-6)
|
||||
p=geometry(x,64,'mean');q=geometry(x+4,64,'mean');np.testing.assert_allclose(p['median_rms'],q['median_rms'],rtol=1e-6)
|
||||
self.assertFalse(geometry(np.zeros((32,64)),16,'mean')['valid'])
|
||||
def test_ball_fit_and_sparse_counterexample(self):
|
||||
rng=np.random.default_rng(33);d=32;ncal=256
|
||||
# Analytic expectation over independent calibration maxima.
|
||||
c=rng.random((20000,ncal))**(1/d);v=rng.random(20000)**(1/d)
|
||||
observed=np.mean(v<=.99*c.max(1));expected=.99**d*ncal/(ncal+1)
|
||||
self.assertLess(abs(observed-expected),.015)
|
||||
radii=rng.random(512)**(1/d);x=np.zeros((512,d),dtype='f');x[:,0]=radii
|
||||
p=geometry(x,256,'origin');self.assertGreater(p['median_max'],.9)
|
||||
# Sparse support alone retains the full-dimensional radial law.
|
||||
self.assertLess(p['cdf_max'][2],.08)
|
||||
x[:,0]=rng.random(512)**.5
|
||||
self.assertGreater(geometry(x,256,'origin')['cdf_max'][2],.65)
|
||||
sphere=rng.normal(size=(512,d));sphere/=np.linalg.norm(sphere,axis=1)[:,None]
|
||||
self.assertEqual(geometry(sphere,256,'origin')['cdf_max'][2],0.)
|
||||
def test_reproducible_controls(self):
|
||||
x=np.random.default_rng(7).normal(size=(32,40)).astype('f');a=analyze(x,'test');b=analyze(x,'test')
|
||||
self.assertEqual(a,b)
|
||||
self.assertTrue(a['mean']['valid'])
|
||||
|
||||
if __name__=='__main__':unittest.main()
|
||||
@@ -0,0 +1,25 @@
|
||||
# 实测激活率:SiLU 门控模型
|
||||
|
||||
覆盖24层、4条中英文文本,每条32 token;所有投影输出及 MLP 门控中间量,按64/128输出通道分块。
|
||||
|
||||
| 输出 | 精确零比例均值 | 0.01 RMS以下均值 | 0.1 RMS以下均值 | 32 token内曾活跃通道比例均值 | 90%能量所需通道比例均值 |
|
||||
|---|---:|---:|---:|---:|---:|
|
||||
| mlp.gate_proj.output | 0.0000% | 0.7811% | 7.8005% | 100.0000% | 63.3063% |
|
||||
| mlp.silu_gate | 0.0000% | 0.5031% | 5.1789% | 100.0000% | 70.1228% |
|
||||
| mlp.gated_product | 0.0000% | 3.1636% | 21.0460% | 100.0000% | 54.8421% |
|
||||
| self_attn.q_proj.output | 0.0000% | 1.2760% | 12.4831% | 100.0000% | 44.0277% |
|
||||
| self_attn.k_proj.output | 0.0000% | 1.2245% | 12.0834% | 100.0000% | 53.4587% |
|
||||
| self_attn.v_proj.output | 0.0000% | 1.3741% | 13.4814% | 100.0000% | 59.9447% |
|
||||
|
||||
128通道块×文本观测共27600条,整个32 token窗口全为精确零的块观测数为0。
|
||||
|
||||
表中是整模块逐文本统计再取均值;每个分块的独立统计见 metrics.csv。阈值是各自RMS的比例;阈值下激活率=1−近零比例。能量集中不等于可删除或可替换。
|
||||
|
||||
仅测该模型、四条短文本;不推断所有语言/长上下文。SiLU不把负值整体截零,负数不等于静默。未执行删块/跳算的质量验证。权重和既有缓存全部保留。
|
||||
|
||||
CPU测量耗时268.6秒,峰值RSS151.6 MiB。
|
||||
|
||||
mlp.gated_product: 128通道块在0.1 RMS阈值上的激活率范围 10.47%–89.04%。
|
||||
self_attn.q_proj.output: 128通道块在0.1 RMS阈值上的激活率范围 75.49%–100.00%。
|
||||
self_attn.k_proj.output: 128通道块在0.1 RMS阈值上的激活率范围 81.20%–93.95%。
|
||||
self_attn.v_proj.output: 128通道块在0.1 RMS阈值上的激活率范围 76.66%–91.89%。
|
||||
@@ -0,0 +1,200 @@
|
||||
{
|
||||
"mlp.gate_proj.output": {
|
||||
"observations": 96,
|
||||
"zero_rate": {
|
||||
"min": 0.0,
|
||||
"mean": 0.0,
|
||||
"max": 0.0
|
||||
},
|
||||
"negative_rate": {
|
||||
"min": 0.6825663248697916,
|
||||
"mean": 0.8063652250501846,
|
||||
"max": 0.9117279052734375
|
||||
},
|
||||
"near_001_rms": {
|
||||
"min": 0.005289713541666667,
|
||||
"mean": 0.007811493343777125,
|
||||
"max": 0.010442097981770834
|
||||
},
|
||||
"near_01_rms": {
|
||||
"min": 0.053070068359375,
|
||||
"mean": 0.07800536685519749,
|
||||
"max": 0.10291544596354167
|
||||
},
|
||||
"ever_active_001": {
|
||||
"min": 1.0,
|
||||
"mean": 1.0,
|
||||
"max": 1.0
|
||||
},
|
||||
"energy90_channel_fraction": {
|
||||
"min": 0.5314127604166666,
|
||||
"mean": 0.6330634223090278,
|
||||
"max": 0.78955078125
|
||||
}
|
||||
},
|
||||
"mlp.silu_gate": {
|
||||
"observations": 96,
|
||||
"zero_rate": {
|
||||
"min": 0.0,
|
||||
"mean": 0.0,
|
||||
"max": 0.0
|
||||
},
|
||||
"negative_rate": {
|
||||
"min": 0.6825663248697916,
|
||||
"mean": 0.8063652250501846,
|
||||
"max": 0.9117279052734375
|
||||
},
|
||||
"near_001_rms": {
|
||||
"min": 0.0018768310546875,
|
||||
"mean": 0.0050310028923882385,
|
||||
"max": 0.0082244873046875
|
||||
},
|
||||
"near_01_rms": {
|
||||
"min": 0.020375569661458332,
|
||||
"mean": 0.05178917778862848,
|
||||
"max": 0.09897359212239583
|
||||
},
|
||||
"ever_active_001": {
|
||||
"min": 1.0,
|
||||
"mean": 1.0,
|
||||
"max": 1.0
|
||||
},
|
||||
"energy90_channel_fraction": {
|
||||
"min": 0.04736328125,
|
||||
"mean": 0.7012278238932291,
|
||||
"max": 0.8186848958333334
|
||||
}
|
||||
},
|
||||
"mlp.gated_product": {
|
||||
"observations": 96,
|
||||
"zero_rate": {
|
||||
"min": 0.0,
|
||||
"mean": 0.0,
|
||||
"max": 0.0
|
||||
},
|
||||
"negative_rate": {
|
||||
"min": 0.4942118326822917,
|
||||
"mean": 0.5002292527092828,
|
||||
"max": 0.5078125
|
||||
},
|
||||
"near_001_rms": {
|
||||
"min": 0.020960489908854168,
|
||||
"mean": 0.03163560231526693,
|
||||
"max": 0.07338460286458333
|
||||
},
|
||||
"near_01_rms": {
|
||||
"min": 0.16080220540364584,
|
||||
"mean": 0.21046002705891928,
|
||||
"max": 0.4075215657552083
|
||||
},
|
||||
"ever_active_001": {
|
||||
"min": 1.0,
|
||||
"mean": 1.0,
|
||||
"max": 1.0
|
||||
},
|
||||
"energy90_channel_fraction": {
|
||||
"min": 0.06380208333333333,
|
||||
"mean": 0.5484212239583334,
|
||||
"max": 0.7263997395833334
|
||||
}
|
||||
},
|
||||
"self_attn.q_proj.output": {
|
||||
"observations": 24,
|
||||
"zero_rate": {
|
||||
"min": 0.0,
|
||||
"mean": 0.0,
|
||||
"max": 0.0
|
||||
},
|
||||
"negative_rate": {
|
||||
"min": 0.6834945678710938,
|
||||
"mean": 0.7360480626424154,
|
||||
"max": 0.7523574829101562
|
||||
},
|
||||
"near_001_rms": {
|
||||
"min": 0.01090240478515625,
|
||||
"mean": 0.012759526570638021,
|
||||
"max": 0.01556396484375
|
||||
},
|
||||
"near_01_rms": {
|
||||
"min": 0.106048583984375,
|
||||
"mean": 0.1248311996459961,
|
||||
"max": 0.148590087890625
|
||||
},
|
||||
"ever_active_001": {
|
||||
"min": 1.0,
|
||||
"mean": 1.0,
|
||||
"max": 1.0
|
||||
},
|
||||
"energy90_channel_fraction": {
|
||||
"min": 0.413330078125,
|
||||
"mean": 0.440277099609375,
|
||||
"max": 0.4931640625
|
||||
}
|
||||
},
|
||||
"self_attn.k_proj.output": {
|
||||
"observations": 24,
|
||||
"zero_rate": {
|
||||
"min": 0.0,
|
||||
"mean": 0.0,
|
||||
"max": 0.0
|
||||
},
|
||||
"negative_rate": {
|
||||
"min": 0.47601318359375,
|
||||
"mean": 0.49783579508463544,
|
||||
"max": 0.52325439453125
|
||||
},
|
||||
"near_001_rms": {
|
||||
"min": 0.00909423828125,
|
||||
"mean": 0.01224517822265625,
|
||||
"max": 0.01629638671875
|
||||
},
|
||||
"near_01_rms": {
|
||||
"min": 0.095458984375,
|
||||
"mean": 0.1208343505859375,
|
||||
"max": 0.15106201171875
|
||||
},
|
||||
"ever_active_001": {
|
||||
"min": 1.0,
|
||||
"mean": 1.0,
|
||||
"max": 1.0
|
||||
},
|
||||
"energy90_channel_fraction": {
|
||||
"min": 0.41015625,
|
||||
"mean": 0.5345865885416666,
|
||||
"max": 0.65234375
|
||||
}
|
||||
},
|
||||
"self_attn.v_proj.output": {
|
||||
"observations": 24,
|
||||
"zero_rate": {
|
||||
"min": 0.0,
|
||||
"mean": 0.0,
|
||||
"max": 0.0
|
||||
},
|
||||
"negative_rate": {
|
||||
"min": 0.49267578125,
|
||||
"mean": 0.5059967041015625,
|
||||
"max": 0.51666259765625
|
||||
},
|
||||
"near_001_rms": {
|
||||
"min": 0.0084228515625,
|
||||
"mean": 0.01374053955078125,
|
||||
"max": 0.02447509765625
|
||||
},
|
||||
"near_01_rms": {
|
||||
"min": 0.087890625,
|
||||
"mean": 0.1348139444986979,
|
||||
"max": 0.22296142578125
|
||||
},
|
||||
"ever_active_001": {
|
||||
"min": 1.0,
|
||||
"mean": 1.0,
|
||||
"max": 1.0
|
||||
},
|
||||
"energy90_channel_fraction": {
|
||||
"min": 0.291015625,
|
||||
"mean": 0.5994466145833334,
|
||||
"max": 0.732421875
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"passed": true,
|
||||
"rows": 83616,
|
||||
"layers": 24,
|
||||
"samples": 4,
|
||||
"all_zero_128_blocks": 0
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"REPORT.md": "f7f05bdbf9c9d096fe685ebb49ee15ff9866a99071302f9d7710b99b1a2e7db4",
|
||||
"aggregates.json": "57dfef79b14e73dafd39840661abacd8b44447884e640bb40b86f90ec441ee4d",
|
||||
"audit.json": "2a67fde20f6765d0dbfa783ff31c548f8135af5d74b6fc0e27a3e71c9cbdffb1",
|
||||
"figures/block_activity.pdf": "354cbc89dfc6da6d6611c6effc9dfefc6762e3da1d52bfba89cc11be8c8a9247",
|
||||
"figures/block_activity.png": "ddcfa1f0de30f4f8bdece16b3451ca1b5bf419fac5a5bb9bb944301983efaeec",
|
||||
"figures/block_activity.svg": "da85920dd0fc32ba439b650c8b695757d42eb72768b4017a78109cb8a2f24216",
|
||||
"figures/mlp_activation.pdf": "6eef102d1ecc7c21206da862f79d4edaed77a695f7c46d53550c3dc6f9087ee5",
|
||||
"figures/mlp_activation.png": "0e1a01ea5b21274eaa757c1c9cd493524003220eadcf7aa378e0eb39a37a7c40",
|
||||
"figures/mlp_activation.svg": "d7b0a67d2d1d501e6fa70aa4a38010bead93a450423e5cd6b3b1284794353c8f",
|
||||
"final-tests.txt": "7b52cfeffca483471297e30aa9658bc2c5c6585b682f5ee5fbbcc2e1b2b8abe4",
|
||||
"first-attempt.txt": "7a1f686db3b7412b681d516bdd83bb8ed7ab2a758a44a2d84c4c7968017d9c91",
|
||||
"full-tests.txt": "55fe658a01d15ed380f2b5cd01058f2374997ffde945025262e92fd966f0dc3b",
|
||||
"metrics.csv": "8f6205e7f446f83567485275f57f63ce64233eee711a4be89c30b37182772e4d",
|
||||
"run.txt": "9fe01020a3ac92db51a17042eef6af73f854dd2e81220d7a04cd5a843c6ff9ba",
|
||||
"source-hashes.json": "34d1c164e787ec6ec5b77d4bc056da2e72365e1cd4b5089741f2b979a3c8beb3",
|
||||
"summary.json": "1e7c3bace11673d10cb927d689348bf00790a9b074ccafed6ce44d898410ef98"
|
||||
}
|
||||
|
After Width: | Height: | Size: 99 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 76 KiB |
@@ -0,0 +1,7 @@
|
||||
test_known_activity (tests.test_activation.ActivationTests.test_known_activity) ... ok
|
||||
test_zero_and_scale (tests.test_activation.ActivationTests.test_zero_and_scale) ... ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 2 tests in 0.002s
|
||||
|
||||
OK
|
||||
@@ -0,0 +1,24 @@
|
||||
completed fresh-zh-1 20904
|
||||
completed fresh-zh-2 41808
|
||||
completed fresh-en-1 62712
|
||||
Traceback (most recent call last):
|
||||
File "/opt/exp-model-parameter-similarity/activation_probe.py", line 44, in <module>
|
||||
if __name__=='__main__':main()
|
||||
~~~~^^
|
||||
File "/opt/exp-model-parameter-similarity/activation_probe.py", line 39, in main
|
||||
lm.forward(np.array([ids],dtype=np.int64)); print('completed',s['id'],len(lm.rows),flush=True)
|
||||
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/exp-model-parameter-similarity/functional/model.py", line 220, in forward
|
||||
h = h + self.mlp(n,donor)
|
||||
~~~~~~~~^^^^^^^^^
|
||||
File "/opt/exp-model-parameter-similarity/activation_probe.py", line 30, in mlp
|
||||
return self.linear(g*u,p+'down_proj')
|
||||
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/exp-model-parameter-similarity/activation_probe.py", line 22, in linear
|
||||
y=super().linear(x,name,rows); self.record(y,name+'.output')
|
||||
File "/opt/exp-model-parameter-similarity/functional/model.py", line 130, in linear
|
||||
self.guard()
|
||||
~~~~~~~~~~^^
|
||||
File "/opt/exp-model-parameter-similarity/functional/model.py", line 111, in guard
|
||||
raise MemoryError(f'Sustained host swap pressure plus constrained memory: available={available} KiB, process_swap={own_swap_kib} KiB')
|
||||
MemoryError: Sustained host swap pressure plus constrained memory: available=989040 KiB, process_swap=132360 KiB
|
||||
@@ -0,0 +1,33 @@
|
||||
test_known_activity (test_activation.ActivationTests.test_known_activity) ... ok
|
||||
test_zero_and_scale (test_activation.ActivationTests.test_zero_and_scale) ... ok
|
||||
test_assignment_against_exhaustive_and_inverse (test_crossqkv.CrossQKVTests.test_assignment_against_exhaustive_and_inverse) ... ok
|
||||
test_cached_mode_rejects_future_state_reuse (test_crossqkv.CrossQKVTests.test_cached_mode_rejects_future_state_reuse) ... ok
|
||||
test_controls_cover_multiple_projection_layers (test_crossqkv.CrossQKVTests.test_controls_cover_multiple_projection_layers) ... ok
|
||||
test_head_matrix_metrics_and_gram_are_diagnostic (test_crossqkv.CrossQKVTests.test_head_matrix_metrics_and_gram_are_diagnostic) ... ok
|
||||
test_probability_identity_and_nontrivial_queries (test_crossqkv.CrossQKVTests.test_probability_identity_and_nontrivial_queries) ... ok
|
||||
test_profile_matches_canonical_and_head_sum (test_crossqkv.CrossQKVTests.test_profile_matches_canonical_and_head_sum) ... ok
|
||||
test_recipient_value_gate_output_and_gqa_group_stay_fixed (test_crossqkv.CrossQKVTests.test_recipient_value_gate_output_and_gqa_group_stay_fixed) ... ok
|
||||
test_topk_tail_rank_can_change_with_tiny_probability_difference (test_crossqkv.CrossQKVTests.test_topk_tail_rank_can_change_with_tiny_probability_difference) ... ok
|
||||
test_causal_convolution_and_norm_boundary (test_functional.FunctionalTests.test_causal_convolution_and_norm_boundary) ... ok
|
||||
test_causality_and_identical_function_metrics (test_functional.FunctionalTests.test_causality_and_identical_function_metrics) ... ok
|
||||
test_neuron_function_metrics_and_targeted_replacement (test_functional.FunctionalTests.test_neuron_function_metrics_and_targeted_replacement) ... ok
|
||||
test_nonrotary_gain_identity_and_rotary_negative_control (test_functional.FunctionalTests.test_nonrotary_gain_identity_and_rotary_negative_control) ... ok
|
||||
test_streamed_projection_embedding_and_output_head (test_functional.FunctionalTests.test_streamed_projection_embedding_and_output_head) ... ok
|
||||
test_uniform_rmsnorm_function_bound_is_tight (test_functional.FunctionalTests.test_uniform_rmsnorm_function_bound_is_tight) ... ok
|
||||
test_3d_reader_and_exact_block (test_pilot.PilotTests.test_3d_reader_and_exact_block) ... ok
|
||||
test_bfloat16 (test_pilot.PilotTests.test_bfloat16) ... ok
|
||||
test_directional_replacement_error_and_scaling (test_pilot.PilotTests.test_directional_replacement_error_and_scaling) ... ok
|
||||
test_end_to_end_synthetic_groups_and_savings (test_pilot.PilotTests.test_end_to_end_synthetic_groups_and_savings) ... Inventory: 4 tensors, 33792 bytes
|
||||
tensor: sampling 4 objects
|
||||
block: sampling 22 objects
|
||||
block: verified 100/109
|
||||
{"model": "synthetic", "revision": "test", "tensor_count": 4, "parameter_count": 8448, "model_weight_bytes": 33792, "ndim_counts": {"2": 2, "3": 2}, "elapsed_seconds": 0.3087193910032511, "analysis_budget_seconds": 60, "peak_rss_kib": 57700, "python": "3.14.4", "numpy": "2.5.4", "seed": 20261109, "limitations": ["No inference or functional equivalence measured", "No exhaustive pair search", "Block search uses per-role/shape/scale reservoirs of 256", "Different block scales overlap; savings must not be added", "Block savings count only verified disjoint sampled blocks, no extrapolation", "Spectral probes use aligned bounded subvolumes, not whole tensors", "Shared encoding is theoretical, not a runnable compressed checkpoint", "No cross-role grouping, neuron permutation alignment, or training"], "completed": true}
|
||||
ok
|
||||
test_no_transitive_chaining (test_pilot.PilotTests.test_no_transitive_chaining) ... ok
|
||||
test_ranged_download_preserves_prefix (test_pilot.PilotTests.test_ranged_download_preserves_prefix) ... Weight download 36/36 bytes (100.0%)
|
||||
ok
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Ran 22 tests in 33.253s
|
||||
|
||||
OK
|
||||
@@ -0,0 +1,4 @@
|
||||
completed fresh-zh-1 20904
|
||||
completed fresh-zh-2 20904
|
||||
completed fresh-en-1 20904
|
||||
completed fresh-en-2 20904
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"activation/report.py": "e67bfa4af69e43cdceb803b77fe6a6dcc151163e72b3ff2bb7e6b69e7c6fa1fc",
|
||||
"activation/audit.py": "7dc8af7c31de379a50bdcbd3c41243eb190e6a50e8ec00a30182e82a34e73627",
|
||||
"activation/run.py": "cba62a2d8b6344625f233309b166b091028154890d93e48278eb338cbcd19b18",
|
||||
"activation/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"tests/test_activation.py": "dee1756b63cd03c2051cdc92d678d2e27aff639fbfd3d3cb3169140760da4c68",
|
||||
"functional/model.py": "48a2a97d0445dc6e08ac7f27a935637a7553417d0982eb94122d6cb02bbb499c"
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
{
|
||||
"completed": true,
|
||||
"elapsed_seconds": 268.55615069903433,
|
||||
"peak_rss_kib": 155288,
|
||||
"config_activation": "silu",
|
||||
"layer_count": 24,
|
||||
"samples": [
|
||||
{
|
||||
"id": "fresh-zh-1",
|
||||
"language": "zh",
|
||||
"text": "\u690d\u7269\u5b66\u5bb6\u5728\u4e0d\u540c\u6d77\u62d4\u91c7\u96c6\u4e86\u53f6\u7247\u6837\u672c\uff0c\u5e76\u4e3a\u6bcf\u4e00\u4efd\u6807\u672c\u8bb0\u5f55\u6e29\u5ea6\u3001\u5149\u7167\u548c\u571f\u58e4\u6e7f\u5ea6\u3002\u56de\u5230\u5b9e\u9a8c\u5ba4\u540e\uff0c\u5979\u6309\u5730\u70b9\u6574\u7406\u6807\u7b7e\uff0c\u5148\u6838\u5bf9\u7f3a\u5931\u8bb0\u5f55\uff0c\u518d\u6bd4\u8f83\u4e0d\u540c\u73af\u5883\u4e2d\u7684\u53f6\u7247\u5f62\u72b6\u3002",
|
||||
"token_ids": [
|
||||
99951,
|
||||
101071,
|
||||
115802,
|
||||
111685,
|
||||
102099,
|
||||
95759,
|
||||
111583,
|
||||
109928,
|
||||
3709,
|
||||
115026,
|
||||
134176,
|
||||
116599,
|
||||
98151,
|
||||
99472,
|
||||
5205,
|
||||
114180,
|
||||
95793,
|
||||
104074,
|
||||
102454,
|
||||
1710,
|
||||
103744,
|
||||
103911,
|
||||
95946,
|
||||
3709,
|
||||
96343,
|
||||
96656,
|
||||
100560,
|
||||
99946,
|
||||
101659,
|
||||
3709,
|
||||
96218,
|
||||
113089
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "fresh-zh-2",
|
||||
"language": "zh",
|
||||
"text": "\u5982\u679c\u4e00\u4e2a\u76d2\u5b50\u91cc\u6709\u5341\u4e8c\u679a\u84dd\u8272\u68cb\u5b50\u548c\u516b\u679a\u767d\u8272\u68cb\u5b50\uff0c\u968f\u673a\u53d6\u51fa\u4e00\u679a\u540e\u4e0d\u653e\u56de\uff0c\u7b2c\u4e8c\u6b21\u53d6\u5230\u84dd\u8272\u7684\u6982\u7387\u9700\u8981\u6839\u636e\u7b2c\u4e00\u6b21\u7684\u7ed3\u679c\u5206\u522b\u8ba1\u7b97\u3002\u8bf7\u5148\u5217\u51fa\u5404\u4e2a\u4e8b\u4ef6\uff0c\u518d\u68c0\u67e5\u5b83\u4eec\u7684\u6982\u7387\u4e4b\u548c\u3002",
|
||||
"token_ids": [
|
||||
127356,
|
||||
98996,
|
||||
98970,
|
||||
95762,
|
||||
98175,
|
||||
101184,
|
||||
104145,
|
||||
99357,
|
||||
111324,
|
||||
96702,
|
||||
101184,
|
||||
103828,
|
||||
129730,
|
||||
3709,
|
||||
102038,
|
||||
96284,
|
||||
98938,
|
||||
101184,
|
||||
95946,
|
||||
122271,
|
||||
96120,
|
||||
3709,
|
||||
109387,
|
||||
96284,
|
||||
95839,
|
||||
116981,
|
||||
104514,
|
||||
122501,
|
||||
103720,
|
||||
109146,
|
||||
99446,
|
||||
97792
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "fresh-en-1",
|
||||
"language": "en",
|
||||
"text": "A technician recorded the vibration of a small motor before and after replacing its bearings. She used the same mounting position and sampling interval for both measurements. The final notebook included the raw traces, instrument settings, and a brief explanation of unusual observations.",
|
||||
"token_ids": [
|
||||
32,
|
||||
51715,
|
||||
12076,
|
||||
279,
|
||||
46219,
|
||||
314,
|
||||
264,
|
||||
2526,
|
||||
8604,
|
||||
1518,
|
||||
321,
|
||||
1238,
|
||||
24101,
|
||||
1141,
|
||||
33309,
|
||||
13,
|
||||
2838,
|
||||
1429,
|
||||
279,
|
||||
1788,
|
||||
32525,
|
||||
2234,
|
||||
321,
|
||||
24102,
|
||||
9581,
|
||||
364,
|
||||
2107,
|
||||
20934,
|
||||
13,
|
||||
561,
|
||||
1534,
|
||||
35935
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "fresh-en-2",
|
||||
"language": "en",
|
||||
"text": "The function walks through a list of integers and stores each running total in a new list. An empty input should return an empty result. Before changing the implementation, compare a short example by hand and make sure negative numbers preserve the intended behavior.",
|
||||
"token_ids": [
|
||||
760,
|
||||
709,
|
||||
21780,
|
||||
1472,
|
||||
264,
|
||||
1103,
|
||||
314,
|
||||
24959,
|
||||
321,
|
||||
10220,
|
||||
1754,
|
||||
4162,
|
||||
2702,
|
||||
303,
|
||||
264,
|
||||
491,
|
||||
1103,
|
||||
13,
|
||||
1473,
|
||||
4147,
|
||||
1879,
|
||||
1220,
|
||||
460,
|
||||
449,
|
||||
4147,
|
||||
1067,
|
||||
13,
|
||||
12851,
|
||||
9722,
|
||||
279,
|
||||
7873,
|
||||
11
|
||||
]
|
||||
}
|
||||
],
|
||||
"rows": 83616,
|
||||
"block_widths": [
|
||||
64,
|
||||
128
|
||||
],
|
||||
"threshold_reference": "RMS within each sample/module/block, thresholds 0.01 and 0.1; exact zero measured separately",
|
||||
"training": false,
|
||||
"weights_deleted": false,
|
||||
"limits": [
|
||||
"4 short texts, 32 tokens each, descriptive only",
|
||||
"Block is contiguous output channels, not Transformer block",
|
||||
"Small output does not prove removable computation or parameter interchangeability",
|
||||
"All samples previously used; no generalization claim",
|
||||
"Relative threshold differs between blocks; width=0 is whole module reference"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
# Cross-layer QKV scientific delivery
|
||||
|
||||
All plot CSV/JSON, the selected fresh probability matrices, protocols, reference tests and failure logs are included.
|
||||
Large intermediate profiles remain on 8.211.154.134 with locations/sizes/SHA256 in external-caches.json.
|
||||
The fixed checkpoint and all caches are retained until explicit user deletion. No weights are committed.
|
||||
The primary protocol has no passing candidate. The later fixed conditional audit is exploratory and its strict fresh checks failed; observed readout overlap is reported without relabeling it a complete pass.
|
||||
@@ -0,0 +1,39 @@
|
||||
# Cross-layer QKV CPU study
|
||||
|
||||
Primary protocol and exploratory addendum are reported separately; no post-hoc success relabeling.
|
||||
- Primary state: completed; selected candidate: [].
|
||||
- Candidate counts: {'full_attention': 15, 'qkv_head': 960, 'qk_map': 30, 'qk_head': 960, 'v_group': 60}.
|
||||
- Passing counts (approximate tier, all gates): {'full_attention': 0, 'qkv_head': 0, 'qk_map': 0, 'qk_head': 0, 'v_group': 0}.
|
||||
- Primary computation seconds: 74.78326310915872; peak RSS KiB: 172056.
|
||||
|
||||
## What was measured
|
||||
|
||||
Six full-attention layers, indices 3/7/11/15/19/23; all 15 cross-layer pairs. No within-layer Q/K/V interchange.
|
||||
Same normalized hidden inputs from both source layers; frozen Q/K norm, partial RoPE, GQA, V, output gate and O.
|
||||
QK head probabilities, whole-map injection in original/frozen matched head order, direct V functions, complete head contributions in residual coordinates, and complete branches were separated.
|
||||
Primary metrics use queries 7–31. Discrete matching uses calibration only; no continuous alignment, scale fitting or training.
|
||||
No primary candidate passed, so primary validation/fresh/network intervention stages were not entered.
|
||||
|
||||
- full_attention: n=15, best worst output error=1.8534952718777882, minimum worst-text mean JS=None, best worst direct V error=None.
|
||||
- qkv_head: n=960, best worst output error=1.3442678606109162, minimum worst-text mean JS=0.08609102699674716, best worst direct V error=None.
|
||||
- qk_map: n=30, best worst output error=0.7028184861876081, minimum worst-text mean JS=0.1696159433927246, best worst direct V error=None.
|
||||
- qk_head: n=960, best worst output error=None, minimum worst-text mean JS=0.08609102699674716, best worst direct V error=None.
|
||||
- v_group: n=60, best worst output error=None, minimum worst-text mean JS=None, best worst direct V error=1.503141145681371.
|
||||
|
||||
## Exploratory metric audit: frozen one-source candidate
|
||||
|
||||
After inspecting primary calibration results, one candidate was frozen: layer3 head7 vs layer23 head6 on H23.
|
||||
This addendum audited the instability of unweighted top-k tail ranking; original primary results were not changed.
|
||||
Four old validation and four previously unused fresh texts were evaluated with frozen extra gates and no candidate fallback.
|
||||
- Addendum fresh function pass: False.
|
||||
- Overall addendum state: completed; primary unchanged/negative: True.
|
||||
Fresh probability-mass and fixed V/gate/O readout measurements show conditional behavioral overlap; strict fresh mean-JS, row-JS-P95 and row-TV-P95 limits still failed.
|
||||
No full-network substitution was run after that failure. V similarity, bidirectionality and complete QKV-head equivalence are not established.
|
||||
The actual-H3 cache probability is a separate different-input diagnostic, not the same-input function comparison.
|
||||
|
||||
## Limits and retention
|
||||
|
||||
This is a short text-only pilot, not proof of absence of repetition elsewhere. Exact arithmetic, matrix coordinates, retrieval behavior and final residual output are distinct questions.
|
||||
Centered value Gram CKA can be high even for independent Gaussian projections of common inputs; it is not substitution evidence.
|
||||
All weights and large profile caches remain on the authorized server. Git delivery includes all plot tables, probabilities, protocols and cache location/hash metadata.
|
||||
No GPU, new checkpoint download, model training, continuous R fitting or automatic weight/cache deletion.
|
||||
@@ -0,0 +1,55 @@
|
||||
[
|
||||
"DELIVERY.md",
|
||||
"REPORT.md",
|
||||
"calibration-output-metrics.csv",
|
||||
"calibration-probability-metrics.csv",
|
||||
"calibration-summary.json",
|
||||
"calibration-value-metrics.csv",
|
||||
"case-audit.log",
|
||||
"conditional-case-audit.json",
|
||||
"conditional-fresh-baseline-token-nll.npy",
|
||||
"conditional-fresh-probabilities.npz",
|
||||
"conditional-fresh-samples.json",
|
||||
"conditional-fresh-source-diagnostic.csv",
|
||||
"conditional-function-metrics.csv",
|
||||
"conditional-protocol.json",
|
||||
"conditional-status.json",
|
||||
"conditional.log",
|
||||
"controls.csv",
|
||||
"external-caches.json",
|
||||
"figures/conditional_cross_layer_probability_maps.pdf",
|
||||
"figures/conditional_cross_layer_probability_maps.png",
|
||||
"figures/conditional_cross_layer_probability_maps.svg",
|
||||
"figures/conditional_probability_mass_and_readout.pdf",
|
||||
"figures/conditional_probability_mass_and_readout.png",
|
||||
"figures/conditional_probability_mass_and_readout.svg",
|
||||
"figures/cross_layer_output_errors.pdf",
|
||||
"figures/cross_layer_output_errors.png",
|
||||
"figures/cross_layer_output_errors.svg",
|
||||
"figures/cross_layer_qk_divergence.pdf",
|
||||
"figures/cross_layer_qk_divergence.png",
|
||||
"figures/cross_layer_qk_divergence.svg",
|
||||
"figures/value_geometry_and_direct_error.pdf",
|
||||
"figures/value_geometry_and_direct_error.png",
|
||||
"figures/value_geometry_and_direct_error.svg",
|
||||
"final-source-hashes.json",
|
||||
"final-tests.txt",
|
||||
"first-attempt-error.txt",
|
||||
"first-attempt-protocol.json",
|
||||
"first-attempt-status.json",
|
||||
"head-assignment-costs.csv",
|
||||
"preflight-tests.txt",
|
||||
"protocol.json",
|
||||
"raw-qk-diagnostics.csv",
|
||||
"report.log",
|
||||
"retention-policy.json",
|
||||
"run.log",
|
||||
"selection.json",
|
||||
"source-conditioned-retrieval-diagnostic.csv",
|
||||
"source-provenance.json",
|
||||
"source-samples.json",
|
||||
"status.json",
|
||||
"checksums.json",
|
||||
"audit-validation.json",
|
||||
"archive-files.json"
|
||||
]
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"passed": true,
|
||||
"validated_unix": 1794210762.196902,
|
||||
"checksummed_files": 50,
|
||||
"primary_counts_rechecked": {
|
||||
"full_attention": 15,
|
||||
"qkv_head": 960,
|
||||
"qk_map": 30,
|
||||
"qk_head": 960,
|
||||
"v_group": 60
|
||||
},
|
||||
"fresh_probabilities_independently_recomputed": true,
|
||||
"no_unrun_network_quality_claims": true,
|
||||
"all_weights_and_caches_retained": true
|
||||
}
|
||||
@@ -0,0 +1,481 @@
|
||||
candidate,source_input_layer,sample,error_a,error_b,cosine,rms_a,rms_b,centered_value_gram_cka,active
|
||||
v_group_3_7_0_0,3,cal-zh-1,1.4323826812587181,1.391162916196307,0.004087494131477744,0.5761960614907249,0.5932685883731068,0.9141337138481168,True
|
||||
v_group_3_7_0_0,3,cal-zh-2,1.4315023349091076,1.3965811072928411,0.0007004356520309391,0.5608288080244765,0.5748522187354705,0.8914788855640744,True
|
||||
v_group_3_7_0_0,3,cal-en-1,1.4198510512349787,1.4089214047816607,-0.00019941139583572943,0.5824392419751171,0.5869574890354016,0.8887315205154036,True
|
||||
v_group_3_7_0_0,3,cal-en-2,1.4413498845898522,1.3809634694068311,0.005690234368731806,0.5614481775883549,0.5859990390026425,0.8964569996356869,True
|
||||
v_group_3_7_0_0,7,cal-zh-1,1.6963395602861697,1.2493476632949505,-0.01252070998313501,0.5020436862695836,0.6816649928851196,0.936213145998887,True
|
||||
v_group_3_7_0_0,7,cal-zh-2,1.783674462312341,1.2403252294359302,-0.0394450057421654,0.49616866008890836,0.7135252488597659,0.9104815341866702,True
|
||||
v_group_3_7_0_0,7,cal-en-1,1.7803870260462265,1.228675420652782,-0.02418558124608226,0.49476267035982435,0.7169257433445044,0.9494786353698025,True
|
||||
v_group_3_7_0_0,7,cal-en-2,1.7346992825861849,1.2168140830744298,0.008128163689859857,0.49586288029244224,0.7069058409737389,0.9467241512126245,True
|
||||
v_group_3_7_0_1,3,cal-zh-1,1.4122332396976491,1.3840843809636179,0.022877700786288705,0.5761960614907249,0.5879144666407892,0.8673520794273484,True
|
||||
v_group_3_7_0_1,3,cal-zh-2,1.4246220179743523,1.3606257559393165,0.03186772530944765,0.5608288080244765,0.587207073464817,0.8352609808994033,True
|
||||
v_group_3_7_0_1,3,cal-en-1,1.410127789956694,1.3760069924822325,0.03012715587770514,0.5824392419751171,0.5968819675754875,0.8504517936409285,True
|
||||
v_group_3_7_0_1,3,cal-en-2,1.4789947347079742,1.394006486926224,-0.029112440859667753,0.5614481775883549,0.5956779299467573,0.8422380725145518,True
|
||||
v_group_3_7_0_1,7,cal-zh-1,1.6416328511443525,1.249222697289008,0.012160975244733137,0.5020436862695836,0.6597473852166851,0.888194449720632,True
|
||||
v_group_3_7_0_1,7,cal-zh-2,1.7171001886812838,1.2328132715834974,-0.003035423256108088,0.49616866008890836,0.691078948851745,0.8511856446986377,True
|
||||
v_group_3_7_0_1,7,cal-en-1,1.6975117144460503,1.2202263696199713,0.019314366520048806,0.49476267035982435,0.6882865751114527,0.9055205753071466,True
|
||||
v_group_3_7_0_1,7,cal-en-2,1.677570311727246,1.2641925616392775,-0.02009846248489318,0.49586288029244224,0.658004857731096,0.9187740372129736,True
|
||||
v_group_3_7_1_0,3,cal-zh-1,1.2551919930291116,1.6125843558323454,0.019500590092200634,0.7621906845569104,0.5932685883731068,0.8935241963633521,True
|
||||
v_group_3_7_1_0,3,cal-zh-2,1.2247004018878516,1.6360862244082828,0.040373391519243074,0.7679492835095556,0.5748522187354705,0.8828610066325204,True
|
||||
v_group_3_7_1_0,3,cal-en-1,1.2465049303194524,1.6352756434922011,0.017884652113762084,0.7700228552958449,0.5869574890354016,0.8835260267355238,True
|
||||
v_group_3_7_1_0,3,cal-en-2,1.227495380625793,1.5897290332554639,0.05792801279680993,0.758927243609968,0.5859990390026425,0.8774464319384544,True
|
||||
v_group_3_7_1_0,7,cal-zh-1,1.5375855700606327,1.3192273629755458,-0.0024594416032465097,0.5848592289800942,0.6816649928851196,0.9110423917236689,True
|
||||
v_group_3_7_1_0,7,cal-zh-2,1.5400479322281633,1.2960729603050853,0.016903418811958844,0.6004883109086829,0.7135252488597659,0.8993800369452146,True
|
||||
v_group_3_7_1_0,7,cal-en-1,1.5660778384621667,1.3127127138308519,-0.012292350388541947,0.6009391838946584,0.7169257433445044,0.9147634612973805,True
|
||||
v_group_3_7_1_0,7,cal-en-2,1.5439635918426586,1.2878067551358243,0.022337016250565965,0.5896240831459476,0.7069058409737389,0.888587863431183,True
|
||||
v_group_3_7_1_1,3,cal-zh-1,1.2368296713603184,1.6034646319911048,0.04228344157009311,0.7621906845569104,0.5879144666407892,0.9077851581778318,True
|
||||
v_group_3_7_1_1,3,cal-zh-2,1.2511641008169818,1.636272140091731,0.012598930483491767,0.7679492835095556,0.587207073464817,0.9166589704106202,True
|
||||
v_group_3_7_1_1,3,cal-en-1,1.2507273581929612,1.6135328320679603,0.02356715497811741,0.7700228552958449,0.5968819675754875,0.9130804712938935,True
|
||||
v_group_3_7_1_1,3,cal-en-2,1.2381470510050232,1.5774691009402373,0.05290613543912621,0.758927243609968,0.5956779299467573,0.9240128155349371,True
|
||||
v_group_3_7_1_1,7,cal-zh-1,1.4904553388827033,1.3212732325447607,0.022617830613847,0.5848592289800942,0.6597473852166851,0.9421372064058651,True
|
||||
v_group_3_7_1_1,7,cal-zh-2,1.5578379750756746,1.353627535431233,-0.04447828136744951,0.6004883109086829,0.691078948851745,0.9432112338272337,True
|
||||
v_group_3_7_1_1,7,cal-en-1,1.5174704505380823,1.3248950177227439,0.003978434635174957,0.6009391838946584,0.6882865751114527,0.9574705009683716,True
|
||||
v_group_3_7_1_1,7,cal-en-2,1.4526010565148506,1.3016447463286376,0.06064079689841443,0.5896240831459476,0.658004857731096,0.9369539426026078,True
|
||||
v_group_3_11_0_0,3,cal-zh-1,1.545731876865113,1.3321796238592016,-0.018522845423531893,0.5761960614907249,0.6685619593776916,0.8756763978316128,True
|
||||
v_group_3_11_0_0,3,cal-zh-2,1.5470683628818829,1.3144331710388135,-0.0034522119676936793,0.5608288080244765,0.6600871957618942,0.8312111317318915,True
|
||||
v_group_3_11_0_0,3,cal-en-1,1.5359687518041154,1.337419743712005,-0.017522238343721186,0.5824392419751171,0.6689062874272159,0.8514295431853922,True
|
||||
v_group_3_11_0_0,3,cal-en-2,1.5981070785678422,1.3228033899749945,-0.03906433847739744,0.5614481775883549,0.678297556275484,0.8609931982145157,True
|
||||
v_group_3_11_0_0,11,cal-zh-1,1.8558766812669003,1.2077676491340388,-0.02703519113187431,0.47660394729021455,0.732357877452556,0.9281854918344926,True
|
||||
v_group_3_11_0_0,11,cal-zh-2,1.9070399656592678,1.1905515524068482,-0.02216214984097279,0.48152706432896847,0.7713159118271558,0.9009126686293306,True
|
||||
v_group_3_11_0_0,11,cal-en-1,1.9649433369997293,1.2149150388129406,-0.0757967985719766,0.4710019987631518,0.7617752761439864,0.9284593184301129,True
|
||||
v_group_3_11_0_0,11,cal-en-2,1.816051490946273,1.2007469846444498,-0.0034990205676567426,0.4753499305805328,0.7189357634802654,0.9322387390641272,True
|
||||
v_group_3_11_0_1,3,cal-zh-1,1.4742917545701877,1.3813506047098822,-0.016136108165473173,0.5761960614907249,0.6149641514436552,0.9147552354265243,True
|
||||
v_group_3_11_0_1,3,cal-zh-2,1.4935415622688977,1.4142969214973058,-0.054669161372513195,0.5608288080244765,0.5922526743645153,0.8968566327016371,True
|
||||
v_group_3_11_0_1,3,cal-en-1,1.4585403630663745,1.3795147011064905,-0.004487044469038821,0.5824392419751171,0.6158043424786337,0.9086724105647803,True
|
||||
v_group_3_11_0_1,3,cal-en-2,1.4704862145295863,1.3316635025920516,0.025824387211512565,0.5614481775883549,0.6199777974761795,0.9109255414905518,True
|
||||
v_group_3_11_0_1,11,cal-zh-1,1.7816520595953853,1.2684892706710083,-0.07174324135673878,0.47660394729021455,0.6694123662959482,0.945197901422434,True
|
||||
v_group_3_11_0_1,11,cal-zh-2,1.8270643318093642,1.2191427240192836,-0.030768379589467938,0.48152706432896847,0.721638990007552,0.9016352620339282,True
|
||||
v_group_3_11_0_1,11,cal-en-1,1.8343265498401313,1.237157837039188,-0.05610472386098317,0.4710019987631518,0.6983518557556945,0.9386127427210832,True
|
||||
v_group_3_11_0_1,11,cal-en-2,1.7412738894452298,1.2287105534230272,-0.008363625143822783,0.4753499305805328,0.6736447572323523,0.9461439001028096,True
|
||||
v_group_3_11_1_0,3,cal-zh-1,1.3316483086426478,1.5181389274647665,-0.002211894565651883,0.7621906845569104,0.6685619593776916,0.9203009474331887,True
|
||||
v_group_3_11_1_0,3,cal-zh-2,1.3142937232337897,1.5290569633206037,0.0066605730090914484,0.7679492835095556,0.6600871957618942,0.9237051874774409,True
|
||||
v_group_3_11_1_0,3,cal-en-1,1.323314377279545,1.5233558637430424,0.0019859900809834166,0.7700228552958449,0.6689062874272159,0.9143113886105426,True
|
||||
v_group_3_11_1_0,3,cal-en-2,1.3407756813971123,1.5001545896307469,0.0006291125584721685,0.758927243609968,0.678297556275484,0.8972913064856486,True
|
||||
v_group_3_11_1_0,11,cal-zh-1,1.6636346860510371,1.2477573491350302,0.0037531394580707636,0.5492822020665206,0.732357877452556,0.9341091965460455,True
|
||||
v_group_3_11_1_0,11,cal-zh-2,1.6441348522412103,1.2433224523988717,0.01719955045145553,0.5832820767469004,0.7713159118271558,0.9189191545858412,True
|
||||
v_group_3_11_1_0,11,cal-en-1,1.6582601217818451,1.27162769706039,-0.018899836866295677,0.5841632005475906,0.7617752761439864,0.9351038553931905,True
|
||||
v_group_3_11_1_0,11,cal-en-2,1.6036170086466743,1.2678344767242498,0.011167818385050344,0.5683972810063781,0.7189357634802654,0.9319122717011493,True
|
||||
v_group_3_11_1_1,3,cal-zh-1,1.303340018677511,1.6153683409255541,-0.029564923887991205,0.7621906845569104,0.6149641514436552,0.8607357503716281,True
|
||||
v_group_3_11_1_1,3,cal-zh-2,1.279939914772841,1.659644579131303,-0.0281869407168636,0.7679492835095556,0.5922526743645153,0.8435413320061871,True
|
||||
v_group_3_11_1_1,3,cal-en-1,1.2834990546854077,1.6049312073382578,-0.004885626324319741,0.7700228552958449,0.6158043424786337,0.8305804512179791,True
|
||||
v_group_3_11_1_1,3,cal-en-2,1.2847451786249076,1.5726823139863475,0.010268682997527577,0.758927243609968,0.6199777974761795,0.8323118858139686,True
|
||||
v_group_3_11_1_1,11,cal-zh-1,1.5692761653627612,1.2876599106325475,0.009276876950231713,0.5492822020665206,0.6694123662959482,0.8818176429875604,True
|
||||
v_group_3_11_1_1,11,cal-zh-2,1.5952386906504594,1.2893900541320096,-0.005703359226245975,0.5832820767469004,0.721638990007552,0.8635290151276411,True
|
||||
v_group_3_11_1_1,11,cal-en-1,1.5508287491010548,1.2972502014700942,0.010074674554074877,0.5841632005475906,0.6983518557556945,0.8734384746226067,True
|
||||
v_group_3_11_1_1,11,cal-en-2,1.5323961989457926,1.2929809421865215,0.02378519370331129,0.5683972810063781,0.6736447572323523,0.8873665728217106,True
|
||||
v_group_3_15_0_0,3,cal-zh-1,1.791500515853225,1.2067929758512772,-0.0019176786741098729,0.5761960614907249,0.8553708565175171,0.9254656527514737,True
|
||||
v_group_3_15_0_0,3,cal-zh-2,1.7897355860467277,1.229056917134014,-0.028387697504211384,0.5608288080244765,0.8166711088874079,0.9268476837975197,True
|
||||
v_group_3_15_0_0,3,cal-en-1,1.7829159979339628,1.2215427277434603,-0.016604804688366417,0.5824392419751171,0.8501055417523247,0.9227239437453265,True
|
||||
v_group_3_15_0_0,3,cal-en-2,1.7617479544415051,1.208288624427455,0.00759935915417888,0.5614481775883549,0.8186207818184933,0.9252514335215619,True
|
||||
v_group_3_15_0_0,15,cal-zh-1,2.036606712671732,1.1628922350827764,-0.02301514814959651,0.5639769024542763,0.987709016088177,0.9149869997360587,True
|
||||
v_group_3_15_0_0,15,cal-zh-2,2.103230661697204,1.1371071720930161,-0.0006590280321260085,0.5572350246780882,1.0306801490991593,0.9253511593610628,True
|
||||
v_group_3_15_0_0,15,cal-en-1,2.157223519886969,1.1478268698522494,-0.032317924287390665,0.5584091688430112,1.0494730733248452,0.9030997889495451,True
|
||||
v_group_3_15_0_0,15,cal-en-2,1.9635527102676857,1.167488575669259,-0.00799266960055014,0.5622671993868973,0.945654892269824,0.882472148927542,True
|
||||
v_group_3_15_0_1,3,cal-zh-1,1.8657139942608747,1.165937493864953,0.024902979154005696,0.5761960614907249,0.9220194573190053,0.8825434291676424,True
|
||||
v_group_3_15_0_1,3,cal-zh-2,1.8818420459844138,1.1379290976459144,0.05851446344968765,0.5608288080244765,0.9274666002680805,0.8443884983013036,True
|
||||
v_group_3_15_0_1,3,cal-en-1,1.8197088825049808,1.190410861611396,0.00830733458220919,0.5824392419751171,0.8903395426910831,0.8694632700969815,True
|
||||
v_group_3_15_0_1,3,cal-en-2,1.8942475924736308,1.1641654701599264,0.018245443515102686,0.5614481775883549,0.9135487058805722,0.8419003239314065,True
|
||||
v_group_3_15_0_1,15,cal-zh-1,1.9648999460529704,1.1602615717161688,0.0020967317872275107,0.5639769024542763,0.955093413607095,0.8447568414417492,True
|
||||
v_group_3_15_0_1,15,cal-zh-2,1.975736095935673,1.1240283340522317,0.05293044857254968,0.5572350246780882,0.9794676155600762,0.8406012433784209,True
|
||||
v_group_3_15_0_1,15,cal-en-1,2.0132364149779187,1.1566595507722963,-0.006770385496697074,0.5584091688430112,0.9719451781828745,0.8538226880561681,True
|
||||
v_group_3_15_0_1,15,cal-en-2,1.980150570270239,1.1626702153928752,-0.005996802162759274,0.5622671993868973,0.9576006168989177,0.8112963317363142,True
|
||||
v_group_3_15_1_0,3,cal-zh-1,1.4975473640324488,1.334411433182741,0.007486683279052872,0.7621906845569104,0.8553708565175171,0.8615743964382445,True
|
||||
v_group_3_15_1_0,3,cal-zh-2,1.4634483122649817,1.3761403711075857,-0.005062645291039263,0.7679492835095556,0.8166711088874079,0.8140618872177604,True
|
||||
v_group_3_15_1_0,3,cal-en-1,1.4953627424995743,1.3544947446278646,-0.007831901208508888,0.7700228552958449,0.8501055417523247,0.8000478915622752,True
|
||||
v_group_3_15_1_0,3,cal-en-2,1.4807732424787996,1.3727957807636038,-0.013531876798680363,0.758927243609968,0.8186207818184933,0.8302489815080406,True
|
||||
v_group_3_15_1_0,15,cal-zh-1,1.8940317712787802,1.1844914824434871,-0.009529132877864789,0.6176944518196689,0.987709016088177,0.8708819870484904,True
|
||||
v_group_3_15_1_0,15,cal-zh-2,1.8942424776113322,1.18622767727384,-0.011956184502641203,0.6454407678682691,1.0306801490991593,0.8977428514931777,True
|
||||
v_group_3_15_1_0,15,cal-en-1,1.920278540690493,1.1857698162714376,-0.020036644889284454,0.6480484299380599,1.0494730733248452,0.900411248651334,True
|
||||
v_group_3_15_1_0,15,cal-en-2,1.7998109148693886,1.231771215526687,-0.03570461050025071,0.6471960284808532,0.945654892269824,0.882664328140647,True
|
||||
v_group_3_15_1_1,3,cal-zh-1,1.5597646636994704,1.289385042078844,0.012606461714600887,0.7621906845569104,0.9220194573190053,0.8674597935434188,True
|
||||
v_group_3_15_1_1,3,cal-zh-2,1.5776827848142696,1.3063331486581578,-0.012626641045929178,0.7679492835095556,0.9274666002680805,0.868800197864626,True
|
||||
v_group_3_15_1_1,3,cal-en-1,1.526190016173755,1.3199472084841237,0.003312407542480493,0.7700228552958449,0.8903395426910831,0.8577302724792217,True
|
||||
v_group_3_15_1_1,3,cal-en-2,1.5420765556276852,1.2810744542295573,0.029484164668036616,0.758927243609968,0.9135487058805722,0.8645827731479319,True
|
||||
v_group_3_15_1_1,15,cal-zh-1,1.8379777153583352,1.1886885839337136,0.0040885788864275276,0.6176944518196689,0.955093413607095,0.9159946788235969,True
|
||||
v_group_3_15_1_1,15,cal-zh-2,1.8407190052770024,1.212980469513883,-0.028133879377482626,0.6454407678682691,0.9794676155600762,0.9406664671137216,True
|
||||
v_group_3_15_1_1,15,cal-en-1,1.82170883650752,1.2146318308920743,-0.02307406765607393,0.6480484299380599,0.9719451781828745,0.9326076523331344,True
|
||||
v_group_3_15_1_1,15,cal-en-2,1.7823575681318298,1.2046094364092046,0.004210730883784706,0.6471960284808532,0.9576006168989177,0.9176616988431759,True
|
||||
v_group_3_19_0_0,3,cal-zh-1,2.1387778009797,1.1292745193776113,0.003336156828672862,0.5761960614907249,1.0912805736620155,0.9066868008588593,True
|
||||
v_group_3_19_0_0,3,cal-zh-2,2.230877966766892,1.126467313053981,-0.013823998548937181,0.5608288080244765,1.110676374228702,0.9156729393850706,True
|
||||
v_group_3_19_0_0,3,cal-en-1,2.111487213716288,1.1366617340640162,-0.0020512301200578047,0.5824392419751171,1.081951626716594,0.8973187153763751,True
|
||||
v_group_3_19_0_0,3,cal-en-2,2.115781896427422,1.1380726157748013,-0.005462158435846553,0.5614481775883549,1.0437839145394814,0.8877784194607925,True
|
||||
v_group_3_19_0_0,19,cal-zh-1,2.4530344316229806,1.0919863377130128,0.006436954796709541,0.5693041821940151,1.2788829976697977,0.8458814731915995,True
|
||||
v_group_3_19_0_0,19,cal-zh-2,2.562618507699084,1.0886131980634468,-0.0054370741489785605,0.5552008338472196,1.3069545131712863,0.7880326589670854,True
|
||||
v_group_3_19_0_0,19,cal-en-1,2.473107990375322,1.0922972357759582,0.0022177259102170175,0.5983192469333956,1.3546753227249124,0.7958869818601046,True
|
||||
v_group_3_19_0_0,19,cal-en-2,2.339789708122884,1.1024193573685226,0.00707287135559412,0.581786895805997,1.2347923519566644,0.7592303602956822,True
|
||||
v_group_3_19_0_1,3,cal-zh-1,2.5134890066406674,1.085272509387548,0.009978407283295085,0.5761960614907249,1.334468950147724,0.8841694901431139,True
|
||||
v_group_3_19_0_1,3,cal-zh-2,2.564902257153027,1.0891446228651234,-0.006973067658143293,0.5608288080244765,1.3207346805737825,0.8649932997128789,True
|
||||
v_group_3_19_0_1,3,cal-en-1,2.3997670525347545,1.099130993160828,0.0018443078356558523,0.5824392419751171,1.2716578021112042,0.8679497231218936,True
|
||||
v_group_3_19_0_1,3,cal-en-2,2.498665759627334,1.0880715532840664,0.006575329430980649,0.5614481775883549,1.2893190093160507,0.831343764713669,True
|
||||
v_group_3_19_0_1,19,cal-zh-1,3.2390007000979524,1.039215222302559,0.035800606611788834,0.5693041821940151,1.774393412569017,0.7766259032955134,True
|
||||
v_group_3_19_0_1,19,cal-zh-2,3.389171924784933,1.0562936484258603,-0.02987135541397067,0.5552008338472196,1.7813901290577085,0.7241372787510743,True
|
||||
v_group_3_19_0_1,19,cal-en-1,3.1645117976855226,1.0415934447391595,0.035579184049615326,0.5983192469333956,1.8177805604154877,0.71602545983148,True
|
||||
v_group_3_19_0_1,19,cal-en-2,3.1803325477918793,1.0416932020429799,0.0338264517618455,0.581786895805997,1.7762195212389158,0.6929904324288088,True
|
||||
v_group_3_19_1_0,3,cal-zh-1,1.7656749919567738,1.2332126707877762,-0.023623683019394534,0.7621906845569104,1.0912805736620155,0.7836174881235206,True
|
||||
v_group_3_19_1_0,3,cal-zh-2,1.761528739729888,1.2179648050013414,-0.003883209702188474,0.7679492835095556,1.110676374228702,0.7770512096119847,True
|
||||
v_group_3_19_1_0,3,cal-en-1,1.7267683130301756,1.2289376290037906,-0.0026511184669404967,0.7700228552958449,1.081951626716594,0.7680729586419178,True
|
||||
v_group_3_19_1_0,3,cal-en-2,1.7047670256892233,1.239522971930746,-0.005332191083900878,0.758927243609968,1.0437839145394814,0.8023287544316657,True
|
||||
v_group_3_19_1_0,19,cal-zh-1,2.361860213006372,1.1071522538550322,-0.006450524188197151,0.5994928004162863,1.2788829976697977,0.8303267596452917,True
|
||||
v_group_3_19_1_0,19,cal-zh-2,2.331299796039782,1.108567495337039,-0.0029521601677554954,0.6214761797890229,1.3069545131712863,0.861109794701705,True
|
||||
v_group_3_19_1_0,19,cal-en-1,2.361653062589342,1.1087694696109487,-0.009531730695334684,0.6360047810857993,1.3546753227249124,0.858432476308045,True
|
||||
v_group_3_19_1_0,19,cal-en-2,2.2729252880770194,1.1141519366560488,-0.0010751499844431022,0.605275632031235,1.2347923519566644,0.8203210787260378,True
|
||||
v_group_3_19_1_1,3,cal-zh-1,2.0482832151475887,1.1698903790507447,-0.037138409544712446,0.7621906845569104,1.334468950147724,0.8688700928957473,True
|
||||
v_group_3_19_1_1,3,cal-zh-2,2.023566294496786,1.1766150377135338,-0.039841104529857105,0.7679492835095556,1.3207346805737825,0.8640921980657612,True
|
||||
v_group_3_19_1_1,3,cal-en-1,1.9575132957313441,1.185326724497866,-0.03165571090655481,0.7700228552958449,1.2716578021112042,0.844734835865005,True
|
||||
v_group_3_19_1_1,3,cal-en-2,1.9899599283539846,1.1713430054220004,-0.02171442091569174,0.758927243609968,1.2893190093160507,0.8459774010056795,True
|
||||
v_group_3_19_1_1,19,cal-zh-1,3.1526667823654964,1.065153322116597,-0.030195612099080702,0.5994928004162863,1.774393412569017,0.8704590731400326,True
|
||||
v_group_3_19_1_1,19,cal-zh-2,3.041125717233326,1.0609619769275667,-0.0056310410698682725,0.6214761797890229,1.7813901290577085,0.8628703743147619,True
|
||||
v_group_3_19_1_1,19,cal-en-1,3.041429949637327,1.0641350399658507,-0.014244143157525214,0.6360047810857993,1.8177805604154877,0.8140464347842146,True
|
||||
v_group_3_19_1_1,19,cal-en-2,3.1202358899534404,1.0632710246652446,-0.021163551795847318,0.605275632031235,1.7762195212389158,0.8012907865196233,True
|
||||
v_group_3_23_0_0,3,cal-zh-1,2.5325593905374704,1.0978025886417955,-0.019919769634531376,0.5761960614907249,1.3292469533383322,0.8593249553368174,True
|
||||
v_group_3_23_0_0,3,cal-zh-2,2.689370721715856,1.0802775243275653,-0.0070321344429330225,0.5608288080244765,1.3961936097251293,0.8452572757025786,True
|
||||
v_group_3_23_0_0,3,cal-en-1,2.5428249166384735,1.0896024383272724,-0.004224686109949596,0.5824392419751171,1.3592489928675324,0.8504221043602921,True
|
||||
v_group_3_23_0_0,3,cal-en-2,2.5589301401827593,1.0935565371580773,-0.015489246600322094,0.5614481775883549,1.3137927623890586,0.7532733246972084,True
|
||||
v_group_3_23_0_0,23,cal-zh-1,6.314715927657433,1.0115790106405909,0.007397262649045514,0.5961984520028376,3.7217299106699713,0.8623622864182763,True
|
||||
v_group_3_23_0_0,23,cal-zh-2,6.582746433886306,1.002784941116688,0.05786056734912915,0.5660821398995916,3.7160262733514156,0.7966106557098843,True
|
||||
v_group_3_23_0_0,23,cal-en-1,6.222299452824851,1.0097625580115666,0.020688716885734638,0.6271790673850405,3.8647659658702014,0.7718088189333528,True
|
||||
v_group_3_23_0_0,23,cal-en-2,6.5062645665442185,1.0152263640957444,-0.020304709203748775,0.5969443799167155,3.825627667489882,0.8057381075857623,True
|
||||
v_group_3_23_0_1,3,cal-zh-1,2.4962510729862895,1.0941175817192668,-0.005683976088889132,0.5761960614907249,1.3146028002644317,0.8388182418857919,True
|
||||
v_group_3_23_0_1,3,cal-zh-2,2.5733651041895516,1.07089383893816,0.031675607144456025,0.5608288080244765,1.3476754011634102,0.8402922522338886,True
|
||||
v_group_3_23_0_1,3,cal-en-1,2.468157528955309,1.0900344020008894,0.007777767706325841,0.5824392419751171,1.3188132389226515,0.8303210401880273,True
|
||||
v_group_3_23_0_1,3,cal-en-2,2.557652136136515,1.0973166180522025,-0.02334860026349611,0.5614481775883549,1.3086370033179386,0.7900276047329294,True
|
||||
v_group_3_23_0_1,23,cal-zh-1,6.197276288864568,1.0121018312984849,0.007106978550738162,0.5961984520028376,3.6506272548827043,0.8475157551074508,True
|
||||
v_group_3_23_0_1,23,cal-zh-2,6.63914341360049,1.0053735203743175,0.04013537199003796,0.5660821398995916,3.7382131461667756,0.7783158074892113,True
|
||||
v_group_3_23_0_1,23,cal-en-1,5.975231447628363,1.0145822460901517,-0.001607142608356388,0.6271790673850405,3.693677965660293,0.812945618086598,True
|
||||
v_group_3_23_0_1,23,cal-en-2,6.313394272237381,1.0092006745969357,0.022102663839672184,0.5969443799167155,3.734386355335804,0.8385999789262057,True
|
||||
v_group_3_23_1_0,3,cal-zh-1,2.0046870126255754,1.149488259226821,0.006509166904659427,0.7621906845569104,1.3292469533383322,0.8225999244083507,True
|
||||
v_group_3_23_1_0,3,cal-zh-2,2.081869604272063,1.1450920988499615,-0.007910645571858183,0.7679492835095556,1.3961936097251293,0.8200927996560631,True
|
||||
v_group_3_23_1_0,3,cal-en-1,2.034207822141951,1.1523911540051008,-0.0062454778116254545,0.7700228552958449,1.3592489928675324,0.8647988597551656,True
|
||||
v_group_3_23_1_0,3,cal-en-2,2.0144285528807346,1.1636574297356812,-0.017662623847039125,0.758927243609968,1.3137927623890586,0.7566915654750324,True
|
||||
v_group_3_23_1_0,23,cal-zh-1,6.277763088160963,1.0130180677809972,-0.000516191036954132,0.6005609944121181,3.7217299106699713,0.9071331282851747,True
|
||||
v_group_3_23_1_0,23,cal-zh-2,6.253505726735381,1.0143504270483992,-0.008003137825984693,0.602758356993599,3.7160262733514156,0.9042951085127707,True
|
||||
v_group_3_23_1_0,23,cal-en-1,6.432206805763406,1.012590175776882,-0.0017666587124045888,0.608410793821259,3.8647659658702014,0.8716035372405754,True
|
||||
v_group_3_23_1_0,23,cal-en-2,6.672455110252242,1.0116859983730087,-0.0017133324304754378,0.5800464569991829,3.825627667489882,0.9032941845272089,True
|
||||
v_group_3_23_1_1,3,cal-zh-1,1.9433092846106501,1.1267070431047723,0.057508235976642966,0.7621906845569104,1.3146028002644317,0.8426443970281835,True
|
||||
v_group_3_23_1_1,3,cal-zh-2,1.9585684702423296,1.116056026643042,0.0694309762150568,0.7679492835095556,1.3476754011634102,0.8355688778127401,True
|
||||
v_group_3_23_1_1,3,cal-en-1,1.9416077524461186,1.1336573680625563,0.04772564156717925,0.7700228552958449,1.3188132389226515,0.8791900114489358,True
|
||||
v_group_3_23_1_1,3,cal-en-2,1.9765805563654837,1.1462925391932104,0.019261171522129524,0.758927243609968,1.3086370033179386,0.7779060649238136,True
|
||||
v_group_3_23_1_1,23,cal-zh-1,6.199142599546911,1.0198146740692198,-0.03938618359716485,0.6005609944121181,3.6506272548827043,0.9010958511164613,True
|
||||
v_group_3_23_1_1,23,cal-zh-2,6.280931223963968,1.0127522527249209,0.0010294357455041317,0.602758356993599,3.7382131461667756,0.8824740252975743,True
|
||||
v_group_3_23_1_1,23,cal-en-1,6.166803229495207,1.0157760592769955,-0.014173965326379663,0.608410793821259,3.693677965660293,0.8927807726224396,True
|
||||
v_group_3_23_1_1,23,cal-en-2,6.527125776698839,1.0138308736461075,-0.011997183921616217,0.5800464569991829,3.734386355335804,0.8855541377425988,True
|
||||
v_group_7_11_0_0,7,cal-zh-1,1.3590647431914042,1.4227457740694431,0.03424682104595654,0.6816649928851196,0.6511541804465534,0.9596573793765382,True
|
||||
v_group_7_11_0_0,7,cal-zh-2,1.385094582257532,1.4324673408348387,0.00851416330135579,0.7135252488597659,0.689928439083044,0.9602675120848562,True
|
||||
v_group_7_11_0_0,7,cal-en-1,1.3265867116383734,1.4445549109355424,0.045467358554094124,0.7169257433445044,0.6583786861631596,0.9601232911956866,True
|
||||
v_group_7_11_0_0,7,cal-en-2,1.3652521916663036,1.4759119703599899,-0.004457407033166956,0.7069058409737389,0.6539040051661819,0.960126960876628,True
|
||||
v_group_7_11_0_0,11,cal-zh-1,1.5317716094861975,1.2930853983519182,0.024025724458799087,0.61823921519185,0.732357877452556,0.9634038160729521,True
|
||||
v_group_7_11_0_0,11,cal-zh-2,1.5307959598286778,1.3119505884320646,0.007759339913623475,0.6610471878315538,0.7713159118271558,0.9590589338367865,True
|
||||
v_group_7_11_0_0,11,cal-en-1,1.5099752151915873,1.3230667734973132,0.009844299617146468,0.667480861008681,0.7617752761439864,0.9678793140349622,True
|
||||
v_group_7_11_0_0,11,cal-en-2,1.5482747562875272,1.3279089716303765,-0.01617418461798738,0.6166097112120626,0.7189357634802654,0.9600429553350653,True
|
||||
v_group_7_11_0_1,7,cal-zh-1,1.3495588166955654,1.4950089488708287,-0.003558461901091167,0.6816649928851196,0.6153454812933818,0.966927293158344,True
|
||||
v_group_7_11_0_1,7,cal-zh-2,1.3131866880031267,1.4264778229842567,0.06681002200026138,0.7135252488597659,0.6568569404020126,0.9692055018672671,True
|
||||
v_group_7_11_0_1,7,cal-en-1,1.32214260901372,1.503141145681371,0.014558701443153667,0.7169257433445044,0.6305981813470566,0.9710012396977696,True
|
||||
v_group_7_11_0_1,7,cal-en-2,1.3362440174615924,1.4759651173669088,0.0188243881968289,0.7069058409737389,0.6399871445437402,0.9800388663309468,True
|
||||
v_group_7_11_0_1,11,cal-zh-1,1.4814936185948042,1.3682410098573785,-0.010356398654907837,0.61823921519185,0.6694123662959482,0.9731104598776446,True
|
||||
v_group_7_11_0_1,11,cal-zh-2,1.4312932116993835,1.3111158981949806,0.06555244821174869,0.6610471878315538,0.721638990007552,0.9715822984840667,True
|
||||
v_group_7_11_0_1,11,cal-en-1,1.4571566687896989,1.3927423259379788,-0.013699631663316555,0.667480861008681,0.6983518557556945,0.9729418413615413,True
|
||||
v_group_7_11_0_1,11,cal-en-2,1.477597866645427,1.3524950414266217,0.004693832139406584,0.6166097112120626,0.6736447572323523,0.9747524460058449,True
|
||||
v_group_7_11_1_0,7,cal-zh-1,1.39992536646198,1.4184000160889843,0.0072588634871393765,0.6597473852166851,0.6511541804465534,0.9518998235702384,True
|
||||
v_group_7_11_1_0,7,cal-zh-2,1.4607046478146466,1.4631404873471223,-0.06860666704274519,0.691078948851745,0.689928439083044,0.9471618123375283,True
|
||||
v_group_7_11_1_0,7,cal-en-1,1.412470658158268,1.476634362838785,-0.04186440219197837,0.6882865751114527,0.6583786861631596,0.9543213987306998,True
|
||||
v_group_7_11_1_0,7,cal-en-2,1.4294009951093931,1.438365250857598,-0.02798081817389893,0.658004857731096,0.6539040051661819,0.9602664038273591,True
|
||||
v_group_7_11_1_0,11,cal-zh-1,1.5960604245786816,1.2902732748820969,-0.006974359405710902,0.5920463801837895,0.732357877452556,0.9623963079308823,True
|
||||
v_group_7_11_1_0,11,cal-zh-2,1.6397045367074465,1.302938977683933,-0.04167535264366895,0.6129016192425962,0.7713159118271558,0.9425108403681077,True
|
||||
v_group_7_11_1_0,11,cal-en-1,1.6267360126815866,1.3344855075333568,-0.06575576752947196,0.6249188916249518,0.7617752761439864,0.9667174592134935,True
|
||||
v_group_7_11_1_0,11,cal-en-2,1.6144002981959313,1.3040000986321145,-0.02970543258219023,0.5807062272820778,0.7189357634802654,0.9442531463695479,True
|
||||
v_group_7_11_1_1,7,cal-zh-1,1.3780134159071724,1.4774476705790789,-0.015543200175059484,0.6597473852166851,0.6153454812933818,0.9014862720434296,True
|
||||
v_group_7_11_1_1,7,cal-zh-2,1.370138987288509,1.4415227317787447,0.013746730752711852,0.691078948851745,0.6568569404020126,0.9010035635437046,True
|
||||
v_group_7_11_1_1,7,cal-en-1,1.3559742718884829,1.4800215337502194,0.0003981988762509926,0.6882865751114527,0.6305981813470566,0.9114269694507389,True
|
||||
v_group_7_11_1_1,7,cal-en-2,1.400382195709064,1.4398074950609028,-0.007754939829026272,0.658004857731096,0.6399871445437402,0.9116877956634163,True
|
||||
v_group_7_11_1_1,11,cal-zh-1,1.5125682103099711,1.3377561855485423,-0.004172457964358748,0.5920463801837895,0.6694123662959482,0.912043840836572,True
|
||||
v_group_7_11_1_1,11,cal-zh-2,1.5365777899748885,1.305044528647161,0.010715256500539271,0.6129016192425962,0.721638990007552,0.9006649890707459,True
|
||||
v_group_7_11_1_1,11,cal-en-1,1.5060753560422646,1.3477088010070952,-0.00869741692505149,0.6249188916249518,0.6983518557556945,0.917286294564562,True
|
||||
v_group_7_11_1_1,11,cal-en-2,1.5294486877706794,1.3184402725047752,0.0027967575833321096,0.5807062272820778,0.6736447572323523,0.9095902645598368,True
|
||||
v_group_7_15_0_0,7,cal-zh-1,1.5569048596546016,1.3028309128911548,0.0017206734675930314,0.6816649928851196,0.8146011347889529,0.9512518197767236,True
|
||||
v_group_7_15_0_0,7,cal-zh-2,1.5729222141331871,1.2900435191985529,0.0051487647633175135,0.7135252488597659,0.8699859327022424,0.9627308945779495,True
|
||||
v_group_7_15_0_0,7,cal-en-1,1.5368669705050517,1.2966178520329759,0.018117984912830207,0.7169257433445044,0.849764248983153,0.9528696164818339,True
|
||||
v_group_7_15_0_0,7,cal-en-2,1.4705351321955804,1.317075486003281,0.037676675411163214,0.7069058409737389,0.7892712948903489,0.9556875603688989,True
|
||||
v_group_7_15_0_0,15,cal-zh-1,1.8064583640807623,1.1788225179714629,0.027746151973229785,0.6445394217323496,0.987709016088177,0.9356480705673035,True
|
||||
v_group_7_15_0_0,15,cal-zh-2,1.8223942852440718,1.1955428800653456,0.0008008979647849695,0.6761557166072645,1.0306801490991593,0.9613292258259053,True
|
||||
v_group_7_15_0_0,15,cal-en-1,1.8370468334668244,1.1881579052679156,0.005102274925945226,0.6787740550324127,1.0494730733248452,0.9440885032468835,True
|
||||
v_group_7_15_0_0,15,cal-en-2,1.7457125995837404,1.179991278485705,0.04771974337577139,0.6392028823082366,0.945654892269824,0.9468722677460633,True
|
||||
v_group_7_15_0_1,7,cal-zh-1,1.529638011693102,1.3380586128169485,-0.01440655320228269,0.6816649928851196,0.7792638337138618,0.8895315825360072,True
|
||||
v_group_7_15_0_1,7,cal-zh-2,1.5110790913435765,1.3542088747763328,-0.017145538801148923,0.7135252488597659,0.7961793079193885,0.9041294861688265,True
|
||||
v_group_7_15_0_1,7,cal-en-1,1.4704264115682142,1.3901390505582425,-0.020471837872431405,0.7169257433445044,0.7583317278394569,0.8915239054486477,True
|
||||
v_group_7_15_0_1,7,cal-en-2,1.4518092147747548,1.3939722307524762,-0.011064412921566678,0.7069058409737389,0.7362359100581017,0.8625669120749795,True
|
||||
v_group_7_15_0_1,15,cal-zh-1,1.7874487290690932,1.2062497278243802,0.00027897556868457224,0.6445394217323496,0.955093413607095,0.848771024934287,True
|
||||
v_group_7_15_0_1,15,cal-zh-2,1.7507119519467151,1.2085686914360545,0.01152854564152503,0.6761557166072645,0.9794676155600762,0.8808316849429574,True
|
||||
v_group_7_15_0_1,15,cal-en-1,1.7687821482259698,1.2352583851127314,-0.027311845738046136,0.6787740550324127,0.9719451781828745,0.8642037542950373,True
|
||||
v_group_7_15_0_1,15,cal-en-2,1.797881060183342,1.2000940010232768,0.003997628321673514,0.6392028823082366,0.9576006168989177,0.8477522669009253,True
|
||||
v_group_7_15_1_0,7,cal-zh-1,1.6010026869994904,1.2966558618242732,-0.015665211659213897,0.6597473852166851,0.8146011347889529,0.9068786107264657,True
|
||||
v_group_7_15_1_0,7,cal-zh-2,1.6173907371822414,1.2847847861891883,-0.012380937601433002,0.691078948851745,0.8699859327022424,0.9232754051400207,True
|
||||
v_group_7_15_1_0,7,cal-en-1,1.5983354432198853,1.2946094512795523,-0.012319205282017758,0.6882865751114527,0.849764248983153,0.914108598750399,True
|
||||
v_group_7_15_1_0,7,cal-en-2,1.5877377947573081,1.323675634116035,-0.034235847970775835,0.658004857731096,0.7892712948903489,0.9297758441903189,True
|
||||
v_group_7_15_1_0,15,cal-zh-1,1.9337834220206909,1.184114435894833,-0.0221926262634617,0.6048042873339816,0.987709016088177,0.9228545926305083,True
|
||||
v_group_7_15_1_0,15,cal-zh-2,1.9058590848381105,1.1861089699279206,-0.015695825578067302,0.641442475836036,1.0306801490991593,0.9182130571842873,True
|
||||
v_group_7_15_1_0,15,cal-en-1,1.8939368053398529,1.186648467058825,-0.012423659975874614,0.6575486627480011,1.0494730733248452,0.9239990152221395,True
|
||||
v_group_7_15_1_0,15,cal-en-2,1.8285901520855836,1.1960557287227085,-0.002079577026431645,0.61853988987306,0.945654892269824,0.9074414909661811,True
|
||||
v_group_7_15_1_1,7,cal-zh-1,1.5535612398681848,1.3152900486760957,-0.007799870903764235,0.6597473852166851,0.7792638337138618,0.9039457824467736,True
|
||||
v_group_7_15_1_1,7,cal-zh-2,1.5296339189175412,1.3277132302972872,-0.005419765431227022,0.691078948851745,0.7961793079193885,0.9229216993817316,True
|
||||
v_group_7_15_1_1,7,cal-en-1,1.4995515443199279,1.3610418221371834,-0.01577618536519215,0.6882865751114527,0.7583317278394569,0.9263950777193685,True
|
||||
v_group_7_15_1_1,7,cal-en-2,1.5087704593441198,1.3484513291008318,-0.010935181945558963,0.658004857731096,0.7362359100581017,0.9041913578769004,True
|
||||
v_group_7_15_1_1,15,cal-zh-1,1.8811797208658982,1.1912400862744115,-0.01425903212904786,0.6048042873339816,0.955093413607095,0.9201275868350303,True
|
||||
v_group_7_15_1_1,15,cal-zh-2,1.8488656195496849,1.2108015840972295,-0.028371984657058983,0.641442475836036,0.9794676155600762,0.9455752632921178,True
|
||||
v_group_7_15_1_1,15,cal-en-1,1.7959920175394761,1.2150398766801302,-0.013769575580058773,0.6575486627480011,0.9719451781828745,0.9278224568541319,True
|
||||
v_group_7_15_1_1,15,cal-en-2,1.8585976530735657,1.2005180107061293,-0.018595048318740277,0.61853988987306,0.9576006168989177,0.9174292665346274,True
|
||||
v_group_7_19_0_0,7,cal-zh-1,1.6129409563448271,1.2486427309798793,0.025954377934053734,0.6816649928851196,0.880544416951106,0.8341748004880644,True
|
||||
v_group_7_19_0_0,7,cal-zh-2,1.6485067103725086,1.2875628181351657,-0.030588441777941112,0.7135252488597659,0.9135485618240787,0.8779361562934789,True
|
||||
v_group_7_19_0_0,7,cal-en-1,1.5851947538837512,1.3174657722322225,-0.027059064735262404,0.7169257433445044,0.8626159033705797,0.84533001186125,True
|
||||
v_group_7_19_0_0,7,cal-en-2,1.5663782956833436,1.3091660352485543,-0.009193607051191637,0.7069058409737389,0.8457918526604767,0.8410737704781521,True
|
||||
v_group_7_19_0_0,19,cal-zh-1,2.4240666153951946,1.096253770064537,0.0030364656871200726,0.5783588201590688,1.2788829976697977,0.8225181192534375,True
|
||||
v_group_7_19_0_0,19,cal-zh-2,2.4362711944008115,1.1019301348706267,-0.01069307512526254,0.5911380335155229,1.3069545131712863,0.7673432399827309,True
|
||||
v_group_7_19_0_0,19,cal-en-1,2.339862825778156,1.096966960440844,0.01754700713687364,0.6350945255346598,1.3546753227249124,0.7699142493575787,True
|
||||
v_group_7_19_0_0,19,cal-en-2,2.2694897834127725,1.119172598921317,-0.009492069215501374,0.6089235456215132,1.2347923519566644,0.7787010442954936,True
|
||||
v_group_7_19_0_1,7,cal-zh-1,1.919896330047686,1.15697404263873,0.020382362638390824,0.6816649928851196,1.1311629042059486,0.8359271541245736,True
|
||||
v_group_7_19_0_1,7,cal-zh-2,1.8730024088804516,1.2036123521799755,-0.027803375437586025,0.7135252488597659,1.1103529367165625,0.8612010535776801,True
|
||||
v_group_7_19_0_1,7,cal-en-1,1.7864113926551268,1.1925819927551087,0.0175395778039998,0.7169257433445044,1.0739088158120118,0.8539029662501013,True
|
||||
v_group_7_19_0_1,7,cal-en-2,1.8095894601534095,1.2052595026659787,-0.006786969725422758,0.7069058409737389,1.0613559621952018,0.7991244871505474,True
|
||||
v_group_7_19_0_1,19,cal-zh-1,3.217264894883968,1.0486589476514454,0.010056965848962773,0.5783588201590688,1.774393412569017,0.7674207683968693,True
|
||||
v_group_7_19_0_1,19,cal-zh-2,3.181915554525891,1.0558895960144594,-0.007209001009985394,0.5911380335155229,1.7813901290577085,0.7195093641204466,True
|
||||
v_group_7_19_0_1,19,cal-en-1,2.990837587885149,1.0449361271610185,0.04318266616265943,0.6350945255346598,1.8177805604154877,0.7175870885682337,True
|
||||
v_group_7_19_0_1,19,cal-en-2,3.0797389680836744,1.0557960598959124,0.004113267340204362,0.6089235456215132,1.7762195212389158,0.7096545378734751,True
|
||||
v_group_7_19_1_0,7,cal-zh-1,1.6819987190726897,1.2602365485302245,-0.017898899165194538,0.6597473852166851,0.880544416951106,0.8344809658335943,True
|
||||
v_group_7_19_1_0,7,cal-zh-2,1.6426412611839205,1.2426211846394348,0.018606519313130832,0.691078948851745,0.9135485618240787,0.8765048258262689,True
|
||||
v_group_7_19_1_0,7,cal-en-1,1.6209991744361494,1.2934052869552068,-0.022711276653805148,0.6882865751114527,0.8626159033705797,0.8667934490795195,True
|
||||
v_group_7_19_1_0,7,cal-en-2,1.6413659510313396,1.2769415615624204,-0.01628250363750126,0.658004857731096,0.8457918526604767,0.8619722436206836,True
|
||||
v_group_7_19_1_0,19,cal-zh-1,2.5276804097685552,1.080311994614643,0.018239036792248458,0.546585176176571,1.2788829976697977,0.8788447361578459,True
|
||||
v_group_7_19_1_0,19,cal-zh-2,2.4787271338145778,1.0801968149326486,0.026486642512740764,0.5695536564433646,1.3069545131712863,0.882423120910055,True
|
||||
v_group_7_19_1_0,19,cal-en-1,2.436190508204177,1.1018223617362553,-0.010460457321808263,0.6126826118253192,1.3546753227249124,0.8679871835328036,True
|
||||
v_group_7_19_1_0,19,cal-en-2,2.339283438302971,1.0896521264177794,0.031808760508683996,0.5751736151178315,1.2347923519566644,0.8475231329006441,True
|
||||
v_group_7_19_1_1,7,cal-zh-1,1.9794480010615727,1.1545071342217543,0.006249800827629816,0.6597473852166851,1.1311629042059486,0.8609718734969634,True
|
||||
v_group_7_19_1_1,7,cal-zh-2,1.8552307284539464,1.1546877207248674,0.043439192239259,0.691078948851745,1.1103529367165625,0.8870359611602545,True
|
||||
v_group_7_19_1_1,7,cal-en-1,1.8157392236880425,1.163738404198499,0.04406787757396818,0.6882865751114527,1.0739088158120118,0.8920301131031774,True
|
||||
v_group_7_19_1_1,7,cal-en-2,1.8761726207510243,1.163163672103821,0.025330735982374678,0.658004857731096,1.0613559621952018,0.8457966968987024,True
|
||||
v_group_7_19_1_1,19,cal-zh-1,3.3712129436764964,1.0384703908927988,0.0267306441178162,0.546585176176571,1.774393412569017,0.8438709884640048,True
|
||||
v_group_7_19_1_1,19,cal-zh-2,3.230279401450716,1.0327987196174349,0.05559542437085788,0.5695536564433646,1.7813901290577085,0.8436774905294028,True
|
||||
v_group_7_19_1_1,19,cal-en-1,3.0793700329658757,1.037901117251973,0.053944328354099264,0.6126826118253192,1.8177805604154877,0.7847470463614187,True
|
||||
v_group_7_19_1_1,19,cal-en-2,3.207711868110182,1.0387180240820808,0.04002792721354586,0.5751736151178315,1.7762195212389158,0.7961754084606756,True
|
||||
v_group_7_23_0_0,7,cal-zh-1,1.8928738918044918,1.1474895917278267,0.04187036485469965,0.6816649928851196,1.1244597574488375,0.8051358407379933,True
|
||||
v_group_7_23_0_0,7,cal-zh-2,1.7948113359136397,1.1850343588966081,0.02395368783967622,0.7135252488597659,1.080680231336518,0.8532838708998824,True
|
||||
v_group_7_23_0_0,7,cal-en-1,1.8035443816149181,1.1662440690248335,0.044861242640534954,0.7169257433445044,1.1086936523717892,0.8566976360482108,True
|
||||
v_group_7_23_0_0,7,cal-en-2,1.746164892139193,1.1776429673143152,0.05041028190312191,0.7069058409737389,1.0481735091337046,0.8061265524000732,True
|
||||
v_group_7_23_0_0,23,cal-zh-1,6.240759902641683,1.0015917799794847,0.07031995637412376,0.5973077227747422,3.7217299106699713,0.8650418777001297,True
|
||||
v_group_7_23_0_0,23,cal-zh-2,6.011890341287522,0.9959309596650905,0.107342697611108,0.6155976577189147,3.7160262733514156,0.8058318101455474,True
|
||||
v_group_7_23_0_0,23,cal-en-1,5.85737933977827,1.0012993762310904,0.07786732385665274,0.6606687951085425,3.8647659658702014,0.805817284362258,True
|
||||
v_group_7_23_0_0,23,cal-en-2,6.045147730397914,1.0010998505894793,0.07615682732380537,0.6335387416715794,3.825627667489882,0.8281764909770989,True
|
||||
v_group_7_23_0_1,7,cal-zh-1,1.860540799195586,1.1967761161328565,-0.01439125753705159,0.6816649928851196,1.0597349943315055,0.7961799444055976,True
|
||||
v_group_7_23_0_1,7,cal-zh-2,1.7209848147903832,1.2162219400430025,0.014313477324957373,0.7135252488597659,1.0096562788645045,0.8352455929466881,True
|
||||
v_group_7_23_0_1,7,cal-en-1,1.731292266622375,1.20713606030845,0.020777522300589636,0.7169257433445044,1.0282254304271896,0.8535440893666582,True
|
||||
v_group_7_23_0_1,7,cal-en-2,1.782926728147381,1.2343097631479818,-0.03195851470003604,0.7069058409737389,1.0211061726848514,0.7914058388744698,True
|
||||
v_group_7_23_0_1,23,cal-zh-1,6.219651840439676,1.0176459599637,-0.0269912642129351,0.5973077227747422,3.6506272548827043,0.8493049112789856,True
|
||||
v_group_7_23_0_1,23,cal-zh-2,6.146912936764169,1.0122550689637158,0.007463652848362227,0.6155976577189147,3.7382131461667756,0.7734519824352003,True
|
||||
v_group_7_23_0_1,23,cal-en-1,5.716995968347211,1.0225690688693136,-0.038171022335335335,0.6606687951085425,3.693677965660293,0.8465952077545221,True
|
||||
v_group_7_23_0_1,23,cal-en-2,6.033878663101979,1.0236476710982612,-0.05621402998281668,0.6335387416715794,3.734386355335804,0.8388501082601372,True
|
||||
v_group_7_23_1_0,7,cal-zh-1,1.9412114744957556,1.138955116861505,0.04007519409468991,0.6597473852166851,1.1244597574488375,0.8050799646749459,True
|
||||
v_group_7_23_1_0,7,cal-zh-2,1.8397651871342364,1.1765024979557046,0.019377398182039922,0.691078948851745,1.080680231336518,0.87188933111028,True
|
||||
v_group_7_23_1_0,7,cal-en-1,1.8273938257317455,1.1344618371378004,0.07925122041004046,0.6882865751114527,1.1086936523717892,0.8861303881288498,True
|
||||
v_group_7_23_1_0,7,cal-en-2,1.8478604542672803,1.160018970830487,0.03858360658448875,0.658004857731096,1.0481735091337046,0.839204430097089,True
|
||||
v_group_7_23_1_0,23,cal-zh-1,7.063398567760722,1.0024366149977626,0.053770069775554596,0.5281874295776416,3.7217299106699713,0.9161467743867738,True
|
||||
v_group_7_23_1_0,23,cal-zh-2,6.81741680388717,1.0070806145584652,0.025759059476753752,0.548937835361384,3.7160262733514156,0.8948828182676195,True
|
||||
v_group_7_23_1_0,23,cal-en-1,6.8065564415657285,0.9849928348020759,0.17528144322679093,0.5592793973355187,3.8647659658702014,0.8818210468926793,True
|
||||
v_group_7_23_1_0,23,cal-en-2,6.852674736629337,0.9960429618115387,0.09984564691964277,0.5560587156350393,3.825627667489882,0.8954657273823583,True
|
||||
v_group_7_23_1_1,7,cal-zh-1,1.9142121876320024,1.191709712612421,-0.026176268120616165,0.6597473852166851,1.0597349943315055,0.7991404727616881,True
|
||||
v_group_7_23_1_1,7,cal-zh-2,1.8173634010224657,1.2439298552896783,-0.05760881846294219,0.691078948851745,1.0096562788645045,0.8670889191916493,True
|
||||
v_group_7_23_1_1,7,cal-en-1,1.8438294563438808,1.2342459387230722,-0.05622744425719728,0.6882865751114527,1.0282254304271896,0.8790486619482998,True
|
||||
v_group_7_23_1_1,7,cal-en-2,1.8524016531669099,1.1936949544120823,-0.007488458814853117,0.658004857731096,1.0211061726848514,0.8118146920394043,True
|
||||
v_group_7_23_1_1,23,cal-zh-1,6.968200594234835,1.0081872795223374,0.01552305241528966,0.5281874295776416,3.6506272548827043,0.9025308152054184,True
|
||||
v_group_7_23_1_1,23,cal-zh-2,6.922164681095241,1.016485135405364,-0.03976500347948802,0.548937835361384,3.7382131461667756,0.8751069489675068,True
|
||||
v_group_7_23_1_1,23,cal-en-1,6.722203609007401,1.0178445490280394,-0.043195531397752104,0.5592793973355187,3.693677965660293,0.9031548035782271,True
|
||||
v_group_7_23_1_1,23,cal-en-2,6.7865673838251315,1.0105354893524694,0.003324057341607897,0.5560587156350393,3.734386355335804,0.8999009752600492,True
|
||||
v_group_11_15_0_0,11,cal-zh-1,1.502791670243753,1.353203604928345,-0.011289788657297047,0.732357877452556,0.8133153901340475,0.9541352268818802,True
|
||||
v_group_11_15_0_0,11,cal-zh-2,1.4875509780622966,1.3491132398193337,0.0013374792982470607,0.7713159118271558,0.8504636268984713,0.9544487635842802,True
|
||||
v_group_11_15_0_0,11,cal-en-1,1.5040756897475804,1.3507019015653925,-0.00998942003653285,0.7617752761439864,0.8482757539402555,0.9565752831991995,True
|
||||
v_group_11_15_0_0,11,cal-en-2,1.4991223850741093,1.377994758098477,-0.029340221700122626,0.7189357634802654,0.7821312019726776,0.9535022979593153,True
|
||||
v_group_11_15_0_0,15,cal-zh-1,1.6490676696370974,1.2716173138285711,-0.01452156074310682,0.7616351402721442,0.987709016088177,0.942626912477501,True
|
||||
v_group_11_15_0_0,15,cal-zh-2,1.6148303484157773,1.2631202180221655,0.010460290125442116,0.8061979612399811,1.0306801490991593,0.9415776746135298,True
|
||||
v_group_11_15_0_0,15,cal-en-1,1.6710806279033728,1.2729382931277655,-0.02633133695868423,0.7994314818416564,1.0494730733248452,0.9507855617297734,True
|
||||
v_group_11_15_0_0,15,cal-en-2,1.5932469433894019,1.2965167567782727,-0.011523285929541964,0.7695338246492535,0.945654892269824,0.9421338857404747,True
|
||||
v_group_11_15_0_1,11,cal-zh-1,1.4473203324581179,1.4195823323055266,-0.027107948117487086,0.732357877452556,0.746667820915672,0.9102078380782409,True
|
||||
v_group_11_15_0_1,11,cal-zh-2,1.3843618254303598,1.4281980071395746,0.011914556389342012,0.7713159118271558,0.7476416423651907,0.91256476446331,True
|
||||
v_group_11_15_0_1,11,cal-en-1,1.3835507339045643,1.465644558567375,-0.01223504640612922,0.7617752761439864,0.7191066457542575,0.9004397164976919,True
|
||||
v_group_11_15_0_1,11,cal-en-2,1.4475696621763736,1.4163390226239096,-0.024886838253198096,0.7189357634802654,0.7347884818845297,0.898887258791853,True
|
||||
v_group_11_15_0_1,15,cal-zh-1,1.627708987628898,1.2980095406929064,-0.030666110238161532,0.7616351402721442,0.955093413607095,0.8999317783185953,True
|
||||
v_group_11_15_0_1,15,cal-zh-2,1.5427700152363772,1.2698511121621194,0.03946593956726807,0.8061979612399811,0.9794676155600762,0.9047260790162266,True
|
||||
v_group_11_15_0_1,15,cal-en-1,1.588195257923352,1.3063013398237853,-0.018179677917918673,0.7994314818416564,0.9719451781828745,0.8932048932725792,True
|
||||
v_group_11_15_0_1,15,cal-en-2,1.630626436299359,1.3103815682191484,-0.044373023351737484,0.7695338246492535,0.9576006168989177,0.8884157925342261,True
|
||||
v_group_11_15_1_0,11,cal-zh-1,1.5648765036727548,1.287996877953897,0.01123963636711564,0.6694123662959482,0.8133153901340475,0.9538275433127948,True
|
||||
v_group_11_15_1_0,11,cal-zh-2,1.5515493411121977,1.3165272024041001,-0.007807976284367138,0.721638990007552,0.8504636268984713,0.9406762889651918,True
|
||||
v_group_11_15_1_0,11,cal-en-1,1.5684504308315492,1.291243164671633,0.006345995134812555,0.6983518557556945,0.8482757539402555,0.9523109955080253,True
|
||||
v_group_11_15_1_0,11,cal-en-2,1.5638946719712903,1.3469727891943526,-0.04209288390330341,0.6736447572323523,0.7821312019726776,0.9651705476933652,True
|
||||
v_group_11_15_1_0,15,cal-zh-1,1.7150623178302908,1.2353094961572655,-0.00499768044519082,0.7114180717103298,0.987709016088177,0.9261782649182674,True
|
||||
v_group_11_15_1_0,15,cal-zh-2,1.7117295384844733,1.2297658686770596,0.002661551792777009,0.7404763663816544,1.0306801490991593,0.9378670645279134,True
|
||||
v_group_11_15_1_0,15,cal-en-1,1.732508224973316,1.2107841996946331,0.01603302629341104,0.7334368731243748,1.0494730733248452,0.9332714031865601,True
|
||||
v_group_11_15_1_0,15,cal-en-2,1.6836352288532193,1.2474244841018645,-0.004803668515942186,0.7006464618417241,0.945654892269824,0.9390248297812376,True
|
||||
v_group_11_15_1_1,11,cal-zh-1,1.5145510704565304,1.3578450651683729,-0.022292397413041322,0.6694123662959482,0.746667820915672,0.8678726822034273,True
|
||||
v_group_11_15_1_1,11,cal-zh-2,1.4313279401883867,1.381546974643514,0.011903209333186636,0.721638990007552,0.7476416423651907,0.8536085192387365,True
|
||||
v_group_11_15_1_1,11,cal-en-1,1.4432912092097925,1.4016350708181051,-0.011054904854037482,0.6983518557556945,0.7191066457542575,0.8391290863081681,True
|
||||
v_group_11_15_1_1,11,cal-en-2,1.4526285013839968,1.3317513791913194,0.03650641685285109,0.6736447572323523,0.7347884818845297,0.8441563974225941,True
|
||||
v_group_11_15_1_1,15,cal-zh-1,1.7143785097637405,1.2769848856893935,-0.05092365978701437,0.7114180717103298,0.955093413607095,0.8021440673295065,True
|
||||
v_group_11_15_1_1,15,cal-zh-2,1.6583604309862343,1.2537185370703892,-0.0001825048856640802,0.7404763663816544,0.9794676155600762,0.8148546472836719,True
|
||||
v_group_11_15_1_1,15,cal-en-1,1.676281127312703,1.2649338831971721,-0.020292433565064258,0.7334368731243748,0.9719451781828745,0.8211682132269807,True
|
||||
v_group_11_15_1_1,15,cal-en-2,1.6767115518355695,1.2267974723399178,0.020710973761654525,0.7006464618417241,0.9576006168989177,0.7979335889850367,True
|
||||
v_group_11_19_0_0,11,cal-zh-1,1.4114549322488237,1.4195259165445322,-0.001782172219210009,0.732357877452556,0.7281939175988701,0.8526695276331981,True
|
||||
v_group_11_19_0_0,11,cal-zh-2,1.4058012917018183,1.4596310092752323,-0.02526951005307437,0.7713159118271558,0.74287055993363,0.8772384427551952,True
|
||||
v_group_11_19_0_0,11,cal-en-1,1.3600523107169993,1.48145459022691,-0.0037704081067049143,0.7617752761439864,0.6993492958889949,0.8426970930414559,True
|
||||
v_group_11_19_0_0,11,cal-en-2,1.4144931379597643,1.4175694781606902,-0.002568789820147485,0.7189357634802654,0.7173755641213265,0.8518505959416739,True
|
||||
v_group_11_19_0_0,19,cal-zh-1,2.2235401852777494,1.1275584524996212,-0.014037743839856153,0.648522272423202,1.2788829976697977,0.8311199225649207,True
|
||||
v_group_11_19_0_0,19,cal-zh-2,2.1802563419721133,1.1308003746486917,-0.009357578733492458,0.677858206253892,1.3069545131712863,0.7931261639062781,True
|
||||
v_group_11_19_0_0,19,cal-en-1,2.1991360852258137,1.1329292236781892,-0.01759453973906286,0.6978882625870526,1.3546753227249124,0.7984888329017835,True
|
||||
v_group_11_19_0_0,19,cal-en-2,2.095612839703622,1.1485979918513944,-0.017211943379400362,0.6767853245313522,1.2347923519566644,0.7836511614625993,True
|
||||
v_group_11_19_0_1,11,cal-zh-1,1.7574561022604032,1.2472582741714868,-0.03662546161037748,0.732357877452556,1.0319328782344146,0.8402217860026675,True
|
||||
v_group_11_19_0_1,11,cal-zh-2,1.7255436421182995,1.2866453648567506,-0.06669902695980602,0.7713159118271558,1.0344258830530264,0.8050660070689625,True
|
||||
v_group_11_19_0_1,11,cal-en-1,1.7047641302336238,1.3055202208912207,-0.07699248528674484,0.7617752761439864,0.9947353899907829,0.8308428156269475,True
|
||||
v_group_11_19_0_1,11,cal-en-2,1.7839243782869345,1.274187597705922,-0.07937243478598544,0.7189357634802654,1.0065449053215298,0.7767426054629851,True
|
||||
v_group_11_19_0_1,19,cal-zh-1,2.892440309265751,1.0571567437785065,0.0218915136867567,0.648522272423202,1.774393412569017,0.8129923727950579,True
|
||||
v_group_11_19_0_1,19,cal-zh-2,2.8480979855966515,1.0837640560931427,-0.03908775718764272,0.677858206253892,1.7813901290577085,0.7847111160138868,True
|
||||
v_group_11_19_0_1,19,cal-en-1,2.83749847541081,1.0893817021814978,-0.051254268953314544,0.6978882625870526,1.8177805604154877,0.7708461844130059,True
|
||||
v_group_11_19_0_1,19,cal-en-2,2.8551502025997793,1.0878856657900309,-0.05027826111085813,0.6767853245313522,1.7762195212389158,0.7426908108788007,True
|
||||
v_group_11_19_1_0,11,cal-zh-1,1.474727424092685,1.3556839060927421,0.0039120262653408655,0.6694123662959482,0.7281939175988701,0.8529707918740776,True
|
||||
v_group_11_19_1_0,11,cal-zh-2,1.4306364776934701,1.3897482529431708,0.006308164414443334,0.721638990007552,0.74287055993363,0.8574730556237924,True
|
||||
v_group_11_19_1_0,11,cal-en-1,1.4030185753090396,1.401017533707932,0.017174206470393107,0.6983518557556945,0.6993492958889949,0.8078846620606921,True
|
||||
v_group_11_19_1_0,11,cal-en-2,1.4461053371731336,1.3579515772684572,0.02010813137847139,0.6736447572323523,0.7173755641213265,0.8262113260441032,True
|
||||
v_group_11_19_1_0,19,cal-zh-1,2.2896734547458446,1.1125518952375073,-0.0017216458972055275,0.6214090048060991,1.2788829976697977,0.8060965338396701,True
|
||||
v_group_11_19_1_0,19,cal-zh-2,2.288432012347347,1.1050592460668622,0.012452236137509686,0.6311143006111424,1.3069545131712863,0.7579246727109105,True
|
||||
v_group_11_19_1_0,19,cal-en-1,2.243106054547904,1.109658918762923,0.01352612852452507,0.6701544721177771,1.3546753227249124,0.7621657361711736,True
|
||||
v_group_11_19_1_0,19,cal-en-2,2.1778756530835666,1.1327370229349216,-0.01209140025287475,0.6422290504592609,1.2347923519566644,0.7521387003653968,True
|
||||
v_group_11_19_1_1,11,cal-zh-1,1.8290372487508857,1.1864920466771194,0.010054901261920244,0.6694123662959482,1.0319328782344146,0.7973318202143594,True
|
||||
v_group_11_19_1_1,11,cal-zh-2,1.7562031832560878,1.2251672277113783,-0.01029015194277178,0.721638990007552,1.0344258830530264,0.730167001837818,True
|
||||
v_group_11_19_1_1,11,cal-en-1,1.7342168320541373,1.2175032225997207,0.0075187938046456385,0.6983518557556945,0.9947353899907829,0.7565996842214905,True
|
||||
v_group_11_19_1_1,11,cal-en-2,1.7656944614633618,1.1817165936168919,0.03844581912929501,0.6736447572323523,1.0065449053215298,0.7186942817115637,True
|
||||
v_group_11_19_1_1,19,cal-zh-1,3.017302950794232,1.0566874350242892,0.008649386905811619,0.6214090048060991,1.774393412569017,0.7391650937318746,True
|
||||
v_group_11_19_1_1,19,cal-zh-2,2.9802674497314134,1.055854849811207,0.015081505452505377,0.6311143006111424,1.7813901290577085,0.6959421589571969,True
|
||||
v_group_11_19_1_1,19,cal-en-1,2.86584159980684,1.0565392799957876,0.026636019001689916,0.6701544721177771,1.8177805604154877,0.6616365888627186,True
|
||||
v_group_11_19_1_1,19,cal-en-2,2.902279878070103,1.0493795547072295,0.04084396595632202,0.6422290504592609,1.7762195212389158,0.660505085530448,True
|
||||
v_group_11_23_0_0,11,cal-zh-1,1.6951710350260933,1.2276708935652503,0.01195344632051792,0.732357877452556,1.0112415857033417,0.8427089976204292,True
|
||||
v_group_11_23_0_0,11,cal-zh-2,1.7790674950632177,1.2322585367384105,-0.027941425251937855,0.7713159118271558,1.113583737702311,0.8291876554881685,True
|
||||
v_group_11_23_0_0,11,cal-en-1,1.8003232668705502,1.2541246018952745,-0.06284853401703057,0.7617752761439864,1.0935450526177297,0.8561098836953626,True
|
||||
v_group_11_23_0_0,11,cal-en-2,1.6939771885604362,1.241738288217677,-0.0031234003893862395,0.7189357634802654,0.9807709039268662,0.8123084812036971,True
|
||||
v_group_11_23_0_0,23,cal-zh-1,5.801485437572021,1.009362722598445,0.03292597164542441,0.6475195837054575,3.7217299106699713,0.8853146907243048,True
|
||||
v_group_11_23_0_0,23,cal-zh-2,5.544182762356684,1.0127114002046513,0.021298955577016734,0.6787767163871997,3.7160262733514156,0.8693665387893624,True
|
||||
v_group_11_23_0_0,23,cal-en-1,5.633394113613816,1.0299448873808625,-0.07482482364112353,0.7065892900786399,3.8647659658702014,0.8473388351116053,True
|
||||
v_group_11_23_0_0,23,cal-en-2,5.505241566739816,1.0216420956314602,-0.025094876665091907,0.7099456436086259,3.825627667489882,0.8602726289830374,True
|
||||
v_group_11_23_0_1,11,cal-zh-1,1.6145013743413694,1.2443475964348971,0.029599537147361025,0.732357877452556,0.9502110206541,0.8419579405440434,True
|
||||
v_group_11_23_0_1,11,cal-zh-2,1.6014357288727117,1.238288277188032,0.041731456676421017,0.7713159118271558,0.997516395982546,0.8206733503244111,True
|
||||
v_group_11_23_0_1,11,cal-en-1,1.6375669222131637,1.2259659931423692,0.03839278831081591,0.7617752761439864,1.0175306667159127,0.8104303357712007,True
|
||||
v_group_11_23_0_1,11,cal-en-2,1.6358895418145836,1.2331925731118225,0.03150878977522997,0.7189357634802654,0.9537030325653799,0.807022218003108,True
|
||||
v_group_11_23_0_1,23,cal-zh-1,5.657033612498488,1.003400181399921,0.06948372193940783,0.6475195837054575,3.6506272548827043,0.8822437899748644,True
|
||||
v_group_11_23_0_1,23,cal-zh-2,5.517188371535808,1.0017992179929172,0.08087121585376393,0.6787767163871997,3.7382131461667756,0.8445317879683275,True
|
||||
v_group_11_23_0_1,23,cal-en-1,5.258621152079276,1.005958132025727,0.0644096965705729,0.7065892900786399,3.693677965660293,0.887877148927036,True
|
||||
v_group_11_23_0_1,23,cal-en-2,5.260147235439867,1.0000086384218492,0.09500975544855694,0.7099456436086259,3.734386355335804,0.8761971412822911,True
|
||||
v_group_11_23_1_0,11,cal-zh-1,1.8213050489989804,1.205650696959007,-0.01162310323918072,0.6694123662959482,1.0112415857033417,0.8273379200604685,True
|
||||
v_group_11_23_1_0,11,cal-zh-2,1.8274168083852897,1.1842263632970866,0.013544577547260945,0.721638990007552,1.113583737702311,0.7917454617872405,True
|
||||
v_group_11_23_1_0,11,cal-en-1,1.838544445895792,1.174117995968367,0.022919385661963946,0.6983518557556945,1.0935450526177297,0.81739079873143,True
|
||||
v_group_11_23_1_0,11,cal-en-2,1.790400162017659,1.2297404803324854,-0.02947908745935985,0.6736447572323523,0.9807709039268662,0.773135485557783,True
|
||||
v_group_11_23_1_0,23,cal-zh-1,5.8310421957081635,1.0099814595061394,0.028689144246645946,0.64463231115576,3.7217299106699713,0.8505541570232759,True
|
||||
v_group_11_23_1_0,23,cal-zh-2,5.685097514348028,1.009954483407362,0.032511416187853526,0.6601500476920513,3.7160262733514156,0.7884877893417809,True
|
||||
v_group_11_23_1_0,23,cal-en-1,5.517898643233392,1.0120086159991832,0.02583316884398968,0.7088162920638876,3.8647659658702014,0.785489048217691,True
|
||||
v_group_11_23_1_0,23,cal-en-2,5.715003100861624,1.0216928653217308,-0.03327175520155518,0.6839220249351297,3.825627667489882,0.8025062597502255,True
|
||||
v_group_11_23_1_1,11,cal-zh-1,1.728961181003478,1.218032595130985,0.00901370407934377,0.6694123662959482,0.9502110206541,0.8158208648787673,True
|
||||
v_group_11_23_1_1,11,cal-zh-2,1.7107231412518853,1.2375982237560719,-0.005729690530764542,0.721638990007552,0.997516395982546,0.7871925796662738,True
|
||||
v_group_11_23_1_1,11,cal-en-1,1.7930413421373117,1.230600501476454,-0.03157576460177489,0.6983518557556945,1.0175306667159127,0.7695609998068834,True
|
||||
v_group_11_23_1_1,11,cal-en-2,1.7223127700439869,1.2165495214307434,0.01340176467209784,0.6736447572323523,0.9537030325653799,0.7578687763513465,True
|
||||
v_group_11_23_1_1,23,cal-zh-1,5.768535535747268,1.0186151953528793,-0.018110585685107875,0.64463231115576,3.6506272548827043,0.8476502950867684,True
|
||||
v_group_11_23_1_1,23,cal-zh-2,5.743518393966814,1.014277087325884,0.00687395207239754,0.6601500476920513,3.7382131461667756,0.7596660596274238,True
|
||||
v_group_11_23_1_1,23,cal-en-1,5.302647318583285,1.017577288930986,0.003548773020918583,0.7088162920638876,3.693677965660293,0.8320764093653809,True
|
||||
v_group_11_23_1_1,23,cal-en-2,5.531949790619829,1.0131309250405522,0.01940198485736644,0.6839220249351297,3.734386355335804,0.8078766163541967,True
|
||||
v_group_15_19_0_0,15,cal-zh-1,1.4889264199068712,1.3489563513441696,0.0006288095021672615,0.987709016088177,1.0901954297991183,0.8877498072305449,True
|
||||
v_group_15_19_0_0,15,cal-zh-2,1.4959402679937688,1.3369783639099366,0.00629721011103605,1.0306801490991593,1.153224300466778,0.870095812544882,True
|
||||
v_group_15_19_0_0,15,cal-en-1,1.4464469797591204,1.393142174032719,-0.006848119583179312,1.0494730733248452,1.0896283132790958,0.8431296318979474,True
|
||||
v_group_15_19_0_0,15,cal-en-2,1.4390046814232476,1.3616912479583367,0.02178520288007536,0.945654892269824,0.9993468189117051,0.8616995725007672,True
|
||||
v_group_15_19_0_0,19,cal-zh-1,1.7146135990894333,1.239371229679107,-0.009380026003655905,0.924412820637524,1.2788829976697977,0.8981518208937578,True
|
||||
v_group_15_19_0_0,19,cal-zh-2,1.7249137704705353,1.227128912216245,0.00018654762297319835,0.9297865768829101,1.3069545131712863,0.8696147401278246,True
|
||||
v_group_15_19_0_0,19,cal-en-1,1.6548669580299105,1.2411786570978414,0.014667209713148848,1.0160297718826663,1.3546753227249124,0.881092409528862,True
|
||||
v_group_15_19_0_0,19,cal-en-2,1.673159593816707,1.2528114503512993,-0.0059298921036643705,0.9245752784459058,1.2347923519566644,0.8766963854032839,True
|
||||
v_group_15_19_0_1,15,cal-zh-1,1.804887170065885,1.214390113703868,-0.016376441306390602,0.987709016088177,1.467982414200274,0.8064351341772407,True
|
||||
v_group_15_19_0_1,15,cal-zh-2,1.7773910862202122,1.2211764345378788,-0.013986240198165106,1.0306801490991593,1.5001286120020865,0.7785773573697256,True
|
||||
v_group_15_19_0_1,15,cal-en-1,1.686562221021503,1.2268081960274786,0.016534782255695414,1.0494730733248452,1.442769654767915,0.7841711787897303,True
|
||||
v_group_15_19_0_1,15,cal-en-2,1.7748865810021386,1.2111381292557795,-0.0008939407406706813,0.945654892269824,1.3858288646069592,0.7788798006104031,True
|
||||
v_group_15_19_0_1,19,cal-zh-1,2.1856448892796303,1.1386641444332937,-0.02412993084094788,0.924412820637524,1.774393412569017,0.78672599419051,True
|
||||
v_group_15_19_0_1,19,cal-zh-2,2.1712322207767296,1.1332624680264383,-0.011359332364659774,0.9297865768829101,1.7813901290577085,0.7770495715508153,True
|
||||
v_group_15_19_0_1,19,cal-en-1,2.055824948957836,1.1490822376507837,-0.007135267921357172,1.0160297718826663,1.8177805604154877,0.7374691432205773,True
|
||||
v_group_15_19_0_1,19,cal-en-2,2.17388255520741,1.1315707573057567,-0.009126331128195086,0.9245752784459058,1.7762195212389158,0.7603193585912,True
|
||||
v_group_15_19_1_0,15,cal-zh-1,1.532318618160802,1.3424266693381535,-0.019747860267657357,0.955093413607095,1.0901954297991183,0.9354864589344563,True
|
||||
v_group_15_19_1_0,15,cal-zh-2,1.5463651322948957,1.3133737888640307,-0.0021133251139994033,0.9794676155600762,1.153224300466778,0.922000147520677,True
|
||||
v_group_15_19_1_0,15,cal-en-1,1.4896877984741774,1.3287970357227463,0.016792137420960727,0.9719451781828745,1.0896283132790958,0.909659445095159,True
|
||||
v_group_15_19_1_0,15,cal-en-2,1.432232594331915,1.3724032437192915,0.018110219829984005,0.9576006168989177,0.9993468189117051,0.8996332967526411,True
|
||||
v_group_15_19_1_0,19,cal-zh-1,1.6406137413588644,1.2749327756058746,-0.013870646244922544,0.9938292047607972,1.2788829976697977,0.9460771839538294,True
|
||||
v_group_15_19_1_0,19,cal-zh-2,1.6262258146574327,1.2716208220826926,-0.0035679693751431416,1.0219678949160262,1.3069545131712863,0.9377398517290505,True
|
||||
v_group_15_19_1_0,19,cal-en-1,1.651701843236467,1.2487359479520495,0.00809472848283564,1.024175023002598,1.3546753227249124,0.9424453228368641,True
|
||||
v_group_15_19_1_0,19,cal-en-2,1.5775625574756023,1.2804520656782235,0.011853614932710978,1.0022375405997395,1.2347923519566644,0.9272616030546321,True
|
||||
v_group_15_19_1_1,15,cal-zh-1,1.8403047414676552,1.1973324207451104,-0.007918063352877707,0.955093413607095,1.467982414200274,0.932187127152001,True
|
||||
v_group_15_19_1_1,15,cal-zh-2,1.8539870312314664,1.2105097137878356,-0.029885686727297044,0.9794676155600762,1.5001286120020865,0.9143567317334098,True
|
||||
v_group_15_19_1_1,15,cal-en-1,1.7880192693421022,1.2045281806364827,0.0021806323080684623,0.9719451781828745,1.442769654767915,0.8952989847156116,True
|
||||
v_group_15_19_1_1,15,cal-en-2,1.7587634881557734,1.2152965234382835,0.000382239673244624,0.9576006168989177,1.3858288646069592,0.879697622008253,True
|
||||
v_group_15_19_1_1,19,cal-zh-1,2.0460983935200234,1.1460098560387637,0.0003285378306348175,0.9938292047607972,1.774393412569017,0.8896973541723697,True
|
||||
v_group_15_19_1_1,19,cal-zh-2,2.019241635776911,1.1584212184521834,-0.011171594468437983,1.0219678949160262,1.7813901290577085,0.907151539850099,True
|
||||
v_group_15_19_1_1,19,cal-en-1,2.016918558520598,1.136373474362082,0.023160410367877377,1.024175023002598,1.8177805604154877,0.850070872121062,True
|
||||
v_group_15_19_1_1,19,cal-en-2,2.028714458857219,1.1447086159744448,0.007110152945459481,1.0022375405997395,1.7762195212389158,0.8638388199091266,True
|
||||
v_group_15_23_0_0,15,cal-zh-1,1.7788500641529106,1.1786084403661208,0.0376399213808877,0.987709016088177,1.4907293944773339,0.872437208093566,True
|
||||
v_group_15_23_0_0,15,cal-zh-2,1.8688297358556236,1.1741550536981917,0.01281282718504799,1.0306801490991593,1.6404696336534477,0.8477453446118416,True
|
||||
v_group_15_23_0_0,15,cal-en-1,1.7892416939408766,1.1816232704804672,0.030209177290550816,1.0494730733248452,1.5891367632744366,0.8412386149568803,True
|
||||
v_group_15_23_0_0,15,cal-en-2,1.8269559494111811,1.1984125927843217,-0.004502838645593844,0.945654892269824,1.4416319070114054,0.8508670919090863,True
|
||||
v_group_15_23_0_0,23,cal-zh-1,4.430165191296784,1.0215361316616758,0.020890319017414442,0.8581805444872094,3.7217299106699713,0.898985370561607,True
|
||||
v_group_15_23_0_0,23,cal-zh-2,4.446340123621702,1.0330729765028928,-0.028528641506488327,0.8633901627496633,3.7160262733514156,0.8473851804595944,True
|
||||
v_group_15_23_0_0,23,cal-en-1,4.2768583577960415,1.0249065750037705,0.014592445284544597,0.9261527312567746,3.8647659658702014,0.8470084126920633,True
|
||||
v_group_15_23_0_0,23,cal-en-2,4.543107377017192,1.0165137070122734,0.037460127974223954,0.8559786593646564,3.825627667489882,0.8593179045603285,True
|
||||
v_group_15_23_0_1,15,cal-zh-1,1.6678413378612311,1.261231412558918,-0.012468400813807994,0.987709016088177,1.306137724137243,0.8447393624652317,True
|
||||
v_group_15_23_0_1,15,cal-zh-2,1.7688786456018888,1.2529237429445432,-0.04807703398777394,1.0306801490991593,1.4551149792266085,0.822648166634554,True
|
||||
v_group_15_23_0_1,15,cal-en-1,1.7092392637304523,1.2870581972187087,-0.059434808977446324,1.0494730733248452,1.3937214238105464,0.815871323737458,True
|
||||
v_group_15_23_0_1,15,cal-en-2,1.7217455617396618,1.2276825258211514,0.0008619160190119963,0.945654892269824,1.3262199953639806,0.8280720757298574,True
|
||||
v_group_15_23_0_1,23,cal-zh-1,4.3655990266485265,1.0262543634634753,0.00438885000547065,0.8581805444872094,3.6506272548827043,0.8542466567662336,True
|
||||
v_group_15_23_0_1,23,cal-zh-2,4.5083507559722396,1.0412637109584928,-0.06686354703296474,0.8633901627496633,3.7382131461667756,0.8077171404870229,True
|
||||
v_group_15_23_0_1,23,cal-en-1,4.138846052304975,1.0377741674370184,-0.028126121398841818,0.9261527312567746,3.693677965660293,0.8585840813051769,True
|
||||
v_group_15_23_0_1,23,cal-en-2,4.47061297628276,1.0247330987885008,0.005369952299778947,0.8559786593646564,3.734386355335804,0.8332826705383386,True
|
||||
v_group_15_23_1_0,15,cal-zh-1,1.8420892619585334,1.1802056952058717,0.013732467356243254,0.955093413607095,1.4907293944773339,0.9365789725851769,True
|
||||
v_group_15_23_1_0,15,cal-zh-2,1.973477558291785,1.1782951166712767,-0.02670756199646403,0.9794676155600762,1.6404696336534477,0.9272840689749634,True
|
||||
v_group_15_23_1_0,15,cal-en-1,1.8956305180128352,1.1594023775540188,0.02441319255911807,0.9719451781828745,1.5891367632744366,0.9277506342031291,True
|
||||
v_group_15_23_1_0,15,cal-en-2,1.7652154144328318,1.1725402036395032,0.04996210399019543,0.9576006168989177,1.4416319070114054,0.9213071776994103,True
|
||||
v_group_15_23_1_0,23,cal-zh-1,4.159015828221343,1.033320878003646,-0.012121062382320224,0.9246757833645002,3.7217299106699713,0.9437551340910022,True
|
||||
v_group_15_23_1_0,23,cal-zh-2,4.144547882497239,1.037345657116425,-0.026848901591953467,0.9300902838330746,3.7160262733514156,0.9301063133822521,True
|
||||
v_group_15_23_1_0,23,cal-en-1,4.409509910219656,1.0239889207532207,0.011571080243910885,0.8974869341337,3.8647659658702014,0.9181991617940822,True
|
||||
v_group_15_23_1_0,23,cal-en-2,4.188372419313235,1.0237695533783326,0.023815663280659302,0.9351033615057815,3.825627667489882,0.9303213714123816,True
|
||||
v_group_15_23_1_1,15,cal-zh-1,1.6742246555274294,1.2242514030816214,0.024556336429905068,0.955093413607095,1.306137724137243,0.9066692105052758,True
|
||||
v_group_15_23_1_1,15,cal-zh-2,1.7637685664433094,1.1872286498570954,0.03237105868029527,0.9794676155600762,1.4551149792266085,0.92492082291285,True
|
||||
v_group_15_23_1_1,15,cal-en-1,1.6957553689436693,1.182575819001376,0.06298271353635143,0.9719451781828745,1.3937214238105464,0.9041869405401716,True
|
||||
v_group_15_23_1_1,15,cal-en-2,1.7031142356284832,1.2297380889959841,0.006304396927961493,0.9576006168989177,1.3262199953639806,0.9054075504283124,True
|
||||
v_group_15_23_1_1,23,cal-zh-1,3.998183598892831,1.0127091300259607,0.07615156111428786,0.9246757833645002,3.6506272548827043,0.9404901171595237,True
|
||||
v_group_15_23_1_1,23,cal-zh-2,4.061354148856786,1.0104897407817093,0.08202162975656943,0.9300902838330746,3.7382131461667756,0.9250116370507038,True
|
||||
v_group_15_23_1_1,23,cal-en-1,4.18796996822605,1.0175896117557988,0.04846150507477296,0.8974869341337,3.693677965660293,0.9359822343767364,True
|
||||
v_group_15_23_1_1,23,cal-en-2,4.071533010087668,1.0195260591542008,0.046462053872697195,0.9351033615057815,3.734386355335804,0.9447173253485517,True
|
||||
v_group_19_23_0_0,19,cal-zh-1,1.8745265263798114,1.1995571865913242,-0.022997127013888195,1.2788829976697977,1.998487550293757,0.9325036643456432,True
|
||||
v_group_19_23_0_0,19,cal-zh-2,1.8328807217336998,1.170961552220141,0.028954740139850846,1.3069545131712863,2.045747554078659,0.9230486141781258,True
|
||||
v_group_19_23_0_0,19,cal-en-1,1.930487393460547,1.1756634064087126,-0.009282129229244759,1.3546753227249124,2.224432280954561,0.9134347169888221,True
|
||||
v_group_19_23_0_0,19,cal-en-2,1.8726809982287047,1.1896407625619037,-0.00920008421324783,1.2347923519566644,1.9437566759965914,0.9133740317700645,True
|
||||
v_group_19_23_0_0,23,cal-zh-1,3.6281215313291266,1.0356310813024032,0.01567271908304184,1.0623511749593015,3.7217299106699713,0.9591443741362935,True
|
||||
v_group_19_23_0_0,23,cal-zh-2,3.5702710625598764,1.0291216963824688,0.041622483580195296,1.071135271026525,3.7160262733514156,0.9417299404623231,True
|
||||
v_group_19_23_0_0,23,cal-en-1,3.578680739818273,1.0423694183562515,-0.00290903207187477,1.1256980280760467,3.8647659658702014,0.9211088369673076,True
|
||||
v_group_19_23_0_0,23,cal-en-2,3.6690827820479286,1.0339657929722907,0.018326121675948104,1.0780809209829487,3.825627667489882,0.9429493631250817,True
|
||||
v_group_19_23_0_1,19,cal-zh-1,1.7836208286365327,1.200739631917659,0.008487162513350634,1.2788829976697977,1.8996977291321722,0.9133059034329317,True
|
||||
v_group_19_23_0_1,19,cal-zh-2,1.8190257598424813,1.1915491556474416,0.007097548884796675,1.3069545131712863,1.9952042390640452,0.9240016358209041,True
|
||||
v_group_19_23_0_1,19,cal-en-1,1.7845491754075269,1.2041195541474723,0.0039865888310737395,1.3546753227249124,2.007678325451055,0.9181491002764329,True
|
||||
v_group_19_23_0_1,19,cal-en-2,1.7731976899678628,1.2047172390353482,0.0075403538293179195,1.2347923519566644,1.8174646092329199,0.9016250663486255,True
|
||||
v_group_19_23_0_1,23,cal-zh-1,3.5883787413911357,1.044236539629499,-0.00987264184255781,1.0623511749593015,3.6506272548827043,0.9399182372136009,True
|
||||
v_group_19_23_0_1,23,cal-zh-2,3.643749896030629,1.0440680827522602,-0.013915981808954824,1.071135271026525,3.7382131461667756,0.9339899771606491,True
|
||||
v_group_19_23_0_1,23,cal-en-1,3.440218484333185,1.048452842930054,-0.010455002770191874,1.1256980280760467,3.693677965660293,0.9195235502876105,True
|
||||
v_group_19_23_0_1,23,cal-en-2,3.5871844137091946,1.0355851560301488,0.01888779353862093,1.0780809209829487,3.734386355335804,0.9346226458892415,True
|
||||
v_group_19_23_1_0,19,cal-zh-1,1.4800575486942358,1.3140959343179668,0.034611952398780246,1.774393412569017,1.998487550293757,0.9055209782370564,True
|
||||
v_group_19_23_1_0,19,cal-zh-2,1.4766332372792659,1.2858184128747454,0.060247204603029875,1.7813901290577085,2.045747554078659,0.9074665488172936,True
|
||||
v_group_19_23_1_0,19,cal-en-1,1.5533588721806393,1.2693870635554636,0.03454134797753171,1.8177805604154877,2.224432280954561,0.8803616372137686,True
|
||||
v_group_19_23_1_0,19,cal-en-2,1.459818813477681,1.3339934498959043,0.03037056864176428,1.7762195212389158,1.9437566759965914,0.86661924962752,True
|
||||
v_group_19_23_1_0,23,cal-zh-1,2.4753288539650233,1.0666514413221528,0.05562692950325676,1.6037418895146065,3.7217299106699713,0.9473553994139632,True
|
||||
v_group_19_23_1_0,23,cal-zh-2,2.5537234995109688,1.0545437826545352,0.07078427806894087,1.5345092777248834,3.7160262733514156,0.9508837349729231,True
|
||||
v_group_19_23_1_0,23,cal-en-1,2.7161183024630664,1.069778139783809,0.013586821704868057,1.5221878008476841,3.8647659658702014,0.9025320375982946,True
|
||||
v_group_19_23_1_0,23,cal-en-2,2.6160545181669126,1.07664586826024,0.012403973663984826,1.5744496886827666,3.825627667489882,0.915945891448575,True
|
||||
v_group_19_23_1_1,19,cal-zh-1,1.4421072641207509,1.346985675896312,0.031080076193980306,1.774393412569017,1.8996977291321722,0.8849842430357271,True
|
||||
v_group_19_23_1_1,19,cal-zh-2,1.4917766569779072,1.3319118712106188,0.012973744539771938,1.7813901290577085,1.9952042390640452,0.8948121963300845,True
|
||||
v_group_19_23_1_1,19,cal-en-1,1.4493584961004353,1.312269832216519,0.0539658214081874,1.8177805604154877,2.007678325451055,0.8777780602425982,True
|
||||
v_group_19_23_1_1,19,cal-en-2,1.4102442349496405,1.378240504440641,0.02843561967763726,1.7762195212389158,1.8174646092329199,0.8390793032559974,True
|
||||
v_group_19_23_1_1,23,cal-zh-1,2.4603114284306513,1.0808291900380635,0.028223943937497838,1.6037418895146065,3.6506272548827043,0.9361486491200699,True
|
||||
v_group_19_23_1_1,23,cal-zh-2,2.63302780410497,1.080838741913299,0.000355531452809531,1.5345092777248834,3.7382131461667756,0.928025884069934,True
|
||||
v_group_19_23_1_1,23,cal-en-1,2.59592250309322,1.0697959061106468,0.030778817194381258,1.5221878008476841,3.693677965660293,0.9025948939612929,True
|
||||
v_group_19_23_1_1,23,cal-en-2,2.561917775156263,1.0801267623962583,0.013140210157671665,1.5744496886827666,3.734386355335804,0.9034472216505324,True
|
||||
|
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"DELIVERY.md": "fc4d58d1452d88f8017493f8d253afb5728ad283ca73b2988f82fb6193d19104",
|
||||
"REPORT.md": "9b5af27c87e785890c125b14da5775001d8c97a3354e33fa6e32e8f825bb0d7b",
|
||||
"calibration-output-metrics.csv": "082ef1b242f8def32f9b3ca0af41ed921eeeae228946f9dfb90baebf9719a0d8",
|
||||
"calibration-probability-metrics.csv": "45b572a17d6ddba1442baa12e9a3d0c55aa232e7c9c2b762b661de6a0427e0c1",
|
||||
"calibration-summary.json": "aaf14c5461a26695a6758252aa5fe56543d15e5de172d2549c663fea7754434a",
|
||||
"calibration-value-metrics.csv": "958c7a3b57e7e023c24d2b3cd420a7df561814c9568826fe1b7e44fe9d7b4003",
|
||||
"case-audit.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"conditional-case-audit.json": "a4636ca9ec03b02db35e19e842052a9cca1ffd01e4a2fb3c16ebfc14b20ec3f7",
|
||||
"conditional-fresh-baseline-token-nll.npy": "01f77fd1f50902f7839adcd3fb670d3bc5d4bf190c5c6307abc215d3f8cac566",
|
||||
"conditional-fresh-probabilities.npz": "5ad0702072c56b89f853429f384475620dbb45e2ae4bbc7adf0bd77dc9d3be8c",
|
||||
"conditional-fresh-samples.json": "498f3829af0a2d5317e3742401704f90e7b95210d0c9f7095510c25ceafa4b5c",
|
||||
"conditional-fresh-source-diagnostic.csv": "f58e73edd6393e00577d5a578575b52b924a92c976e3e883b81ce2db0cea38d9",
|
||||
"conditional-function-metrics.csv": "e23a4629903a6394bc42971526dba7c1a2108b483c6bd863823d9d4a156c0d54",
|
||||
"conditional-protocol.json": "7d6d954b2c5736894eac9571b82a0bb1f2af7531ba000ea88ccf30e142aea063",
|
||||
"conditional-status.json": "cbb29046c1c434073bed396defb486a56e85a7dc76094ef9208daee7e217d449",
|
||||
"conditional.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"controls.csv": "6f779c13c8911ddf314265131e1bfd567813375d8a75b8a7515194955b381f36",
|
||||
"external-caches.json": "b886a05610764dea97104ddcf86024daf84f78d38e6d4fbfc7cd591ad394aacc",
|
||||
"figures/conditional_cross_layer_probability_maps.pdf": "3cff1ac6a3afb8b059457a1dcb24da7d720c355291ca5d766f915ee53180e62a",
|
||||
"figures/conditional_cross_layer_probability_maps.png": "c117b38afdd14a134287a80d9eda93c076bdced796b222a9b1bc6e1497b13c80",
|
||||
"figures/conditional_cross_layer_probability_maps.svg": "632b05c87f9d1e4bef95c7909ce76b3fa6cf984aaf9763595791d3901188b197",
|
||||
"figures/conditional_probability_mass_and_readout.pdf": "5843f84122903d2ae1be103903711e7d758d1fed97685ebb223ba3a1bfc32bce",
|
||||
"figures/conditional_probability_mass_and_readout.png": "54bb54f44b8c32004f5315523983ec23dbf3af251f17bb857b503321d6459427",
|
||||
"figures/conditional_probability_mass_and_readout.svg": "477b97af4b21a22dd8b7a876d40cdda64f732ed2c4956734cd524ddd49641c1b",
|
||||
"figures/cross_layer_output_errors.pdf": "01c445c5901d80064bff11ac90d7559c056db5f70f4f1604e93647e451adeca6",
|
||||
"figures/cross_layer_output_errors.png": "10e4e7f2682b9cfd95b64844a44db7444d31e42b230fbcd75a60d80afc4b3f5e",
|
||||
"figures/cross_layer_output_errors.svg": "7f1ef30e756bc86a848581a3340fe6bd4a1b7bad2f37f61fe36cbaf639065cb2",
|
||||
"figures/cross_layer_qk_divergence.pdf": "aadc2d731ffc9231b027206d884a7750acae1cdaced952d1b25860a70248d31e",
|
||||
"figures/cross_layer_qk_divergence.png": "3708409883b050dbbf37d182cdd20152348e5b01434e46bf38f505583850937a",
|
||||
"figures/cross_layer_qk_divergence.svg": "37553b90b013ec04510620a77af68cc71c6f55e34342420b5d34d7b5d3a7a321",
|
||||
"figures/value_geometry_and_direct_error.pdf": "b21a0cbbfdfe10b7d3455cfaa66ed15274ab47519d4dbd9400313cb40ecc6360",
|
||||
"figures/value_geometry_and_direct_error.png": "ffeffd6eb17ee76c17c840779f099053b724fb1650d1711c2e3e93a659dabc0d",
|
||||
"figures/value_geometry_and_direct_error.svg": "a7f9fddceebe59b62578a7538860da5a51fc578b70f446755b6e0069fa48a4d8",
|
||||
"final-source-hashes.json": "ad262d604d2c190d9b3f98787b2b27a9304b7aff38cccc23629f2bbe0557f341",
|
||||
"final-tests.txt": "ff394785a29c31f5d2b36b52e94cc90444a3f763a941200aae0af53816380cbf",
|
||||
"first-attempt-error.txt": "fe88d16448f6c4cbc0ef9d07e9123c5aad4dead9b29ef72d027008d5b6303d4a",
|
||||
"first-attempt-protocol.json": "0c21e8efd2707e2c79fbc5b661a52597ed8c30b0bf56d339161e5d70ae3ce01e",
|
||||
"first-attempt-status.json": "30ba97cb5b317325758faf8f4775d95ab729aa94c21321107fe349b8f411d049",
|
||||
"head-assignment-costs.csv": "6fd54069b8b57788c544cc947219819610674dc50f8752c08713c195ed61deae",
|
||||
"preflight-tests.txt": "a8287313a84276cf4d78e2193cb8fd612f5c1891d95d3fb2f227e55ea68bcee0",
|
||||
"protocol.json": "5e053099c4c0269d79a8b72f7dc2236d54726d9156ca83ab3f674f0efccdf4d1",
|
||||
"raw-qk-diagnostics.csv": "b92d91c26752ca1a2cf71e50857e7c7f24bc0417db0a969ad5812fe8cba90e35",
|
||||
"report.log": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
"retention-policy.json": "feac7fe3ee9c87845c7d39d5e966c3a01ecded8e2f589ffd9bdf525c0dd3a675",
|
||||
"run.log": "444f30f7565e0988ce8c805fb736caf0226e7cdd0a74693cf1e9bb967d8b2893",
|
||||
"selection.json": "f21c607824ea13202c0ffa553d023e1d575aed888d73de881f6bc4fbc9b39635",
|
||||
"source-conditioned-retrieval-diagnostic.csv": "fbfa1aa2d6e1cd75fb198bef1e607540cafbca8f56ab3623960e3caeb990f998",
|
||||
"source-provenance.json": "822b0780cc3a88794f34d87d060688fba49aaff9b9cb2008aadd6b8e81471407",
|
||||
"source-samples.json": "b70919fb8549e27386379b9de58903716cfbd388a9ad8ffde21a2eacf1626b7e",
|
||||
"status.json": "3d34c59780419a919e8bb25023e683dfb87eb2040a520040e28e8c99df0db743"
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"passed_recomputation": true,
|
||||
"strict_failures": [
|
||||
{
|
||||
"sample": "fresh-en-2",
|
||||
"field": "js",
|
||||
"value": 0.018921025381545404,
|
||||
"limit": 0.01
|
||||
},
|
||||
{
|
||||
"sample": "fresh-en-2",
|
||||
"field": "js_p95",
|
||||
"value": 0.07294334072098421,
|
||||
"limit": 0.05
|
||||
},
|
||||
{
|
||||
"sample": "fresh-en-2",
|
||||
"field": "total_variation_p95",
|
||||
"value": 0.2387305877473409,
|
||||
"limit": 0.2
|
||||
}
|
||||
],
|
||||
"pattern_classification": "self_token_dominated",
|
||||
"minimum_same_input_target_self_mass": 0.9571344137191773,
|
||||
"minimum_same_input_donor_self_mass": 0.9207242393493652,
|
||||
"minimum_same_input_argmax_agreement": 1.0,
|
||||
"minimum_shared_top5_probability_mass": 0.9796907782554627,
|
||||
"maximum_same_input_head_output_error": 0.03814551024093568,
|
||||
"no_success_relabeling": true,
|
||||
"network_intervention_not_run_due_to_fresh_gate_failure": true
|
||||
}
|
||||
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"samples": [
|
||||
{
|
||||
"id": "fresh-zh-1",
|
||||
"language": "zh",
|
||||
"text": "\u690d\u7269\u5b66\u5bb6\u5728\u4e0d\u540c\u6d77\u62d4\u91c7\u96c6\u4e86\u53f6\u7247\u6837\u672c\uff0c\u5e76\u4e3a\u6bcf\u4e00\u4efd\u6807\u672c\u8bb0\u5f55\u6e29\u5ea6\u3001\u5149\u7167\u548c\u571f\u58e4\u6e7f\u5ea6\u3002\u56de\u5230\u5b9e\u9a8c\u5ba4\u540e\uff0c\u5979\u6309\u5730\u70b9\u6574\u7406\u6807\u7b7e\uff0c\u5148\u6838\u5bf9\u7f3a\u5931\u8bb0\u5f55\uff0c\u518d\u6bd4\u8f83\u4e0d\u540c\u73af\u5883\u4e2d\u7684\u53f6\u7247\u5f62\u72b6\u3002",
|
||||
"token_ids": [
|
||||
99951,
|
||||
101071,
|
||||
115802,
|
||||
111685,
|
||||
102099,
|
||||
95759,
|
||||
111583,
|
||||
109928,
|
||||
3709,
|
||||
115026,
|
||||
134176,
|
||||
116599,
|
||||
98151,
|
||||
99472,
|
||||
5205,
|
||||
114180,
|
||||
95793,
|
||||
104074,
|
||||
102454,
|
||||
1710,
|
||||
103744,
|
||||
103911,
|
||||
95946,
|
||||
3709,
|
||||
96343,
|
||||
96656,
|
||||
100560,
|
||||
99946,
|
||||
101659,
|
||||
3709,
|
||||
96218,
|
||||
113089
|
||||
],
|
||||
"full_token_count": 43,
|
||||
"text_sha256": "3c9014e0a8b9d2ff55e07d94871d018e9489fe15330c741c5fe27cb71759e864"
|
||||
},
|
||||
{
|
||||
"id": "fresh-zh-2",
|
||||
"language": "zh",
|
||||
"text": "\u5982\u679c\u4e00\u4e2a\u76d2\u5b50\u91cc\u6709\u5341\u4e8c\u679a\u84dd\u8272\u68cb\u5b50\u548c\u516b\u679a\u767d\u8272\u68cb\u5b50\uff0c\u968f\u673a\u53d6\u51fa\u4e00\u679a\u540e\u4e0d\u653e\u56de\uff0c\u7b2c\u4e8c\u6b21\u53d6\u5230\u84dd\u8272\u7684\u6982\u7387\u9700\u8981\u6839\u636e\u7b2c\u4e00\u6b21\u7684\u7ed3\u679c\u5206\u522b\u8ba1\u7b97\u3002\u8bf7\u5148\u5217\u51fa\u5404\u4e2a\u4e8b\u4ef6\uff0c\u518d\u68c0\u67e5\u5b83\u4eec\u7684\u6982\u7387\u4e4b\u548c\u3002",
|
||||
"token_ids": [
|
||||
127356,
|
||||
98996,
|
||||
98970,
|
||||
95762,
|
||||
98175,
|
||||
101184,
|
||||
104145,
|
||||
99357,
|
||||
111324,
|
||||
96702,
|
||||
101184,
|
||||
103828,
|
||||
129730,
|
||||
3709,
|
||||
102038,
|
||||
96284,
|
||||
98938,
|
||||
101184,
|
||||
95946,
|
||||
122271,
|
||||
96120,
|
||||
3709,
|
||||
109387,
|
||||
96284,
|
||||
95839,
|
||||
116981,
|
||||
104514,
|
||||
122501,
|
||||
103720,
|
||||
109146,
|
||||
99446,
|
||||
97792
|
||||
],
|
||||
"full_token_count": 44,
|
||||
"text_sha256": "e7c5a7687e0aac718ec75b92c083b08a2481cf145f4e06553b6d9b86fea64b2a"
|
||||
},
|
||||
{
|
||||
"id": "fresh-en-1",
|
||||
"language": "en",
|
||||
"text": "A technician recorded the vibration of a small motor before and after replacing its bearings. She used the same mounting position and sampling interval for both measurements. The final notebook included the raw traces, instrument settings, and a brief explanation of unusual observations.",
|
||||
"token_ids": [
|
||||
32,
|
||||
51715,
|
||||
12076,
|
||||
279,
|
||||
46219,
|
||||
314,
|
||||
264,
|
||||
2526,
|
||||
8604,
|
||||
1518,
|
||||
321,
|
||||
1238,
|
||||
24101,
|
||||
1141,
|
||||
33309,
|
||||
13,
|
||||
2838,
|
||||
1429,
|
||||
279,
|
||||
1788,
|
||||
32525,
|
||||
2234,
|
||||
321,
|
||||
24102,
|
||||
9581,
|
||||
364,
|
||||
2107,
|
||||
20934,
|
||||
13,
|
||||
561,
|
||||
1534,
|
||||
35935
|
||||
],
|
||||
"full_token_count": 48,
|
||||
"text_sha256": "aaf856737260bd8443aa4a0a00cdf7c3d9c2eec62efeb294c12314d377c07024"
|
||||
},
|
||||
{
|
||||
"id": "fresh-en-2",
|
||||
"language": "en",
|
||||
"text": "The function walks through a list of integers and stores each running total in a new list. An empty input should return an empty result. Before changing the implementation, compare a short example by hand and make sure negative numbers preserve the intended behavior.",
|
||||
"token_ids": [
|
||||
760,
|
||||
709,
|
||||
21780,
|
||||
1472,
|
||||
264,
|
||||
1103,
|
||||
314,
|
||||
24959,
|
||||
321,
|
||||
10220,
|
||||
1754,
|
||||
4162,
|
||||
2702,
|
||||
303,
|
||||
264,
|
||||
491,
|
||||
1103,
|
||||
13,
|
||||
1473,
|
||||
4147,
|
||||
1879,
|
||||
1220,
|
||||
460,
|
||||
449,
|
||||
4147,
|
||||
1067,
|
||||
13,
|
||||
12851,
|
||||
9722,
|
||||
279,
|
||||
7873,
|
||||
11
|
||||
],
|
||||
"full_token_count": 48,
|
||||
"text_sha256": "a954adb0d349960060a1e95cd68ffe6d53eb324c05b11fae3ece5c5fb1c54f4b"
|
||||
}
|
||||
],
|
||||
"candidate_already_fixed": true
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
mode,sample,target_self_mass,donor_self_mass,argmax_agreement,shared_top5_mass_target,shared_top5_mass_donor,js,js_p95,top5,js_all_queries,first_key_mass_a,first_key_mass_b,self_mass_a,recent3_mass_a,js_without_first_key,total_variation,total_variation_p95,head_output_error
|
||||
same_H23,fresh-zh-1,0.9743062949180603,0.977042281627655,1.0,0.991016309261322,0.9934020781517029,0.0037236368694447673,0.0079102590864739,0.7440000000000001,0.0032850090619036747,0.00021911789479418076,4.400159336682918e-05,0.9743062949180603,0.9798486093860629,0.0036678289509953586,0.016836133809252942,0.04107042597061077,0.010286364768136316
|
||||
same_H23,fresh-zh-2,0.9571344137191773,0.9584921860694885,1.0,0.9909958076477051,0.9924082660675049,0.004976472461140254,0.01349132707464056,0.664,0.004247219813864316,0.00015354083661804906,0.00022490669611215707,0.9571344137191773,0.9621559375351353,0.004921408131390152,0.024246559643496538,0.09302036721131784,0.017477561538756986
|
||||
same_H23,fresh-en-1,0.9719993090629577,0.9676549506187438,1.0,0.9903016018867493,0.9872744035720825,0.004694315735679507,0.015873677972810498,0.608,0.0038353368167795116,0.0001855553540008259,3.9933478419698076e-05,0.9719993090629577,0.9802694441333734,0.00464392100368096,0.01997736181091568,0.06704465285702092,0.013026994354340068
|
||||
same_H23,fresh-en-2,0.9671855711936951,0.9207242393493652,1.0,0.9861254906654358,0.9796907782554627,0.018921025381545404,0.07294334072098421,0.624,0.01696863122473362,0.0003818481252528727,0.00019207453090075433,0.9671855711936951,0.9737620480834448,0.01885906674080864,0.0696232315711734,0.2387305877473409,0.03814551024093568
|
||||
actual_H3_to_H23,fresh-zh-1,0.9743062949180603,0.6507668775320054,0.92,0.9882780170440674,0.7978756380081177,0.11746368897918857,0.26895508209583746,0.576,0.09798867647013344,0.00021911789479418076,0.01965882926248014,0.9743062949180603,0.9798486093860629,0.11175641212474162,0.32560704671838947,0.6432357737681735,0.20929520855838468
|
||||
actual_H3_to_H23,fresh-zh-2,0.9571344137191773,0.6873014342784881,0.84,0.990085847377777,0.8862988948822021,0.09517489235332245,0.2911471138258881,0.624,0.07959192858248479,0.00015354083661804906,0.02856478527188301,0.9571344137191773,0.9621559375351353,0.08644017482739014,0.27132388192189866,0.6776102213439572,0.2098944880774744
|
||||
actual_H3_to_H23,fresh-en-1,0.9719993090629577,0.705381019115448,0.96,0.9859950566291809,0.7831746447086334,0.09698350937841232,0.21686503078033964,0.4720000000000001,0.08832854132279526,0.0001855553540008259,0.07436327643692493,0.9719993090629577,0.9802694441333734,0.07319379414871928,0.26933109119776416,0.556653092761553,0.1844591126204157
|
||||
actual_H3_to_H23,fresh-en-2,0.9671855711936951,0.645685727596283,0.92,0.9823226451873779,0.7631779217720032,0.11576751242382403,0.21763839763274784,0.52,0.09630240923791714,0.0003818481252528727,0.06853020414710045,0.9671855711936951,0.9737620480834448,0.09481997920349867,0.324279492621281,0.5482284413611068,0.1875597912744845
|
||||
|
@@ -0,0 +1,13 @@
|
||||
split,mode,sample,js,js_p95,top5,js_all_queries,first_key_mass_a,first_key_mass_b,self_mass_a,recent3_mass_a,js_without_first_key,total_variation,total_variation_p95,output_error_a,output_error_b,output_cosine,output_rms_a,output_rms_b,target_uniform_js,active
|
||||
calibration,same_H23,cal-zh-1,0.008415722980279438,0.031573834926377116,0.7040000000000001,0.0069337077183353165,7.760366694128606e-05,2.1067947924393592e-05,0.9555783748626709,0.9601525722321821,0.008398340277904722,0.04018623842512795,0.13212838005524633,0.026349251314652652,0.026351260147296565,0.9996528349179087,0.11959976219091648,0.1195906447557293,0.5309802416332696,True
|
||||
calibration,same_H23,cal-zh-2,0.007717902243658157,0.03905573210168735,0.7040000000000001,0.006164263819976042,0.0001941091476692236,0.00012491250175116874,0.9716920018196106,0.9802002269136574,0.007686862322339637,0.030932499425235845,0.12844441759302733,0.027586039870790727,0.027572262838384706,0.9996198200017125,0.12565684430883853,0.12571963126347582,0.5413895739330946,True
|
||||
calibration,same_H23,cal-en-1,0.0074906268338348625,0.02022429822768962,0.5760000000000001,0.00610444622579555,0.0002340225527950679,3.365668042079051e-05,0.9754962253570557,0.9828815426458823,0.00743507518421024,0.03021933798377063,0.09680565516719065,0.021070817485433223,0.021060321367183655,0.9997782450373727,0.132065390120307,0.13213120934154346,0.5490590500732053,True
|
||||
calibration,same_H23,cal-en-2,0.008403453070963122,0.029975701211805345,0.6639999999999999,0.006803037760409926,0.0002689948538682074,0.0003356811904404822,0.9707730460166931,0.9809613899300166,0.008307414070266451,0.03437363889475137,0.11138522963365163,0.020359309688869905,0.020392032198470827,0.9997937057050059,0.11960599223343558,0.11941406392579591,0.5342052536477747,True
|
||||
heldout,same_H23,test-zh-1,0.004111710088895894,0.011203692605422767,0.7280000000000001,0.0034785477719938953,6.990045674683643e-05,2.4686186429789812e-05,0.9703956890106201,0.974995339689649,0.0040983173533487675,0.018347274587290484,0.048098954225497426,0.010679214006760473,0.010662696004847703,0.9999442634541316,0.11754093822073378,0.11772302551286666,0.5399157945770658,True
|
||||
heldout,same_H23,test-zh-2,0.0050100212276215075,0.020168146314569504,0.664,0.00415046168848993,0.0004483336447265174,0.0001174674271578624,0.9708290266990661,0.9753516262029006,0.004926731474058157,0.022263210957163437,0.0745870985388136,0.014115945446126805,0.014106574840108809,0.9999006566619043,0.11924118249376423,0.11932039110073889,0.5448131547551402,True
|
||||
heldout,same_H23,test-en-1,0.006778759541909737,0.019003309569821318,0.5920000000000001,0.0056630939538435225,0.0005558020923854202,1.8380516977885008e-05,0.9690689063072204,0.9759606437692128,0.006614750987538324,0.02683075259837814,0.0886492732048281,0.014055308482184788,0.014014508384249847,0.999905736342381,0.12221393132973943,0.12256972978021319,0.5386147035414889,True
|
||||
heldout,same_H23,test-en-2,0.008002353893592691,0.028681067875296774,0.584,0.01017978861948556,0.00029325423754926304,0.00019826364135951734,0.9733050465583801,0.9786965364505886,0.0079770412874765,0.0326121916641722,0.12707342054914064,0.017180285438587496,0.017181819178392184,0.9998524097055808,0.12367537051634622,0.12366433060045309,0.538042109961459,True
|
||||
fresh_test,same_H23,fresh-zh-1,0.0037236368694447673,0.0079102590864739,0.7440000000000001,0.0032850090619036747,0.00021911789479418076,4.400159336682918e-05,0.9743062949180603,0.9798486093860629,0.0036678289509953586,0.016836133809252942,0.04107042597061077,0.010286364768136316,0.010271529024909715,0.9999482132303905,0.12073038329199516,0.12090476092962102,0.5414232058637818,True
|
||||
fresh_test,same_H23,fresh-zh-2,0.004976472461140254,0.01349132707464056,0.664,0.004247219813864316,0.00015354083661804906,0.00022490669611215707,0.9571344137191773,0.9621559375351353,0.004921408131390152,0.024246559643496538,0.09302036721131784,0.017477561538756986,0.017463500689023966,0.9998477141736726,0.12627090324242518,0.12637257107110172,0.5364870082694526,True
|
||||
fresh_test,same_H23,fresh-en-1,0.004694315735679507,0.015873677972810498,0.608,0.0038353368167795116,0.0001855553540008259,3.9933478419698076e-05,0.9719993090629577,0.9802694441333734,0.00464392100368096,0.01997736181091568,0.06704465285702092,0.01302127903410833,0.013026994354340068,0.9999152822195794,0.12090631427000591,0.12085326916341445,0.5450853807976066,True
|
||||
fresh_test,same_H23,fresh-en-2,0.018921025381545404,0.07294334072098421,0.624,0.01696863122473362,0.0003818481252528727,0.00019207453090075433,0.9671855711936951,0.9737620480834448,0.01885906674080864,0.0696232315711734,0.2387305877473409,0.03813168423426638,0.03814551024093568,0.9992727894346689,0.11903171602231612,0.11898857245734115,0.5346062977887738,True
|
||||
|
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"classification": "post-screen exploratory metric audit; not a primary-protocol positive",
|
||||
"candidate": {
|
||||
"id": "conditional_qk_head_3_23_7_6",
|
||||
"kind": "qk_head",
|
||||
"i": 3,
|
||||
"j": 23,
|
||||
"a": 7,
|
||||
"b": 6,
|
||||
"perm": null
|
||||
},
|
||||
"conditioning_input_layer": 23,
|
||||
"donor_projection_layer": 3,
|
||||
"target_head": 6,
|
||||
"donor_head": 7,
|
||||
"selection_basis": "one minimum worst-text JS among the already measured source-conditioned pairs; no raw readout/fresh data used",
|
||||
"js_max": 0.01,
|
||||
"js_row_p95_max": 0.05,
|
||||
"mean_total_variation_max": 0.1,
|
||||
"row_total_variation_p95_max": 0.2,
|
||||
"target_head_output_relative_l2_max": 0.2,
|
||||
"target_head_output_cosine_min": 0.98,
|
||||
"primary_query_positions": [
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31
|
||||
],
|
||||
"top5_is_diagnostic_only": true,
|
||||
"active_head_required": true,
|
||||
"no_candidate_fallback": true,
|
||||
"fresh_text_file": "crossqkv/fresh_samples.json",
|
||||
"same_input_network_direction": "layer23 head6 uses QK probability of layer3 head7 recomputed on H23",
|
||||
"actual_cache_separate": "layer3 probability on H3 reused at23; different-input diagnostic, not function-equivalence evidence",
|
||||
"quality_gate": {
|
||||
"mean_nll_delta_max": 0.01,
|
||||
"per_text_p95_nll_delta_max": 0.05
|
||||
},
|
||||
"training": false,
|
||||
"R_fitting": false,
|
||||
"cost_required": false,
|
||||
"registered_unix": 1794209105.213457,
|
||||
"fresh_text_sha256": "d3f53fc98fa9d061a3df42f24fe307b693b41a9ddf74c8377dd52096663c40a9"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"state": "completed",
|
||||
"phase": "done",
|
||||
"primary_protocol_unchanged_and_negative": true,
|
||||
"calibration_pass": true,
|
||||
"heldout_pass": true,
|
||||
"fresh_function_pass": false,
|
||||
"conditional_function_positive": false,
|
||||
"position_pattern_classification": "inspect first-key/self/recent3 masses",
|
||||
"claim_limit": "Single-source H23-conditioned, single-head QK probability/readout similarity; not bidirectional, not V similarity, not full-QKV-head equivalence; exploratory addendum independently fresh-tested.",
|
||||
"elapsed_seconds": 105.34158394904807,
|
||||
"peak_rss_kib": 178312,
|
||||
"shared_budget_seconds_including_60s_early_reserve": 240.1377762411721
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"host": "8.211.154.134",
|
||||
"source_weights_directory": "/opt/exp-model-parameter-similarity/runs/cpu-qwen35-2b/weights",
|
||||
"source_baseline_cache": "/opt/exp-model-parameter-similarity/runs/cpu-qwen35-2b/baseline-activations.npz",
|
||||
"files": [
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/calibration-source-11.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "422e240758a0a1b460367d92170d5b792c1ab570ebc5e7bae62058ec7d9f1550",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/calibration-source-15.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "b5dc8a33976c629363bf61aa0d0a9b0735ab98e7c95aaa866c797d6351956bb1",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/calibration-source-19.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "7a0a0082e012c1d2085916fc0583b73d9f279e97dd3bc1969125e7fea05b523f",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/calibration-source-23.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "e88515e0bad06eb4423d4530a14223ca0b672b93a302c5d0f80bb71ba56c83e4",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/calibration-source-3.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "c6d0e25ca380e60edb23980e8a0a7dcf3a4b2ab450e92872af690476f2d17e87",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/calibration-source-7.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "7eadce41d7d504506d89ea1039c0b1f95ea65d052f21a7232ab6ba6962abb71e",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv-v2/cache/conditional-fresh-inputs.npz",
|
||||
"bytes": 3146482,
|
||||
"sha256": "3e95820503e197fb6e2497ebf658224557c3b10238bc0b62f00c1b730424b6b2",
|
||||
"retained": true
|
||||
},
|
||||
{
|
||||
"server_path": "/opt/exp-model-parameter-similarity/runs/cross-layer-qkv/cache/calibration-source-3.npz",
|
||||
"bytes": 79441838,
|
||||
"sha256": "c6d0e25ca380e60edb23980e8a0a7dcf3a4b2ab450e92872af690476f2d17e87",
|
||||
"retained": true,
|
||||
"failed_attempt_cache": true
|
||||
}
|
||||
],
|
||||
"automatic_deletion": false,
|
||||
"all_figure_source_tables_and_selected_probabilities_in_git": true
|
||||
}
|
||||
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 178 KiB |
@@ -0,0 +1,682 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="929.791406pt" height="354.189943pt" viewBox="0 0 929.791406 354.189943" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||
<metadata>
|
||||
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<cc:Work>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:date>2026-11-09T15:51:54.780638</dc:date>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Matplotlib v3.11.2, https://matplotlib.org/</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs>
|
||||
<style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>
|
||||
</defs>
|
||||
<g id="figure_1">
|
||||
<g id="patch_1">
|
||||
<path d="M 0 354.189943
|
||||
L 929.791406 354.189943
|
||||
L 929.791406 0
|
||||
L 0 0
|
||||
z
|
||||
" style="fill: #ffffff"/>
|
||||
</g>
|
||||
<g id="axes_1">
|
||||
<g id="patch_2">
|
||||
<path d="M 41.513516 285.918376
|
||||
L 456.571406 285.918376
|
||||
L 456.571406 59.284219
|
||||
L 41.513516 59.284219
|
||||
z
|
||||
" style="fill: #ffffff"/>
|
||||
</g>
|
||||
<g id="matplotlib.axis_1">
|
||||
<g id="xtick_1">
|
||||
<g id="line2d_1">
|
||||
<defs>
|
||||
<path id="m40a0bc73dd" d="M 0 0
|
||||
L 0 3.5
|
||||
" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</defs>
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="60.379783" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_1">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(35.83264 324.594418) rotate(-50)">cal-zh-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_2">
|
||||
<g id="line2d_2">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="94.682088" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_2">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(70.134945 324.594418) rotate(-50)">cal-zh-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_3">
|
||||
<g id="line2d_3">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="128.984393" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_3">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(103.91388 325.218146) rotate(-50)">cal-en-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_4">
|
||||
<g id="line2d_4">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="163.286698" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_4">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(138.216185 325.218146) rotate(-50)">cal-en-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_5">
|
||||
<g id="line2d_5">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="197.589003" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_5">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(170.265921 327.902653) rotate(-50)">test-zh-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_6">
|
||||
<g id="line2d_6">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="231.891308" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_6">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(204.568226 327.902653) rotate(-50)">test-zh-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_7">
|
||||
<g id="line2d_7">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="266.193613" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_7">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(238.347161 328.525929) rotate(-50)">test-en-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_8">
|
||||
<g id="line2d_8">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="300.495918" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_8">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(272.649466 328.525929) rotate(-50)">test-en-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_9">
|
||||
<g id="line2d_9">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="334.798223" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_9">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(304.057419 331.975735) rotate(-50)">fresh-zh-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_10">
|
||||
<g id="line2d_10">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="369.100528" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_10">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(338.359724 331.975735) rotate(-50)">fresh-zh-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_11">
|
||||
<g id="line2d_11">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="403.402833" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_11">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(372.13866 332.599463) rotate(-50)">fresh-en-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_12">
|
||||
<g id="line2d_12">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="437.705138" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_12">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(406.440965 332.599463) rotate(-50)">fresh-en-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_13">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="249.042461" y="344.827834" transform="rotate(-0 249.042461 344.827834)">Calibration / old validation / fresh tests, 4 each</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="matplotlib.axis_2">
|
||||
<g id="ytick_1">
|
||||
<g id="line2d_13">
|
||||
<defs>
|
||||
<path id="mc3ec1825fc" d="M 0 0
|
||||
L -3.5 0
|
||||
" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</defs>
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="41.513516" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_14">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="34.513516" y="289.337321" transform="rotate(-0 34.513516 289.337321)">0.0</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_2">
|
||||
<g id="line2d_14">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="41.513516" y="241.911743" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_15">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="34.513516" y="245.330689" transform="rotate(-0 34.513516 245.330689)">0.2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_3">
|
||||
<g id="line2d_15">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="41.513516" y="197.905111" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_16">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="34.513516" y="201.324056" transform="rotate(-0 34.513516 201.324056)">0.4</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_4">
|
||||
<g id="line2d_16">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="41.513516" y="153.898478" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_17">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="34.513516" y="157.317424" transform="rotate(-0 34.513516 157.317424)">0.6</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_5">
|
||||
<g id="line2d_17">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="41.513516" y="109.891846" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_18">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="34.513516" y="113.310791" transform="rotate(-0 34.513516 113.310791)">0.8</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_6">
|
||||
<g id="line2d_18">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="41.513516" y="65.885214" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_19">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="34.513516" y="69.304159" transform="rotate(-0 34.513516 69.304159)">1.0</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_20">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="14.038594" y="172.601297" transform="rotate(-90 14.038594 172.601297)">Overlap</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="line2d_19">
|
||||
<path d="M 60.379783 131.01503
|
||||
L 94.682088 131.01503
|
||||
L 128.984393 159.179274
|
||||
L 163.286698 139.816356
|
||||
L 197.589003 125.734234
|
||||
L 231.891308 139.816356
|
||||
L 266.193613 155.658744
|
||||
L 300.495918 157.419009
|
||||
L 334.798223 122.213703
|
||||
L 369.100528 139.816356
|
||||
L 403.402833 152.138213
|
||||
L 437.705138 148.617683
|
||||
" clip-path="url(#p443b8dd48d)" style="fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square"/>
|
||||
<defs>
|
||||
<path id="ma46e3b1de8" d="M 0 3
|
||||
C 0.795609 3 1.55874 2.683901 2.12132 2.12132
|
||||
C 2.683901 1.55874 3 0.795609 3 0
|
||||
C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132
|
||||
C 1.55874 -2.683901 0.795609 -3 0 -3
|
||||
C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132
|
||||
C -2.683901 -1.55874 -3 -0.795609 -3 0
|
||||
C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132
|
||||
C -1.55874 2.683901 -0.795609 3 0 3
|
||||
z
|
||||
" style="stroke: #1f77b4"/>
|
||||
</defs>
|
||||
<g clip-path="url(#p443b8dd48d)">
|
||||
<use xlink:href="#ma46e3b1de8" x="60.379783" y="131.01503" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="94.682088" y="131.01503" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="128.984393" y="159.179274" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="163.286698" y="139.816356" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="197.589003" y="125.734234" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="231.891308" y="139.816356" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="266.193613" y="155.658744" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="300.495918" y="157.419009" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="334.798223" y="122.213703" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="369.100528" y="139.816356" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="403.402833" y="152.138213" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
<use xlink:href="#ma46e3b1de8" x="437.705138" y="148.617683" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="line2d_20">
|
||||
<path d="M 60.379783 74.727519
|
||||
L 94.682088 72.691389
|
||||
L 128.984393 72.53447
|
||||
L 163.286698 73.448554
|
||||
L 197.589003 69.922222
|
||||
L 231.891308 70.783858
|
||||
L 266.193613 71.788869
|
||||
L 300.495918 73.060977
|
||||
L 334.798223 69.589721
|
||||
L 369.100528 71.220261
|
||||
L 403.402833 70.280896
|
||||
L 437.705138 81.204633
|
||||
" clip-path="url(#p443b8dd48d)" style="fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square"/>
|
||||
<defs>
|
||||
<path id="m2c6f8c31e9" d="M 0 3
|
||||
C 0.795609 3 1.55874 2.683901 2.12132 2.12132
|
||||
C 2.683901 1.55874 3 0.795609 3 0
|
||||
C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132
|
||||
C 1.55874 -2.683901 0.795609 -3 0 -3
|
||||
C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132
|
||||
C -2.683901 -1.55874 -3 -0.795609 -3 0
|
||||
C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132
|
||||
C -1.55874 2.683901 -0.795609 3 0 3
|
||||
z
|
||||
" style="stroke: #ff7f0e"/>
|
||||
</defs>
|
||||
<g clip-path="url(#p443b8dd48d)">
|
||||
<use xlink:href="#m2c6f8c31e9" x="60.379783" y="74.727519" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="94.682088" y="72.691389" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="128.984393" y="72.53447" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="163.286698" y="73.448554" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="197.589003" y="69.922222" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="231.891308" y="70.783858" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="266.193613" y="71.788869" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="300.495918" y="73.060977" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="334.798223" y="69.589721" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="369.100528" y="71.220261" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="403.402833" y="70.280896" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
<use xlink:href="#m2c6f8c31e9" x="437.705138" y="81.204633" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="line2d_21">
|
||||
<path d="M 180.437851 285.918376
|
||||
L 180.437851 59.284219
|
||||
" clip-path="url(#p443b8dd48d)" style="fill: none; stroke: #808080; stroke-width: 0.6; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="line2d_22">
|
||||
<path d="M 317.647071 285.918376
|
||||
L 317.647071 59.284219
|
||||
" clip-path="url(#p443b8dd48d)" style="fill: none; stroke: #808080; stroke-width: 0.6; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_3">
|
||||
<path d="M 41.513516 285.918376
|
||||
L 41.513516 59.284219
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_4">
|
||||
<path d="M 456.571406 285.918376
|
||||
L 456.571406 59.284219
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_5">
|
||||
<path d="M 41.513516 285.918376
|
||||
L 456.571406 285.918376
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_6">
|
||||
<path d="M 41.513516 59.284219
|
||||
L 456.571406 59.284219
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="legend_1">
|
||||
<g id="patch_7">
|
||||
<path d="M 47.113516 281.918376
|
||||
L 202.304766 281.918376
|
||||
Q 203.904766 281.918376 203.904766 280.318376
|
||||
L 203.904766 257.117126
|
||||
Q 203.904766 255.517126 202.304766 255.517126
|
||||
L 47.113516 255.517126
|
||||
Q 45.513516 255.517126 45.513516 257.117126
|
||||
L 45.513516 280.318376
|
||||
Q 45.513516 281.918376 47.113516 281.918376
|
||||
z
|
||||
" style="fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter"/>
|
||||
</g>
|
||||
<g id="line2d_23">
|
||||
<path d="M 48.713516 261.995876
|
||||
L 56.713516 261.995876
|
||||
L 64.713516 261.995876
|
||||
" style="fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square"/>
|
||||
<g>
|
||||
<use xlink:href="#ma46e3b1de8" x="56.713516" y="261.995876" style="fill: #1f77b4; stroke: #1f77b4"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_21">
|
||||
<text style="font-size: 8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: start" x="71.113516" y="264.795876" transform="rotate(-0 71.113516 264.795876)">Unweighted top-5 overlap</text>
|
||||
</g>
|
||||
<g id="line2d_24">
|
||||
<path d="M 48.713516 273.996501
|
||||
L 56.713516 273.996501
|
||||
L 64.713516 273.996501
|
||||
" style="fill: none; stroke: #ff7f0e; stroke-width: 1.5; stroke-linecap: square"/>
|
||||
<g>
|
||||
<use xlink:href="#m2c6f8c31e9" x="56.713516" y="273.996501" style="fill: #ff7f0e; stroke: #ff7f0e"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_22">
|
||||
<text style="font-size: 8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: start" x="71.113516" y="276.796501" transform="rotate(-0 71.113516 276.796501)">Probability-mass overlap (1−TV)</text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="axes_2">
|
||||
<g id="patch_8">
|
||||
<path d="M 507.533516 285.918376
|
||||
L 922.591406 285.918376
|
||||
L 922.591406 59.284219
|
||||
L 507.533516 59.284219
|
||||
z
|
||||
" style="fill: #ffffff"/>
|
||||
</g>
|
||||
<g id="matplotlib.axis_3">
|
||||
<g id="xtick_13">
|
||||
<g id="line2d_25">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="526.399783" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_23">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(501.85264 324.594418) rotate(-50)">cal-zh-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_14">
|
||||
<g id="line2d_26">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="560.702088" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_24">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(536.154945 324.594418) rotate(-50)">cal-zh-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_15">
|
||||
<g id="line2d_27">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="595.004393" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_25">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(569.93388 325.218146) rotate(-50)">cal-en-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_16">
|
||||
<g id="line2d_28">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="629.306698" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_26">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(604.236185 325.218146) rotate(-50)">cal-en-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_17">
|
||||
<g id="line2d_29">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="663.609003" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_27">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(636.285921 327.902653) rotate(-50)">test-zh-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_18">
|
||||
<g id="line2d_30">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="697.911308" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_28">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(670.588226 327.902653) rotate(-50)">test-zh-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_19">
|
||||
<g id="line2d_31">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="732.213613" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_29">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(704.367161 328.525929) rotate(-50)">test-en-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_20">
|
||||
<g id="line2d_32">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="766.515918" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_30">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(738.669466 328.525929) rotate(-50)">test-en-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_21">
|
||||
<g id="line2d_33">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="800.818223" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_31">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(770.077419 331.975735) rotate(-50)">fresh-zh-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_22">
|
||||
<g id="line2d_34">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="835.120528" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_32">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(804.379724 331.975735) rotate(-50)">fresh-zh-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_23">
|
||||
<g id="line2d_35">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="869.422833" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_33">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(838.15866 332.599463) rotate(-50)">fresh-en-1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_24">
|
||||
<g id="line2d_36">
|
||||
<g>
|
||||
<use xlink:href="#m40a0bc73dd" x="903.725138" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_34">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(872.460965 332.599463) rotate(-50)">fresh-en-2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_35">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="715.062461" y="344.827834" transform="rotate(-0 715.062461 344.827834)">Calibration / old validation / fresh tests, 4 each</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="matplotlib.axis_4">
|
||||
<g id="ytick_7">
|
||||
<g id="line2d_37">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="507.533516" y="285.918376" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_36">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="500.533516" y="289.337321" transform="rotate(-0 500.533516 289.337321)">0.00</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_8">
|
||||
<g id="line2d_38">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="507.533516" y="240.591544" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_37">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="500.533516" y="244.01049" transform="rotate(-0 500.533516 244.01049)">0.01</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_9">
|
||||
<g id="line2d_39">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="507.533516" y="195.264713" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_38">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="500.533516" y="198.683658" transform="rotate(-0 500.533516 198.683658)">0.02</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_10">
|
||||
<g id="line2d_40">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="507.533516" y="149.937882" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_39">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="500.533516" y="153.356827" transform="rotate(-0 500.533516 153.356827)">0.03</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_11">
|
||||
<g id="line2d_41">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="507.533516" y="104.61105" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_40">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="500.533516" y="108.029995" transform="rotate(-0 500.533516 108.029995)">0.04</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_12">
|
||||
<g id="line2d_42">
|
||||
<g>
|
||||
<use xlink:href="#mc3ec1825fc" x="507.533516" y="59.284219" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_41">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="500.533516" y="62.703164" transform="rotate(-0 500.533516 62.703164)">0.05</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_42">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="474.332344" y="172.601297" transform="rotate(-90 474.332344 172.601297)">Head readout relative L2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="line2d_43">
|
||||
<path d="M 526.399783 166.476463
|
||||
L 560.702088 160.879598
|
||||
L 595.004393 190.411037
|
||||
L 629.306698 193.487755
|
||||
L 663.609003 237.512882
|
||||
L 697.911308 221.935268
|
||||
L 732.213613 222.210116
|
||||
L 766.515918 208.038634
|
||||
L 800.818223 239.293544
|
||||
L 835.120528 206.698127
|
||||
L 869.422833 226.871138
|
||||
L 903.725138 113.016865
|
||||
" clip-path="url(#p8212f482ff)" style="fill: none; stroke: #238b45; stroke-width: 1.5; stroke-linecap: square"/>
|
||||
<defs>
|
||||
<path id="m2bc2079437" d="M 0 3
|
||||
C 0.795609 3 1.55874 2.683901 2.12132 2.12132
|
||||
C 2.683901 1.55874 3 0.795609 3 0
|
||||
C 3 -0.795609 2.683901 -1.55874 2.12132 -2.12132
|
||||
C 1.55874 -2.683901 0.795609 -3 0 -3
|
||||
C -0.795609 -3 -1.55874 -2.683901 -2.12132 -2.12132
|
||||
C -2.683901 -1.55874 -3 -0.795609 -3 0
|
||||
C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132
|
||||
C -1.55874 2.683901 -0.795609 3 0 3
|
||||
z
|
||||
" style="stroke: #238b45"/>
|
||||
</defs>
|
||||
<g clip-path="url(#p8212f482ff)">
|
||||
<use xlink:href="#m2bc2079437" x="526.399783" y="166.476463" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="560.702088" y="160.879598" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="595.004393" y="190.411037" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="629.306698" y="193.487755" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="663.609003" y="237.512882" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="697.911308" y="221.935268" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="732.213613" y="222.210116" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="766.515918" y="208.038634" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="800.818223" y="239.293544" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="835.120528" y="206.698127" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="869.422833" y="226.871138" style="fill: #238b45; stroke: #238b45"/>
|
||||
<use xlink:href="#m2bc2079437" x="903.725138" y="113.016865" style="fill: #238b45; stroke: #238b45"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="line2d_44">
|
||||
<path d="M 646.457851 285.918376
|
||||
L 646.457851 59.284219
|
||||
" clip-path="url(#p8212f482ff)" style="fill: none; stroke: #808080; stroke-width: 0.6; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="line2d_45">
|
||||
<path d="M 783.667071 285.918376
|
||||
L 783.667071 59.284219
|
||||
" clip-path="url(#p8212f482ff)" style="fill: none; stroke: #808080; stroke-width: 0.6; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_9">
|
||||
<path d="M 507.533516 285.918376
|
||||
L 507.533516 59.284219
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_10">
|
||||
<path d="M 922.591406 285.918376
|
||||
L 922.591406 59.284219
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_11">
|
||||
<path d="M 507.533516 285.918376
|
||||
L 922.591406 285.918376
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_12">
|
||||
<path d="M 507.533516 59.284219
|
||||
L 922.591406 59.284219
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="text_43">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="715.062461" y="53.284219" transform="rotate(-0 715.062461 53.284219)">Fixed layer23 V/gate/O</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_44">
|
||||
<text style="font-size: 10.8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(259.304625 16.487367)">Exploratory fixed case: layer3 head7 vs layer23 head6, both applied to H23</text>
|
||||
<text style="font-size: 10.8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif" transform="translate(271.851188 29.45032)">Fresh JS / tail-mass limits not fully passed; network substitution not run</text>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="p443b8dd48d">
|
||||
<rect x="41.513516" y="59.284219" width="415.057891" height="226.634157"/>
|
||||
</clipPath>
|
||||
<clipPath id="p8212f482ff">
|
||||
<rect x="507.533516" y="59.284219" width="415.057891" height="226.634157"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 163 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 70 KiB |
@@ -0,0 +1,358 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="497.844844pt" height="308.231958pt" viewBox="0 0 497.844844 308.231958" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||
<metadata>
|
||||
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||
<cc:Work>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:date>2026-11-09T15:51:36.382004</dc:date>
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Matplotlib v3.11.2, https://matplotlib.org/</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs>
|
||||
<style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>
|
||||
</defs>
|
||||
<g id="figure_1">
|
||||
<g id="patch_1">
|
||||
<path d="M 0 308.231958
|
||||
L 497.844844 308.231958
|
||||
L 497.844844 0
|
||||
L 0 0
|
||||
z
|
||||
" style="fill: #ffffff"/>
|
||||
</g>
|
||||
<g id="axes_1">
|
||||
<g id="patch_2">
|
||||
<path d="M 32.926953 220.754019
|
||||
L 490.644844 220.754019
|
||||
L 490.644844 21.406312
|
||||
L 32.926953 21.406312
|
||||
z
|
||||
" style="fill: #ffffff"/>
|
||||
</g>
|
||||
<g id="PathCollection_1">
|
||||
<defs>
|
||||
<path id="m200ff46dac" d="M 0 2.44949
|
||||
C 0.649612 2.44949 1.272706 2.191396 1.732051 1.732051
|
||||
C 2.191396 1.272706 2.44949 0.649612 2.44949 0
|
||||
C 2.44949 -0.649612 2.191396 -1.272706 1.732051 -1.732051
|
||||
C 1.272706 -2.191396 0.649612 -2.44949 0 -2.44949
|
||||
C -0.649612 -2.44949 -1.272706 -2.191396 -1.732051 -1.732051
|
||||
C -2.191396 -1.272706 -2.44949 -0.649612 -2.44949 0
|
||||
C -2.44949 0.649612 -2.191396 1.272706 -1.732051 1.732051
|
||||
C -1.272706 2.191396 -0.649612 2.44949 0 2.44949
|
||||
z
|
||||
" style="stroke: #377eb8"/>
|
||||
</defs>
|
||||
<g clip-path="url(#pd0c9f79366)">
|
||||
<use xlink:href="#m200ff46dac" x="377.972966" y="169.876493" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="300.764415" y="171.634359" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="340.356316" y="173.773499" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="400.145584" y="173.76859" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="331.697383" y="165.090164" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="383.969025" y="168.539046" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="386.617434" y="173.046094" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="283.115509" y="173.151451" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="376.427691" y="160.013086" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="265.6949" y="163.815005" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="279.883202" y="166.269519" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="343.317588" y="168.370256" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="267.284669" y="149.308799" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="176.985798" y="127.484" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="206.455103" y="154.609739" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="262.309322" y="133.72882" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="215.42559" y="43.158992" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="222.026948" y="41.669853" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="278.415257" y="40.790271" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="288.038492" y="44.627632" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="451.501721" y="176.092125" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="469.839485" y="177.283859" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="438.926318" y="173.677959" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="363.857263" y="176.400978" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="435.00136" y="168.467218" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="307.014308" y="169.501374" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="380.62021" y="165.912928" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="385.124692" y="167.301907" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="213.817192" y="152.644948" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="157.636746" y="132.023133" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="292.018315" y="150.231325" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="258.593213" y="127.958199" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="232.179719" y="52.189004" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="223.622002" y="52.746354" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="307.284195" y="30.467572" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="296.398091" y="32.981235" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="431.974107" y="172.849487" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="352.151587" y="173.917663" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="422.195591" y="171.227516" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="235.220054" y="171.706224" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="233.15438" y="158.262022" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="178.196989" y="140.599992" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="190.30237" y="156.5158" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="53.732312" y="137.303046" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="268.54552" y="63.787864" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="262.019321" y="67.602054" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="193.141937" y="63.00743" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="180.998945" y="64.657892" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="306.791691" y="171.428045" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="146.36623" y="159.262631" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="395.817245" y="173.361175" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="336.476044" y="162.947298" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="281.397937" y="97.014814" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="240.225714" y="97.932548" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="398.907789" y="100.542399" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="389.034837" y="106.392069" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="401.378388" y="120.09307" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="388.571298" y="120.761974" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="366.225826" y="145.255701" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
<use xlink:href="#m200ff46dac" x="343.599231" y="147.449671" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="patch_3">
|
||||
<path d="M 392.930591 220.754019
|
||||
L 456.93939 220.754019
|
||||
L 456.93939 21.406312
|
||||
L 392.930591 21.406312
|
||||
z
|
||||
" clip-path="url(#pd0c9f79366)" style="fill: #808080; opacity: 0.15; stroke: #808080; stroke-linejoin: miter"/>
|
||||
</g>
|
||||
<g id="matplotlib.axis_1">
|
||||
<g id="xtick_1">
|
||||
<g id="line2d_1">
|
||||
<defs>
|
||||
<path id="m8e9c9f116e" d="M 0 0
|
||||
L 0 3.5
|
||||
" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</defs>
|
||||
<g>
|
||||
<use xlink:href="#m8e9c9f116e" x="103.173987" y="220.754019" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_1">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="103.173987" y="234.591909" transform="rotate(-0 103.173987 234.591909)">0.75</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_2">
|
||||
<g id="line2d_2">
|
||||
<g>
|
||||
<use xlink:href="#m8e9c9f116e" x="185.591103" y="220.754019" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_2">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="185.591103" y="234.591909" transform="rotate(-0 185.591103 234.591909)">0.80</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_3">
|
||||
<g id="line2d_3">
|
||||
<g>
|
||||
<use xlink:href="#m8e9c9f116e" x="268.00822" y="220.754019" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_3">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="268.00822" y="234.591909" transform="rotate(-0 268.00822 234.591909)">0.85</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_4">
|
||||
<g id="line2d_4">
|
||||
<g>
|
||||
<use xlink:href="#m8e9c9f116e" x="350.425336" y="220.754019" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_4">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="350.425336" y="234.591909" transform="rotate(-0 350.425336 234.591909)">0.90</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="xtick_5">
|
||||
<g id="line2d_5">
|
||||
<g>
|
||||
<use xlink:href="#m8e9c9f116e" x="432.842452" y="220.754019" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_5">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="432.842452" y="234.591909" transform="rotate(-0 432.842452 234.591909)">0.95</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_6">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="261.785898" y="247.592612" transform="rotate(-0 261.785898 247.592612)">Mean centered token-Gram CKA</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="matplotlib.axis_2">
|
||||
<g id="ytick_1">
|
||||
<g id="line2d_6">
|
||||
<defs>
|
||||
<path id="m0e87d35ee3" d="M 0 0
|
||||
L -3.5 0
|
||||
" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</defs>
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="216.973676" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_7">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="220.392622" transform="rotate(-0 25.926953 220.392622)">0</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_2">
|
||||
<g id="line2d_7">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="190.569092" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_8">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="193.988037" transform="rotate(-0 25.926953 193.988037)">1</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_3">
|
||||
<g id="line2d_8">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="164.164507" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_9">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="167.583453" transform="rotate(-0 25.926953 167.583453)">2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_4">
|
||||
<g id="line2d_9">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="137.759923" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_10">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="141.178868" transform="rotate(-0 25.926953 141.178868)">3</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_5">
|
||||
<g id="line2d_10">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="111.355338" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_11">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="114.774284" transform="rotate(-0 25.926953 114.774284)">4</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_6">
|
||||
<g id="line2d_11">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="84.950754" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_12">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="88.369699" transform="rotate(-0 25.926953 88.369699)">5</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_7">
|
||||
<g id="line2d_12">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="58.546169" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_13">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="61.965115" transform="rotate(-0 25.926953 61.965115)">6</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="ytick_8">
|
||||
<g id="line2d_13">
|
||||
<g>
|
||||
<use xlink:href="#m0e87d35ee3" x="32.926953" y="32.141585" style="stroke: #000000; stroke-width: 0.8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_14">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: end" x="25.926953" y="35.56053" transform="rotate(-0 25.926953 35.56053)">7</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_15">
|
||||
<text style="font-size: 9px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="14.038594" y="121.080166" transform="rotate(-90 14.038594 121.080166)">Worst direct V relative L2</text>
|
||||
</g>
|
||||
</g>
|
||||
<g id="line2d_14">
|
||||
<path d="M 421.832326 220.754019
|
||||
L 421.832326 21.406312
|
||||
" clip-path="url(#pd0c9f79366)" style="fill: none; stroke-dasharray: 1.5,2.475; stroke-dashoffset: 0; stroke: #808080; stroke-width: 1.5"/>
|
||||
</g>
|
||||
<g id="line2d_15">
|
||||
<path d="M 32.926953 211.692759
|
||||
L 490.644844 211.692759
|
||||
" clip-path="url(#pd0c9f79366)" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #b2182b; stroke-width: 1.5"/>
|
||||
</g>
|
||||
<g id="patch_4">
|
||||
<path d="M 32.926953 220.754019
|
||||
L 32.926953 21.406312
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_5">
|
||||
<path d="M 490.644844 220.754019
|
||||
L 490.644844 21.406312
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_6">
|
||||
<path d="M 32.926953 220.754019
|
||||
L 490.644844 220.754019
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="patch_7">
|
||||
<path d="M 32.926953 21.406312
|
||||
L 490.644844 21.406312
|
||||
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
|
||||
</g>
|
||||
<g id="text_16">
|
||||
<text style="font-size: 10.8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: middle" x="261.785898" y="15.406312" transform="rotate(-0 261.785898 15.406312)">V geometry is a diagnostic, not substitution evidence</text>
|
||||
</g>
|
||||
<g id="legend_1">
|
||||
<g id="patch_8">
|
||||
<path d="M 38.526953 301.031958
|
||||
L 209.325703 301.031958
|
||||
Q 210.925703 301.031958 210.925703 299.431958
|
||||
L 210.925703 264.230083
|
||||
Q 210.925703 262.630083 209.325703 262.630083
|
||||
L 38.526953 262.630083
|
||||
Q 36.926953 262.630083 36.926953 264.230083
|
||||
L 36.926953 299.431958
|
||||
Q 36.926953 301.031958 38.526953 301.031958
|
||||
z
|
||||
" style="fill: #ffffff; opacity: 0.8; stroke: #cccccc; stroke-linejoin: miter"/>
|
||||
</g>
|
||||
<g id="PathCollection_2">
|
||||
<g>
|
||||
<use xlink:href="#m200ff46dac" x="48.126953" y="269.808833" style="fill: #377eb8; stroke: #377eb8"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text_17">
|
||||
<text style="font-size: 8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: start" x="62.526953" y="271.908833" transform="rotate(-0 62.526953 271.908833)">60 cross-layer KV-head pairs</text>
|
||||
</g>
|
||||
<g id="patch_9">
|
||||
<path d="M 40.126953 283.909458
|
||||
L 56.126953 283.909458
|
||||
L 56.126953 278.309458
|
||||
L 40.126953 278.309458
|
||||
z
|
||||
" style="fill: #808080; opacity: 0.15; stroke: #808080; stroke-linejoin: miter"/>
|
||||
</g>
|
||||
<g id="text_18">
|
||||
<text style="font-size: 8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: start" x="62.526953" y="283.909458" transform="rotate(-0 62.526953 283.909458)">Random-projection Gram CKA range</text>
|
||||
</g>
|
||||
<g id="line2d_16">
|
||||
<path d="M 40.126953 293.110083
|
||||
L 48.126953 293.110083
|
||||
L 56.126953 293.110083
|
||||
" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #b2182b; stroke-width: 1.5"/>
|
||||
</g>
|
||||
<g id="text_19">
|
||||
<text style="font-size: 8px; font-family: 'DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', sans-serif; text-anchor: start" x="62.526953" y="295.910083" transform="rotate(-0 62.526953 295.910083)">Approximate direct V error = 0.20</text>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="pd0c9f79366">
|
||||
<rect x="32.926953" y="21.406312" width="457.717891" height="199.347706"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 20 KiB |