QLNI's picture
Update data card: training plan, mix, Engram, ARC
1593f40 verified
|
Raw History Blame Contribute Delete
20.3 kB
metadata
pretty_name: SHADOW Assistant Data
language:
  - en
license: other
license_name: qlni-non-commercial-research
license_link: LICENSE.md
size_categories:
  - 100M<n<1B
task_categories:
  - text-generation
  - image-to-text
  - visual-question-answering
  - video-text-to-text
  - automatic-speech-recognition
  - audio-classification
  - question-answering
tags:
  - arxiv:2610.22428
  - pretraining
  - multimodal
  - instruction-tuning
  - tokenized
  - australia
  - australian-english
  - small-language-model
  - on-device
  - cpu
  - ternary
  - bitnet
  - long-context
  - speech
  - audio-captioning
  - video
  - ocr
  - documents
  - charts
  - math
  - code
  - legal
  - parliament
  - decontaminated
  - arc-agi
  - reasoning
  - synthetic
  - frozen-embedding
  - gemma-tokenizer
configs:
  - config_name: kimi
    data_files: sft/kimi/*.jsonl.zst
  - config_name: sft_audio
    data_files: sft/audio/*.jsonl.zst
  - config_name: sft_vision
    data_files: sft/vision/*.jsonl.zst
  - config_name: smoltalk
    data_files: sft/smoltalk/*.jsonl.zst

SHADOW Assistant Data

All the training data for SHADOW Assistant: a small AI that reads, writes, does maths and code, looks at pictures, documents and video, listens to speech and sound, and remembers past conversations from disk, running offline on a normal laptop CPU. Trained from scratch, with a strong focus on Australia.

Roadmap: every step from data to release, and where we are now.

Why this dataset exists

Ready to train, so you do not pay for it again. Tokenizing and encoding all of this cost us about $400 of GPU time, plus weeks of work finding sources, checking licences, filtering and decontaminating. Everything here is already tokenized (Gemma tokenizer) and encoded: load one source or all of them and start training.

More than SHADOW needs. SHADOW reads only the 512-bit codes, but where the licence allows we also publish the encoders' vectors (int8, with a scale per token), so the same data works for other projects: your own model, image or audio retrieval, embedding research, or studying how each kind of data shapes a model. Results on how each part of the data shapes SHADOW will be published with the trained model.

Text pretraining 287B tokens (web, Australian, legal, code, maths, books, arithmetic, ARC puzzles)
Pictures and video about 9.5B picture tokens, with about 9.9B tokens of captions and questions
Audio about 37,700 hours (about 3.4B sound tokens), with transcripts and captions
Maths for the end of training about 10.7B tokens
ARC puzzles 445k puzzles, 1.26B tokens, checked against the ARC-AGI-1 and ARC-AGI-2 evaluation tasks
Tuning (SFT) about 7.4M text conversations, 1.74M vision, 1.34M audio, 29k Australian conversations

Browse the conversations in the dataset viewer above (Kimi, audio, vision and SmolTalk tuning sets). The token shards are binary and are read with the code in Loading.

Training plan at a glance

SHADOW's main run reads 325.0B tokens in six stages. The window grows stage by stage, and the learning rate follows a warm-up, a long flat stretch, then a decay (WSD).

stage window tokens learning rate
1 2k 183.5B warm-up over the first 2% (6.5B tokens), then flat at the peak
2 4k 29.5B flat at the peak
3 8k 41.9B flat at the peak
4 12k 41.9B flat at the peak (a full checkpoint is kept here, before the anneal)
5 12k, anneal 23.5B falls from the peak to 10%
6 32k 4.7B holds at 10% for 80% of the stage, then falls to 0

Peaks: 0.02 for the ternary body (Muon), 0.002 for everything else (AdamW), 0.01 for the Engram rows. Weight decay 0.1 in the flat stretch, none in the decay.

Why this shape:

  • Short windows first. Most documents are short, and short windows train fastest, so most knowledge is learned at 2k. Longer windows (with a larger RoPE base, so far positions stay distinct) come once the model already knows the language.
  • A long flat stretch. At a flat learning rate any checkpoint can be continued or branched, so others can pick up training from any stage; the full checkpoint before the anneal is kept for exactly that.
  • An anneal with the best data at the end. Lowering the learning rate while reading the cleanest maths, code and reference text locks in what was learned; this is where small models gain most on benchmarks.
  • The 32k stage at a small but real learning rate. Run at almost zero, the longest window would barely be learned; holding 10% (as DeepSeek-V3 and Qwen2.5 do when they extend the window) lets the model learn its full window and the index, and the last 20% brings it to 0 for clean final weights.

How SHADOW uses this data

 text, pictures, video, sound ──> 512-bit codes from one frozen table ──> 135M ternary body ──> next token
                                                                            │
   memory:  gist (RNN state, 26 KB)   window (last 32k tokens)   archive on disk + index   Engram (4B rows on disk)

SHADOW keeps four kinds of memory, and each is taught by part of this data:

memory what it is taught by
Gist 21 RNN layers carry a fixed 26 KB summary of everything read, whatever the length; it can be saved to resume a conversation instantly long documents: books, legal judgments, Hansard, long web pages (30B tokens in documents of 8k+)
Window 3 attention layers see the last 32k tokens exactly window stages from 2k to 32k on long documents
Archive and index everything older stays on disk; a word-match search plus a trained index fetch the best 2,048 tokens back into the attention layers, best block last archive practice on long documents: facts placed early, questions asked later (in a test, fetching lifted recall from 9% to 63%)
Engram 4B hashed 2- and 3-token memories read from disk: facts and phrases all the text (never picture or sound codes)

Pictures, video and sound share the same 512-bit space as words, so their captions and transcripts (about 10B tokens) teach the body what things look and sound like. More in the guide.

Use it for

  • Training a small model: the text shards, with their per-shard token counts for a unigram prior.
  • Tuning only: the conversation sets in sft/, including 29k Australian conversations.
  • Retrieval and embedding research: picture, video and sound codes and the int8 encoder vectors, with their text.
  • Clean evaluation: the held-out manifests and the lists in decontamination/.
  • The sets we may not post: scripts in rebuild/ that rebuild them from the original source.

Find your way: the map below says where everything is; the guide explains every design decision and why; AI agents should read AGENTS.md.

Map

I want... go to
text for pretraining knowledge/, code/, math/, creative/, arithmetic/, reasoning/arc/
Australian text only knowledge/fineweb_edu_au/, knowledge/dclm_au/, knowledge/legal/, knowledge/hansard/, knowledge/spaceai/, knowledge/joeyllm/
maths for the end of training (anneal) math/anneal/<source>/
pictures and video vision/images/<source>/, vision/video/<source>/
speech, sounds, music audio/speech/<source>/, audio/sounds/<source>/, audio/music/<source>/
tuning conversations sft/<set>/, sft/vision/, sft/audio/, sft/kimi/
the sets we may not post rebuild/ (scripts that rebuild them from the original source)
how to read the files Formats and Loading below
how SHADOW mixes it, stage by stage Training mix below
what was kept out of training, and why Clean evaluation below
why it is built this way GUIDE.md
what is done and what is next ROADMAP.md

What is in it

part tokens sources
Knowledge, global 107.6B FineWeb-Edu 72.6B, DCLM-Baseline 35.0B
Knowledge, Australian 34.3B .au pages of FineWeb-Edu 24.3B and DCLM 6.0B, Open Australian Legal Corpus 2.06B, JoeyLLM Australian 0.99B, Australian Wikipedia 0.37B, SpaceAI Australian Corpus 0.37B, House of Representatives Hansard 1998 to 2025 0.23B, Australian Dictionary of Biography 0.02B
Code 59.6B OpenCoder FineWeb code 52.0B, OpenCoder annealing 7.5B
Maths 53.9B Nemotron-CC-Math 4plus
Creative writing 3.6B Cosmopedia stories, Project Gutenberg books, poetry
Arithmetic 2.0B generated by us, every answer checked
Reasoning puzzles (ARC) 1.26B BARC / ARC-Heavy 364k puzzles (MIT, generated with GPT-4 models), RE-ARC 80k (MIT), ARC-AGI-1 and ARC-AGI-2 training tasks 1,015 (Apache 2.0): the rule in plain English, the example grids and the code that makes them
Maths for the anneal about 10.7B MegaMath Q&A, MathCoder2, TuluMath, DolminoSynthMath, GSM8K train
Pictures about 7.0B picture tokens FineVision, SynthChartNet, M4-Instruct, Atlas of Living Australia (256,874 photos), CORD-v2
Video about 2.5B picture tokens VISTA-400K, LLaVA-Video-178K, Vript, Video-STaR, FineVideo, ShareGPT4Video, ActivityNet Captions, YouCook2, Australian Roads Dashcam
Audio about 37,700 hours Loquacious Set, LibriSpeech, Australian English speech, AudioSet with AudioSetCaps, Clotho, WavCaps (FreeSound, BBC Sound Effects, SoundBible), MusicCaps

Tuning data (sft/): OpenCoder SFT, NuminaMath-CoT, Orca-Math, GSM8K train, ToolMind, Toucan, Glaive function calling, When2Call, SmolTalk (without conversations that name other models), Australian alignment and legal QA, JSON extraction, 29k conversations we generated for SHADOW (everyday Australian life, dates and the limits of what it knows, who SHADOW is, working with files, creative writing), and vision and audio conversations built from held-out shards.

Documents of 32k tokens or more hold about 6.6B tokens (books, legal judgments, Hansard, long web pages), enough to train a 32k context window natively.

What the Engram reads

The Engram is SHADOW's 4B-row memory of short phrases. For every text token it looks up the 2-token and 3-token sequence ending there (8 hashed tables) and adds what it finds to the body.

  • Hashed: all text, whatever the source: web and Australian text, legal, Hansard, books, code, maths, arithmetic, ARC puzzles, and the captions, questions, answers and transcripts that come with pictures, video and audio.
  • Not hashed: picture, video and audio codes (they are not words, and their 512-bit codes already carry them). The phrase restarts after every picture or sound and at the start of every document, so nothing is hashed across them.
  • Keys: tokens are normalised first (NFKC, lower case, the leading-space marker removed, all whitespace one key), so "The", "the" and " the" share one memory: the 262,144 tokens become 192,486 keys. Special tokens keep their own keys.
  • Trained in every stage with its own learning rate (0.01, no weight decay), kept as int4 the way it ships, and frozen during tuning.

Training mix

How SHADOW's main run uses this data: 325.0B tokens in six stages, each step about 0.5M tokens. The window grows from 2k to 32k; RoPE base grows with it.

stage window tokens what is in it
1 2k 183.5B first pass of the web, code, maths and Australian text; half of the pictures, video and audio
2 4k 29.5B the same sources, continued
3 8k 41.9B the same, plus a second pass of long documents (books, legal, Hansard, SpaceAI) and ARC puzzles
4 12k 41.9B as stage 3
5 12k, anneal 23.5B maths and code for the end of training, Australian Wikipedia and biographies, arithmetic, ARC, a second pass of pictures, video and audio; learning rate falls to 10%
6 32k 4.7B long documents (about 40%) and anneal maths and code; learning rate holds at 10%, then falls to 0
source tokens used passes stages
FineWeb-Edu 72.6B 1 1 to 4
Nemotron-CC-Math 4plus 53.9B 1 1 to 4
OpenCoder FineWeb code 52.0B 1 1 to 4
DCLM-Baseline 35.0B 1 1 to 4
FineWeb-Edu, Australian pages 24.3B 1 1 to 4
DCLM, Australian pages 6.0B 1 1 to 4
Maths for the anneal 10.7B 1 5, 6
OpenCoder annealing 7.5B 1 5, 6
Open Australian Legal Corpus 5.3B 2 1 to 4, 6
Cosmopedia stories 5.3B 2 1 to 4
Arithmetic 3.0B 1.5 1 to 5
Project Gutenberg and poetry 2.5B 2 1 to 4, 6
ARC puzzles 1.3B 1 3 (40%), 4 (40%), 5 (20%)
Australian Wikipedia 0.74B 2 1 to 5
JoeyLLM Australian 1.0B 1 1 to 4
SpaceAI Australian Corpus 1.0B 2 1 to 4, 6
Hansard 0.58B 2 1 to 4, 6
Australian Dictionary of Biography 0.06B 3 1, 5
Pictures (FineVision, SynthChartNet, M4-Instruct, CORD-v2) 28.6B 2 1 to 5
Atlas of Living Australia photos 0.16B 3 1 to 5
Video 6.3B 2 1 to 5
Speech 4.9B 2 1 to 5
Australian speech 0.08B 3 1 to 5
Sounds 2.4B 2 1 to 5
Music 0.01B 3 1 to 5

Picture, video and audio rows count their codes and their text. 10% of every picture, video and audio source is held out for tuning and never read here. The unigram prior SHADOW starts from is the sum of every text shard's .counts.npz (286.96B tokens).

Formats

Text shards (<source>_w<worker>_<number>.bin): raw tokens, 3 bytes each, little-endian; every document is <bos> text <eos>. Next to each: a .json (token and document counts, source files) and a .counts.npz (how often each token appears). Tokenizer: Gemma's 262,144 tokens (the EmbeddingGemma 2 tokenizer).

Picture and video shards (.npz): codes (one 512-bit code per picture token, 64 bytes), vec and vec_scale (the vision tower's int8 vector per token, where the licence allows), img (per picture: first token, token count, budget, width, height). A .jsonl gives each sample's text (captions, questions, answers), its pictures, and frame times for video. Photos use up to 280 tokens, documents up to 1,120, video one frame a second with up to 64 frames.

Audio shards (.npz): codes (25 tokens a second, 64 bytes each) and clips (per clip: first token, token count, length in hundredths of a second). A .jsonl gives each clip's id, source, kind (speech, sound, music) and text (transcript, caption, or questions and answers). Large sources are split into part_NN/ folders.

Tuning (sft/<set>/part_NNN.jsonl.zst): one conversation per line, {"messages": [...], "tools": [...], "source": ...}. Vision and audio conversations point at their shard and picture or clip instead of copying codes.

All codes use one rule for words, pictures and sound: the sign of a fixed projection of EmbeddingGemma 2's vector (see GUIDE.md).

Loading

import json, numpy as np
from huggingface_hub import hf_hub_download
R = "QLNI/shadow-assistant-data"

# a text shard -> token ids, split into documents
p = hf_hub_download(R, "knowledge/legal/legal_w00_00000.bin", repo_type="dataset")
b = np.fromfile(p, np.uint8).reshape(-1, 3).astype(np.int64)
ids = b[:, 0] | (b[:, 1] << 8) | (b[:, 2] << 16)
starts = np.flatnonzero(ids == 2)                                   # <bos>

# an audio shard -> the codes of each clip, with its text
z = np.load(hf_hub_download(R, "audio/sounds/clotho/<shard>.npz", repo_type="dataset"))
lines = open(hf_hub_download(R, "audio/sounds/clotho/<shard>.jsonl", repo_type="dataset")).read().splitlines()
first, count, centis = z["clips"][0]
codes = np.unpackbits(z["codes"][first:first + count], axis=1)      # [count, 512] bits
text = json.loads(lines[0])["texts"]

Clean evaluation

  • Held-out tuning shards: 10% of every picture, video and audio source is kept for tuning only. The lists are in sft/vision/vision_sft_manifest.json and sft/audio/audio_sft_manifest.json; pretraining should not read them.
  • Benchmark test data kept out at build time: LibriSpeech test, Clotho evaluation, AudioCaps test and validation, MusicCaps evaluation, and WavCaps' AudioCaps/Clotho blacklist.
  • Skip lists for overlaps found after building: HellaSwag's validation and test items come from 3,299 ActivityNet videos that are in our video set; ESC-50, UrbanSound8K and VGGSound share 2,219 FreeSound clips and 15,510 AudioSet clips with our audio. Both lists are in decontamination/.
  • Text benchmarks: every text shard is scanned during training for 13-token sequences from nine text benchmarks (HumanEval, MBPP, GSM8K, MMLU, ARC, HellaSwag, PIQA, WinoGrande, OpenBookQA; 3.1M sequences); any document that shares one is skipped.
  • ARC-AGI: the ARC puzzles were checked against all 514 ARC-AGI-1 and ARC-AGI-2 evaluation tasks: 376 training tasks that are evaluation tasks and 13,476 puzzles sharing a grid (any rotation or flip) with an evaluation task were removed.
  • Disclosed, not removed: FineVision's authors report that 1.02% of its images match test images of 66 vision benchmarks; we use FineVision as released.

Published here or rebuilt

Published here, as tokens and codes (never raw pictures or audio): everything above except the sets below.

Rebuilt from the original source with the scripts in rebuild/, because their terms do not allow reposting: Nemotron-CC-Math, Australian Wikipedia (CC BY-SA), Australian Dictionary of Biography (CC BY-NC-ND), and the video sets for research use only or without a stated licence (LLaVA-Video-178K, Vript, Video-STaR, ActivityNet Captions, YouCook2). MusicCaps codes are kept private; its rebuild script will follow.

Left out on purpose

  • News sites and other sites whose terms forbid bulk downloading.
  • Sets that only ship file ids, and tuning sets written by models whose licences follow the trained model.
  • MovieChat-1K (no licence) and MAmmoTH-VL (mostly repeats FineVision).
  • Trove digitised newspapers: the National Library of Australia declined our request for an exemption to its API terms.
  • Senate Hansard, House of Representatives Hansard before 1998, AustLII, and several picture collections: not used.

Known issue: some code examples in sft/opencoder_sft_stage1 and stage2 contain API keys left in the original GitHub code by its authors (found by Hugging Face's scanner). They are not ours; we have not removed them yet.

Licence

QLNI Non-Commercial Research Licence (see LICENSE.md): free for non-commercial research and education, with attribution. Each part also keeps the terms of its source.

Thanks

Compute from CloudRift through their AI Builder Grant, for the picture, video and audio encodes and the test runs. The House of Representatives Hansard comes from Lindsay Katz and Rohan Alexander's database of the Australian Parliamentary Debates (Zenodo 17351233, CC BY 4.0). Every source above belongs to its creators; see each source's own page.

Citation

The frozen vocabulary this data is built for: Embeddings Are Overpriced?.

@misc{qlni2026shadowdata,
  title     = {SHADOW Assistant Data},
  author    = {Bathula, Sai Kiran},
  year      = {2026},
  publisher = {QLNI},
  url       = {https://huggingface.co/datasets/QLNI/shadow-assistant-data}
}

When you use this data, please mention QLNI and CloudRift, for example: "Training data from SHADOW Assistant by QLNI (https://huggingface.co/datasets/QLNI/shadow-assistant-data), encoded with compute from CloudRift (https://cloudrift.ai)."

Contact

Sai Kiran Bathula, QLNI, New South Wales, Australia. saikiranbathula@qlni.io