model testing & gates extends “testing code” to “testing models”, in four layers: ① unit/integration tests — validating pure functions and pipeline components (data transforms, tokenizers, post-processing) so the code logic is correct; ② eval gates — computing metrics on a fixed eval set and comparing against thresholds, passing only if
Δmetric≥τ (e.g. accuracy ≥ 92%, instruction-following ≥ 90%); ③ regression baseline — the new model must not underperform the production baseline; any core metric regression blocks release; ④ pre-deployment checklist — data-leakage review, train/eval cross-contamination check, license check, manual sample review, reproducibility confirmation and load-test results.