activations-and-barcodes
收藏资源简介:
该数据集是tda-for-llms管线(通过Hugging Face后端支持)生成的工件,包含从大语言模型中提取的原始激活矩阵(activations)以及基于这些激活矩阵计算出的持续同调输出(barcodes)。激活矩阵部分按模型slug、语料库和激活流名称分层组织,每个数据点包含元数据文件(如cloud_id、版本、层、注意力头、提示数量等)和对应的激活矩阵(NPZ格式)。条形码部分按模型slug、语料库、激活流、拓扑模式(persistence或zigzag)和度量组织,包含持续同调摘要(CSV格式)、原始条形图(NPZ格式,按cloud_id和维度索引)以及完整的运行来源信息(manifest.json)。该数据集适用于研究LLM内部表示的拓扑结构,支持多种拓扑度量,为理解模型激活的空间结构提供数据基础。
This dataset is an artifact generated by the tda-for-llms pipeline (backed by Hugging Face). It contains raw activation matrices extracted from large language models and the persistent homology outputs (barcodes) computed from these activation matrices. The activation matrices are organized hierarchically by model slug, corpus, and activation flow name. Each data point includes metadata files (such as cloud_id, version, layer, attention head, number of prompts, etc.) and the corresponding activation matrix in NPZ format. The barcodes part is organized by model slug, corpus, activation flow, topological mode (persistence or zigzag), and metric. It includes persistent homology summaries in CSV format, raw barcode plots in NPZ format (indexed by cloud_id and dimension), and complete run provenance information (manifest.json). This dataset is suitable for studying the topological structure of LLM internal representations, supports multiple topological metrics, and provides a data foundation for understanding the spatial structure of model activations.
数据集概述:sveneziale/activations-and-barcodes
基本信息
- 许可证:Apache-2.0
- 数据集地址:https://huggingface.co/datasets/sveneziale/activations-and-barcodes
- 来源:由
tda-for-llms的 Hugging Face 后端流水线自动生成的计算产物(在experiment.yaml中启用hf.enabled: true)
数据集结构
数据集包含两个顶层文件夹:
1. activations/{model_slug}/{corpus}/{act_name}/
存储从模型中提取的原始逐云(per-cloud)激活矩阵,与拓扑度量(topology.metric)无关,同一模型、语料和激活流对应的激活数据只提取一次,可被所有度量或拓扑配置复用。
包含文件:
- activation_metadata.csv:每行对应一个云(cloud),包含
cloud_id、修订版本、层、头、提示数量等元数据。 - activations.npz:原始矩阵,键为
act_{cloud_id},与上述 CSV 中的cloud_id列对应。
2. barcodes/{model_slug}/{corpus}/{act_name}/{persistence|zigzag}/{metric}/
基于上述激活数据计算得到的持久同调(Persistent Homology)输出结果。每个拓扑度量/模式对应一份拷贝,因为条形码依赖于度量设置。
包含文件:
- persistence_summaries.csv:每行对应一个云,包含标量拓扑特征摘要。
- persistence_diagrams.npz:原始条形码,键为
cloud_{cloud_id}_h{dim}。 - manifest.json:完整的运行溯源信息,包括模型、修订版本、激活流、语料、拓扑参数等。
设计特点
数据集按模型、语料、激活名称、拓扑模式(持久/锯齿)和度量进行层级组织,便于按需检索特定配置下的激活数据或拓扑分析结果。激活数据与拓扑计算解耦,提高了计算资源利用率。





