Appendix E — Guide to the “Jupy-purr” Notebooks

Phase checkpoint overview and links

Theory is nice, but code is law. All companion notebooks live in github.com/royphilip/KittenAI-Notebooks using a two-tier system: optional chapter micro-notebooks (Tier 1) and phase checkpoint notebooks (Tier 2).

E.1 Tier 1: Chapter micro-notebooks (micro-notebooks/)

Tier 1 notebooks are:

  • Optional and confidence-building.
  • 10-30 minute, chapter-aligned, tiny experiments.
  • CPU-friendly, offline by default, and minimal-dependency.
  • Self-check oriented (light sanity assertions), not hard gates.

Current Tier 1 exemplars:

E.2 Tier 2: Phase checkpoint notebooks (appendix-repo/)

Tier 2 notebooks remain the primary checkpoint-first artifacts and represent phase-level exit criteria.

  • 01_checkpoint_foundations.ipynb · Open in Colab Scaffold focus: linear algebra, probability, optimization, and data-prep fundamentals (Phase I).

  • 02_checkpoint_classical_ml.ipynb · Open in Colab Scaffold focus: supervised/unsupervised workflow and evaluation basics (Phase II).

  • 03_checkpoint_deep_learning.ipynb · Open in Colab Scaffold focus: forward/backprop reasoning, CNN/embedding/attention fundamentals (Phase III).

  • 04_checkpoint_reinforcement.ipynb · Open in Colab Prompt theme: 🐾 Treat Hunting 101

    • discounted_return(rewards, gamma): treats now vs. treats later.
    • q_learning_update(q_sa, reward, gamma, next_max_q, alpha): update Pixel’s optimistic heat map.
    • greedy_action(q_values): pick the max-treat pounce. Scaffold focus: MDP reasoning, Bellman updates, policy/value intuition (Phase IV).
  • 05_checkpoint_safety.ipynb · Open in Colab Prompt theme: 🐾 Finishing School & Alignment

    • dpo_implicit_reward(policy_logp, ref_logp, beta): DPO implicit reward.
    • shannon_entropy(probs, eps=1e-12): uncertainty/surprise measurement.
    • should_abstain(max_prob, threshold): safe fallback when confidence is low. Scaffold focus: alignment pipeline concepts, robustness, interpretability reasoning (Phase V).
  • 06_checkpoint_engineering.ipynb · Open in Colab Prompt theme: 🐾 The Frontier Cat Lab

    • estimate_compute_6nd(params, tokens): 6ND compute budget estimate.
    • kv_cache_bytes(num_layers, seq_len, hidden_size, bytes_per_elem=2): KV cache memory sizing.
    • tokens_per_second(tokens_generated, elapsed_seconds): serving throughput measurement. Scaffold focus: scaling/inference systems concepts and production integration readiness (Phases VI-VII).

Tier 2 implementation status

  • Each checkpoint notebook includes a short markdown prompt.
  • Each checkpoint notebook includes a concrete run_validation() function with deterministic minimal checks.
  • The learner implements required functions in prior cells, then uses run_validation() as a self-check.
  • These are learning checkpoints, not full production-grade assessment suites.