Evaluation, Claims & Model Arithmetic

A score is useful only when the task, parser, sampling policy, uncertainty and contamination boundary are defensible. Cost estimates must likewise state shapes, units and omitted overhead before they guide a design.

Section 4 of 5 · 7 units · about 25 hours

0/7

By the end you can Produce a versioned evaluation with likelihood, one exact or structured metric, two slices, raw outputs, bootstrap uncertainty and contamination checks. Expose one evaluator failure and reconcile parameter, FLOP, activation and optimizer-memory estimates with the tiny model.

Units

Build it

Mini project · about 10 to 14 hours

Evaluation and arithmetic dossier

Evaluate the trained model honestly and account for its cost. The evaluation is versioned and rerunnable, every number carries uncertainty, one evaluator failure is exposed on purpose, and every parameter, FLOP and memory estimate is reconciled with a measurement.

  1. 1Report validation likelihood and perplexity with the tokenizer and split named, and explain why the number does not compare across tokenizers.
  2. 2Define one small task with at least 20 examples in each of two slices, a versioned prompt, parser and exact or structured metric. Run it on your model and store raw outputs next to the scores.
  3. 3Report the metric per slice with bootstrap intervals, compare two checkpoints or decoding settings with a paired bootstrap, and report the range across two prompt versions.
  4. 4Expose one evaluator failure on purpose, such as a parser that accepts a wrong format or a judge that prefers longer answers, and show the fix.
  5. 5Run exact and n-gram contamination checks between the evaluation set and your training split, report full and clean scores side by side, and state what the checks cannot rule out.
  6. 6Write a worksheet of parameters, forward FLOPs, activation memory and AdamW memory for your model, and reconcile each with a measurement: FlopCounterMode, tensor sizes or peak memory.
  7. 7Test the arithmetic and statistics code: parameter and matmul-FLOP counts equal exact counts from a reference module, a fixed seed gives identical bootstrap intervals, and on simulated data with a known mean roughly 95 percent of your 95 percent intervals cover it.
What you hand in
  • An evaluation manifest: data version, prompt, parser, metric, seeds and decoding config.
  • Raw outputs, slice scores with bootstrap intervals and the paired comparison.
  • The evaluator-failure case with results before and after the fix.
  • The arithmetic worksheet, with each estimate next to its measurement and the reason for any gap.
How to check it
  • Self-grade with the rubric below
How it's graded

Versioning

Pass: Rerunning the manifest reproduces the scores.

Great: A changed prompt, parser or tokenizer changes the manifest hash, and the report says which changed.

Uncertainty

Pass: Every headline number has a bootstrap interval.

Great: The comparison uses a paired bootstrap, and the report states which claim the interval supports and which it does not.

Evaluator failure

Pass: One failure is shown with its fix.

Great: You found the failure by reading raw outputs, and a regression test now covers it.

Contamination

Pass: The probe runs between evaluation and training data and its result is reported.

Great: The report separates overlap from memorization and lists what the probe cannot detect.

Arithmetic

Pass: Your counting and bootstrap tests pass, and every estimate is within 10 percent of its measurement.

Great: Every gap above 2 percent is explained, for example by elementwise ops, buffers or allocator overhead.

Resources

  • Stanford CS336 - resource accounting, inference and evaluationStanford University

    Use Spring 2026 Lectures 2, 10 and 12 for FLOPs, memory, arithmetic intensity, inference and evaluation. Reproduce the small calculations locally. Assignment 3 IsoFLOPs analysis is optional; do not require its hosted training API or costly experiments.

  • LLMs from Scratch companion - GPT FLOP analysisSebastian Raschka

    Use ch04/02_performance-analysis/flops-analysis.ipynb as a concrete calculator, then rebuild the formulas from the model configuration and reconcile parameters and at least one memory or operation estimate with runtime state.

  • Modern LLM Notebook - evaluation and FLOP accountingWalking Labs

    Use English notebook 25-evaluation and Appendix B FLOP and memory accounting. Build a 20-example evaluator with two slices, raw outputs and bootstrap intervals, and deliberately create one parser, prompt or judge failure.

  • LLM Foundations Checkpoint - evaluation and arithmetic sliceRoadmap-Final

    Use the contamination, evaluator-bias, parameter, FLOP, activation, state and KV requirements as the assessment contract. Keep raw outputs and distinguish a verified task result from a broad model capability claim.

  • Language Model Evaluation HarnessEleutherAI

    After the small evaluator passes, inspect task versioning, request construction and result schemas to understand production evaluation plumbing. Do not use the harness as a substitute for owning the task and metric contract.

  • Stanford CS336 Assignment 3 - IsoFLOPs scalingStanford University

    Use Section 2.1 and Problem chinchilla_isoflops with data/isoflops_curves.json for the bounded curve-fitting exercise only. Do not use the hosted training API or costly experiments.