The math behind ContextCrunch

Six interactive concepts. Each fully separated into two tailored tracks — simple English for immediate intuition, and technical formulas for engineering implementation. Live demos powered by a real Python backend, showing code alongside equations.

Lesson 01

Tokens & context windows

What is a token? Why do sessions fill up even on Pro accounts? How Claude, ChatGPT, and Gemini each tokenize differently. Interactive subword pill offset inspector.

BPEtiktokenoffsets
Interactive tokenizer →
Lesson 02

Embeddings & similarity

How does AI represent meaning, not just letters? Compute real cosine similarities on sentence pairs and hover matrix cells to visualize vector angle rotations programmatically.

all-MiniLM-L6cosine simvectors
Vector angle visualizer →
Lesson 03

Entropy & information

How do we measure information versus redundancy? Paste text to measure Shannon entropy, character probability histograms, and lossless compression limits in real time.

Shannon Hprobabilitybounds
Entropy calculator →
Lesson 04

Quantization precision

Float32 to Int8: 4x smaller storage with less than 0.5% loss. Slide a precision slider to quantize a real 10D vector and view Mean Squared Error and cosine retention.

int8precision loss1-bit binary
Precision simulator →
Lesson 05

Attention & latency

Why does attention scale quadratically? N tokens mean N² calculations. Move a slider to draw a causal-masked turns attention grid heat-map showing softmax decay.

self-attentionO(n²)causal mask
Latency simulator →
Lesson 06

Prompt efficiency

Paste any system instruction or prompt. The Groq Llama 3.3 70B engine rewrites it, highlighting removed polite fillers and redundant clauses in a visual strikethrough diff editor.

Llama 70Bredundancy difffiller extraction
Prompt diff optimizer →