alliedtoasters commited on
Commit
385716d
·
verified ·
1 Parent(s): c388a07

Add dataset metadata

Browse files
Files changed (2) hide show
  1. README.md +78 -0
  2. index/train-00000-of-00001.parquet +3 -0
README.md ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - lmprobe
4
+ - activations
5
+ - interpretability
6
+ - meta-llama-llama-3.1-405b
7
+ task_categories:
8
+ - feature-extraction
9
+ language:
10
+ - en
11
+ license: cc-by-4.0
12
+ ---
13
+
14
+ # meta-llama/Llama-3.1-405B — Activation Dataset
15
+
16
+ Cached activations extracted from [`meta-llama/Llama-3.1-405B`](https://huggingface.co/meta-llama/Llama-3.1-405B) (revision `b906e4dc842aa489c962f9db26554dcfdde901fe`).
17
+
18
+ LateNet v0 activations for Llama 3.1 405B base (all layers, full sequence)
19
+
20
+ ## Contents
21
+
22
+ | Tensor | Layers | Dim | Pooling | Shards | Row Bytes |
23
+ |--------|--------|-----|---------|--------|-----------|
24
+ | hidden_layers | 0-125 | 16384 | - | 20 | - |
25
+
26
+ - **Prompts:** 23724
27
+ - **Format version:** 2.0
28
+
29
+ ## Load with lmprobe
30
+
31
+ ```python
32
+ from lmprobe import load_activations, Probe
33
+
34
+ acts = load_activations("alliedtoasters/latenet-v0-activations-llama3.1-405b-base", layers=[0])
35
+ probe = Probe(classifier="logistic_regression", random_state=42)
36
+ probe.fit_from_activations(acts[0], labels)
37
+ ```
38
+
39
+ ## Load without lmprobe (standalone)
40
+
41
+ ```python
42
+ import json
43
+ import pyarrow.parquet as pq
44
+ from safetensors import safe_open
45
+
46
+ # Load the index — all metadata is embedded in the Parquet schema
47
+ table = pq.read_table("index/train-00000-of-00001.parquet")
48
+ df = table.to_pandas()
49
+ meta = json.loads(table.schema.metadata[b"lmprobe:tensors"])
50
+
51
+ # Get layer 0 activation for prompt 0
52
+ row = df.iloc[0]
53
+ pattern = meta["hidden_layers"]["file_pattern"]
54
+ path = pattern.format(layer=0, shard=row["shard_index"])
55
+ with safe_open(path, framework="pt") as f:
56
+ vec = f.get_tensor("hidden.layer_0")[row["row_offset"]]
57
+ # vec.shape: (16384,)
58
+ ```
59
+
60
+ > **Full-sequence dataset:** The `shard_index` / `row_offset` columns always address the **last-token** pooled vector. For per-token access, use the `token_shard_ids` and `token_shard_offsets` list columns — see the `lmprobe:tensors` schema metadata for details.
61
+
62
+ ## Load with HF Datasets
63
+
64
+ ```python
65
+ from datasets import load_dataset
66
+
67
+ # Shows prompt text + labels in Dataset Viewer
68
+ ds = load_dataset("alliedtoasters/latenet-v0-activations-llama3.1-405b-base")
69
+ print(ds["train"][0]) # {"text": "...", "label": ..., ...}
70
+ ```
71
+
72
+ ## Provenance
73
+
74
+ - **lmprobe version:** 0.9.2
75
+ - **Extraction backend:** local
76
+ - **Created:** 2026-04-04T16:35:14.904340+00:00
77
+ - **PyTorch:** 2.11.0+cu130
78
+ - **Transformers:** 5.4.0
index/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0114537ba72ee2b6557ea689390b6fc70b183f871c3e32940306259e012c55d
3
+ size 1398396