Views
No views yet
c39fad08
Layers: 32 Hidden size: 4096 Features per layer: 128meta-llama/Llama-3.1-8B. It contains the top-128 SVD directions of every MLP gate_proj and down_proj matrix in the network, plus token embeddings, layer norms, and vocabulary projection metadata.meta-llama/Llama-3.1-8B has learned.| Constant | Symbol | Value | Interpretation |
|---|---|---|---|
| FFN Sparsity | C1 | 0.387 | Fraction of near-zero SwiGLU activations |
| Top-8 Prob Mass | C2 | 0.491 | Probability mass on top-8 output tokens |
| Gate Coherence | C3 | 0.808 | Mean cosine sim of adjacent gate_proj directions |
| Layer Temperature | C4 | 0.012 | Mean per-neuron SwiGLU activation variance |
| Circuit Stages | C5 | 2 | CKA transition count + 1 |
gate_proj.weight at the top Paris→capital feature layer suppresses P(Paris) by ≥70% with ≤30% Berlin collateral damage.| File | Description |
|---|---|
gate_vectors.bin | Top-128 SVD directions of gate_proj per layer [L×F×H, f16] |
down_features.bin | Top-128 SVD directions of down_proj per layer [L×F×H, f16] |
embeddings.bin | Token embedding matrix [V×H, f16] |
norms.bin | Layer norm weight vectors |
down_meta.bin | Per-feature top-k vocabulary projections |
index.json | Vindex metadata (layers, hidden_size, num_feats, etc.) |
manifest.json | Build provenance (source SHA, extraction timestamp) |
SHA256SUMS | File integrity checksums |
1import numpy as np, json
2
3vindex_dir = "path/to/downloaded/vindex"
4
5with open(f"{vindex_dir}/index.json") as f:
6 idx = json.load(f)
7
8L, F, H = idx["num_layers"], idx["num_feats"], idx["hidden_size"]
9V = idx["vocab_size"]
10
11# Load gate feature directions [L, F, H]
12gate = np.frombuffer(
13 open(f"{vindex_dir}/gate_vectors.bin", "rb").read(),
14 dtype=np.float16
15).reshape(L, F, H).astype(np.float32)
16
17# Load embeddings [V, H]
18emb = np.frombuffer(
19 open(f"{vindex_dir}/embeddings.bin", "rb").read(),
20 dtype=np.float16
21).reshape(V, H).astype(np.float32)
22
23# Score a token against all features (cosine similarity)
24emb_n = emb / (np.linalg.norm(emb, axis=1, keepdims=True) + 1e-8)
25gate_n = gate / (np.linalg.norm(gate, axis=2, keepdims=True) + 1e-8)
26
27token_id = 12379 # e.g., " Paris"
28scores = gate_n @ emb_n[token_id] # [L, F]
29l_max, f_max = np.unravel_index(scores.argmax(), scores.shape)
30print(f"Top feature: layer={l_max}, feature={f_max}, score={scores[l_max, f_max]:.4f}")@misc{divinci2026vindex,
title = {vIndex: Llama 3.1-8B},
author = {Divinci AI},
year = {2026},
url = {https://huggingface.co/Divinci-AI/llama-3.1-8b-vindex}
}