marcjon's picture
Initial publication: v1 calibration corpus (text track)
854c1b8 verified
|
Raw
History Blame Contribute Delete
7.49 kB
---
license: odc-by
language: en
pretty_name: ckasketch v1 calibration corpus (text)
size_categories:
- n<10K
tags:
- calibration-corpus
- representational-similarity-analysis
- model-probing
- shared-input-probe-set
task_categories:
- other
---
# ckasketch v1 calibration corpus — text track
**1053 text documents** assembled from 9 permissively-licensed
sources. The fixed, hash-pinned probe set that
[ckasketch](https://github.com/marctjones/ckasketch) feeds through models to
produce comparable activation-mode sketches.
- **Corpus version:** v1.0 (text track)
- **Frozen:** 2026-05-17
- **Hash:** `sha256:cbd6a314d904842e1c5cda65eca146f8b7ddcd2027c6d0036f789a6d0a405c37` — the activation-comparability key per
[DESIGN.md](https://github.com/marctjones/ckasketch/blob/main/ckasketch/calibration/DESIGN.md)
- **Compilation license:** [ODC-BY 1.0](https://opendatacommons.org/licenses/by/1-0/)
- **Per-item licenses:** retained from the original source — see
[NOTICES.md](./NOTICES.md) and the file list below
## What this is
Activation-mode CKA (the math at the core of ckasketch) requires that any
two models being compared see **identical input documents**. Different
inputs → different activations → meaningless similarity. So we ship a
fixed, reproducible probe set: this corpus.
> Two sketches are comparable in activation mode iff they share
> `(track, corpus_hash, version)`.
> — [DESIGN.md §1](https://github.com/marctjones/ckasketch/blob/main/ckasketch/calibration/DESIGN.md)
The corpus is **input data, not the product**. ckasketch's product is the
per-model `.sketch` files (mirrored to
[`marcjon/ckasketch-sketches`](https://huggingface.co/datasets/marcjon/ckasketch-sketches)).
This corpus is what produced their activation arrays.
## How to use
If you're generating new ckasketch activation sketches and want them to
compare against existing public sketches, you MUST use this exact corpus
(matching `corpus_hash`).
```python
from huggingface_hub import hf_hub_download
from ckasketch.core.activation_sketch import (
CalibrationCorpus, extract_activation_sketch,
)
corpus_path = hf_hub_download(
repo_id="marcjon/ckasketch-calibration-v1", repo_type="dataset",
filename="corpus.jsonl",
)
corpus = CalibrationCorpus.from_jsonl(corpus_path, track="text", version="v1")
assert corpus.corpus_hash == "cbd6a314d904842e1c5cda65eca146f8b7ddcd2027c6d0036f789a6d0a405c37", (
"corpus_hash mismatch — sketches built from this corpus won't be "
"comparable with public v1 sketches"
)
sketch = extract_activation_sketch(
model_path="path/to/your/model",
corpus=corpus,
pooling_modes=("mean",),
output_path="my_model.sketch",
projection_dim=1024, projection_seed=42,
)
```
## Source breakdown
| Source | Items | Per-item license |
|--------|-------|------------------|
| the_stack_v2 | 256 | BSD-3-Clause |
| wikipedia | 175 | CC-BY-SA-4.0 |
| arxiv | 128 | CC-BY-4.0 |
| openassistant | 128 | Apache-2.0 |
| schema_org | 128 | CC-BY-SA-3.0 |
| gutenberg | 110 | PD |
| pubmed_oa | 64 | CC-BY-4.0 |
| gsm8k | 32 | MIT |
| math_dataset | 32 | MIT |
## Dataset structure
```
marcjon/ckasketch-calibration-v1/
├── README.md this datacard
├── corpus.jsonl 1053 text extracts (one per line, JSON: {"id": ..., "text": ...})
├── manifest.yaml per-item provenance + license + sha256
├── manifest.schema.yaml JSON Schema validating every manifest entry
├── NOTICES.md rendered per-item attribution catalog
└── CORPUS_LOCK hash + freeze metadata
```
**corpus.jsonl format:** one JSON object per line. Each has at minimum:
- `id` — stable identifier within the corpus (preserves cross-model alignment)
- `text` — the actual text content (768-character extracts, normalized)
**Loading:** use `ckasketch.core.activation_sketch.CalibrationCorpus.from_jsonl`
(see Usage section). The loader computes corpus_hash on read and verifies
against this dataset's published value.
## Dataset creation
**Producer:** the
[`ckasketch.calibration.build`](https://github.com/marctjones/ckasketch/tree/main/ckasketch/calibration/build)
pipeline.
- Fetcher modules pull from each source via official API (HuggingFace
datasets, OAI-PMH for arXiv/PubMed, Project Gutenberg cache URLs, etc.)
- Per-item license filter (accepts ODC-BY, CC-BY-SA, CC-BY, CC0, MIT,
Apache 2.0; rejects NC, ND, GPL/AGPL/LGPL per DESIGN.md §3)
- 768-character extracts with boundary truncation
- Manifest assembled with per-item sha256 cross-check
- Corpus hash and freeze date written to CORPUS_LOCK; once frozen, no
in-place edits — corrections go to v2
**Reproducibility:** the build is fully scripted but uses external APIs
that may be rate-limited or change over time. The frozen corpus.jsonl +
manifest.yaml here is the authoritative artifact — re-running the build
should produce the same content but may take days due to rate limits.
## Considerations for use
**In-scope:**
- Generating activation sketches comparable with public v1 ckasketch sketches
- Cross-architecture model probing (the corpus is intentionally domain-mixed)
- Benchmarking activation-based RSA / CKA methods
- Per-item attribution lookup (use manifest.yaml)
**Out of scope:**
- Training data (this is intentionally a frozen, small, public probe set —
not training material)
- Model fine-tuning (the per-item licenses don't all allow this; check
NOTICES.md for any item you intend to redistribute)
- Re-extraction (corpus is intentionally frozen at extracted text;
re-fetching from original sources may yield different content if the
source has changed)
**Mixing with vision/audio/multimodal:** future ckasketch tracks (vision,
audio, multimodal_vt) are documented in DESIGN.md §4 but not built yet.
They'd ship in a separate v1/{vision,audio,multimodal_vt}/ subdirectory
and would be independently corpus-hashed.
## Citation
```bibtex
@misc{ckasketch-calibration-v1,
author = {Jones, Marc},
title = {ckasketch v1 calibration corpus (text)},
year = {2026},
publisher = {HuggingFace Hub},
url = {https://huggingface.co/datasets/marcjon/ckasketch-calibration-v1},
note = {Frozen 2026-05-17; corpus_hash sha256:cbd6a314d904842e1c5cda65eca146f8b7ddcd2027c6d0036f789a6d0a405c37; ODC-BY 1.0},
}
@software{ckasketch,
author = {Jones, Marc},
title = {ckasketch: CKA-based representational similarity sketches for ML models},
url = {https://github.com/marctjones/ckasketch},
year = {2026},
}
```
## Cross-references
- **ckasketch source repo:**
https://github.com/marctjones/ckasketch
- **Sketches produced against this corpus:**
https://huggingface.co/datasets/marcjon/ckasketch-sketches
- **DESIGN.md (full spec for tracks, licensing tiers, sketch format):**
https://github.com/marctjones/ckasketch/blob/main/ckasketch/calibration/DESIGN.md
## License attribution
Compilation: ODC-BY 1.0. Each individual document retains its original
source license — see NOTICES.md (line-by-line) and manifest.yaml
(machine-readable). When redistributing or building derived works, attribute
both the compilation (this dataset) and the underlying sources per their
respective requirements.
## Maintained by
[@marcjon](https://huggingface.co/marcjon). Issues and corrections welcome at
https://github.com/marctjones/ckasketch/issues. The corpus itself is frozen
— any correction lands in a future v2 (with a new corpus_hash).