interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / evidence / QUANTUM_EFFICIENCY / 2026-10-22 / sparsity_followup.py

19 lines · 1062 bytes Raw Blame History
1"""Follow up an unexpected low numerical rank in the first selected expert.
2Static checkpoint inspection only. Does not claim execution equivalence or speed.
3"""
4import json
5import pathlib
6import numpy as np
7from weight_probe import fetch, SELECTION
8
9rows = []
10for layer, expert, proj in SELECTION + [(0,0,'up_proj'),(0,0,'down_proj')]:
11 ww, provenance = fetch(layer,expert,proj)
12 unique_rows = np.unique(ww,axis=0).shape[0]
13 rows.append({'layer':layer,'expert':expert,'projection':proj,'shape':list(ww.shape),
14 'zero_elements':int(np.sum(ww==0)), 'elements':int(ww.size),
15 'all_zero_rows':int(np.sum(np.all(ww==0,axis=1))),
16 'all_zero_columns':int(np.sum(np.all(ww==0,axis=0))),
17 'unique_rows':int(unique_rows), 'provenance':provenance})
18 print(json.dumps(rows[-1]),flush=True)
19pathlib.Path(__file__).with_name('sparsity-followup-results.json').write_text(json.dumps({'scope':'Checkpoint-only static counts, five selected matrices; no inference or timing','rows':rows},indent=2)+'\n')