add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
tags:
|
| 5 |
+
- interpretability
|
| 6 |
+
- jacobian-lens
|
| 7 |
+
- j-space
|
| 8 |
+
- mixture-of-experts
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Inkling J-space lens (n=250, all-layer)
|
| 12 |
+
|
| 13 |
+
A **Jacobian lens (J-space) fit of `thinkingmachines/Inkling`** (~950B-param MoE: 66 layers,
|
| 14 |
+
d_model 6144, 256 routed experts/layer + 2 shared, hybrid SWA-512/global attention, sconv),
|
| 15 |
+
fitted from the official NVFP4 checkpoint (`thinkingmachines/Inkling-NVFP4`).
|
| 16 |
+
|
| 17 |
+
**J_ℓ = E[∂h_target,t′ / ∂h_ℓ,t]** — the expected Jacobian of the final residual stream with
|
| 18 |
+
respect to layer ℓ's residual stream, averaged over token positions and prompts.
|
| 19 |
+
|
| 20 |
+
## Fit configuration
|
| 21 |
+
|
| 22 |
+
| | |
|
| 23 |
+
|---|---|
|
| 24 |
+
| source layers | **all 65** (0–64), target = layer 65 |
|
| 25 |
+
| prompts | **250** wikitext-103 (train, max_chars 2000), seq_len 128, 2-way prompt-sharded |
|
| 26 |
+
| weights | NVFP4 (block-16 e4m3 scales) resident, bit-exact fused dequant-autograd (bf16 compute, fp32 accumulation) |
|
| 27 |
+
| dim_batch | 64 (96 backward passes/prompt) |
|
| 28 |
+
| rate | ~526 s/prompt/node on 8×H200, 18.6 h/shard, 2 nodes |
|
| 29 |
+
| merge | exact n-weighted: J = (n₀·J₀ + n₁·J₁)/(n₀+n₁), verified ≤3.1e-5 |
|
| 30 |
+
|
| 31 |
+
## Files
|
| 32 |
+
|
| 33 |
+
- `inkling_jacobian_lens_n250.pt` — merged lens (`jlens` JacobianLens payload: per-layer fp32
|
| 34 |
+
`J[6144,6144]` means for layers 0–64, target 65, n=250)
|
| 35 |
+
- `shards/shard0of2.pt`, `shards/shard1of2.pt` — the two disjoint-prompt half-lenses
|
| 36 |
+
(125 prompts each; used for the split-half robustness checks — same-layer CKA median 0.997)
|
| 37 |
+
- `merge_weights.json`, `convergence_shard{0,1}.csv` — provenance
|
| 38 |
+
- `cka/` — the recombined CKA space: `inkling_cka.npz` (65×65 CKA-vs-ρ matrix),
|
| 39 |
+
`inkling_cka_blocks.json` (KTS-DP segmentation), `inkling_cka_heatmap.png`, `summary.json`
|
| 40 |
+
|
| 41 |
+
## Probe convention (frozen before fitting)
|
| 42 |
+
|
| 43 |
+
`V_ℓ = P · J_ℓ` with `P = W_U[ids] · γ / 24.0` — plain-RMSNorm gain (raw γ, not gemma-style 1+γ),
|
| 44 |
+
muP logit divisor 24 folded in, `ids = sample_probe_ids(vocab_rows=201024, k=4096, seed=0)`
|
| 45 |
+
(22 ids fall in padding rows [200058, 201024); rows are all-zero and kept for convention
|
| 46 |
+
compatibility with the rest of the J-space program).
|
| 47 |
+
|
| 48 |
+
## Headline geometry (details in the program's E7 report)
|
| 49 |
+
|
| 50 |
+
- **A third geometry pattern** among big models: weakest blockiness of all five fitted
|
| 51 |
+
large models (0.106 vs Kimi-K2.5 0.415, DeepSeek-V4 0.499, dense 0.24–0.31); dominant
|
| 52 |
+
structure is a single sharp cliff at layers 27→28 (adjacent CKA 0.538; ‖V‖ ×3.2 drop);
|
| 53 |
+
layers 3–27 form a huge-norm PR≈4–7 near-identical spike regime that ends at the cliff.
|
| 54 |
+
- **Closest relative is dense**: matched cross-CKA 0.625 with gemma-3-27b-it (peak 0.836),
|
| 55 |
+
0.601 with OLMo-32B; **Kimi-K2.5 is the anti-pair at 0.362** — "1T MoE" is not a geometry class.
|
| 56 |
+
- Band (mid-50%) peak PR/d = 0.011; global peak PR 412.6 at ρ 0.985.
|
| 57 |
+
- Scaffold does not track the 6-layer global-attention period (n.s.).
|
| 58 |
+
- Heavy-tail: bulk prompt norms ~853× dense, but tail dense-shaped (max/median 4.8 vs Kimi 29).
|
| 59 |
+
|
| 60 |
+
## Caveats
|
| 61 |
+
|
| 62 |
+
- Jacobians carry NVFP4 weight-quantization error (same accepted trade as the program's
|
| 63 |
+
int4 Kimi-K2.5 fit; forward validated: sane greedy decodes, bit-exact dequant vs reference).
|
| 64 |
+
- Convergence Δmean end states: 4.17e-2 (shard 0) / 1.22e-1 (shard 1; final prompt was a
|
| 65 |
+
~2×-median bulk event) — MoE fits do not reach the 5e-3 dense-model bar at n=125/shard.
|
| 66 |
+
- seq_len 128 only; no Δ-resolved (horizon) information in this artifact.
|
| 67 |
+
|
| 68 |
+
Fitting/analysis code: `open-jlens-data` repo (`code/moe/fit_moe.py`, `nvfp4_experts.py`,
|
| 69 |
+
`analyze_inkling_geometry.py`). Fitted 2026-07-16/17.
|