CoolFace
Datasetpublic

liodon-ai/nanochat-calendar-arithmetic-base10

nanochat Base-10 Calendar Arithmetic A deterministic, base-10 arithmetic corpus scoped to three cyclic calendar units: hour-of-day (mod 24), day-of-week (mod 7), and month-of-year (mod 12). Companion to Yujivus/nanochat-climbmix-arithmetic-base10, built the same way but scoped to real modular calendar units instead of free-integer add/sub/mul/div/mod. Every example is a single line — question and answer collapsed into one equation, no exposed reasoning: 23:00 + 18965h = 04:00… See the full description on the dataset page: https://huggingface.co/datasets/liodon-ai/nanochat-calendar-arithmetic-base10.

sourceHugging Facecc0-1.0updated 1mo agoView on Hugging Face
0likes270downloads
Dataset Card

nanochat Base-10 Calendar Arithmetic

A deterministic, base-10 arithmetic corpus scoped to three cyclic calendar units: hour-of-day (mod 24), day-of-week (mod 7), and month-of-year (mod 12). Companion to Yujivus/nanochat-climbmix-arithmetic-base10, built the same way but scoped to real modular calendar units instead of free-integer add/sub/mul/div/mod.

Every example is a single line — question and answer collapsed into one equation, no exposed reasoning:

23:00 + 18965h = 04:00
Fri + 12321d = Sat
Nov + 20927mo = Oct

Why calendar units specifically

Hour-of-day, day-of-week, and month-of-year are exactly the small, fixed moduli (24 / 7 / 12) that modular-addition grokking work (e.g. Nanda et al.) shows transformers learn as genuine Fourier-basis circuits rather than memorized lookup tables — the same phenomenon referenced for the base-6 model this corpus is meant to feed. Framing the questions in natural clock/weekday/month notation instead of abstract a % m = r keeps the surface form "real" (useful, human-readable) while the underlying task is still pure modular arithmetic.

Families

FamilyFormatDomainCount
hours_addHH:00 + Nh = HH:00start 0..23, delta 0..20000, mod 24350,000
hours_subHH:00 - Nh = HH:00start 0..23, delta 0..20000, mod 24350,000
days_addDdd + Nd = Dddstart Mon..Sun, delta 0..100000, mod 7350,000
days_subDdd - Nd = Dddstart Mon..Sun, delta 0..100000, mod 7350,000
months_addMon + Nmo = Monstart Jan..Dec, delta 0..50000, mod 12300,000
months_subMon - Nmo = Monstart Jan..Dec, delta 0..50000, mod 12300,000
Total equations2,000,000

Every equation in a family is unique: for each family the generator builds a bijective Feistel permutation (seed 42) over the full (start, delta) domain and takes the first N images as the sample — collision-free by construction, and byte-for-byte reproducible from build_calendar_arithmetic_corpus.py (included in this repo) plus the recorded round keys in calendar_arithmetic_manifest.json. This mirrors the sampling method used for the base-10/base-6 general-arithmetic corpora.

Documents are 16 newline-separated equations each (matching the source corpora's convention), globally shuffled with the fixed seed, packed one document per row (text column) into 32 parquet shards (shard_00000.parquet .. shard_00031.parquet).

Scale

2,000,000 equations is a deliberate starting point, not a final size — benchmark against it first (does the model actually acquire the mod-24 / mod-7 / mod-12 circuits at this density?) and scale the delta ranges / per-family sample counts up if it's not enough. Every knob is in build_calendar_arithmetic_corpus.py.

Difference from the general arithmetic corpus

This is a pure-arithmetic corpus, not pre-mixed into ClimbMix web shards — unlike nanochat-climbmix-arithmetic-base10/base6, which interleave their arithmetic documents into actual ClimbMix training shards. Mix these shards into your own pretraining data the same way those were mixed into nanochat-climbmix-170.

Provenance

  • —nanochat: https://github.com/karpathy/nanochat
  • —Sibling corpus: https://huggingface.co/datasets/Yujivus/nanochat-climbmix-arithmetic-base10
  • —Sibling corpus (base 6): https://huggingface.co/datasets/Yujivus/nanochat-climbmix-arithmetic-base6
  • —Generator script and full manifest (config + Feistel round keys) included in this repo.

CC0 — the content is fully synthetic (deterministically generated modular arithmetic), no upstream licensing constraints apply.