Reliable AI training starts with reproducible runs. Recovery and evaluation are part of the platform.
Hugging Face data → reproducible CPU/GPU training → calibrated intent classification. Checkpoint recovery, Ray/PyTorch execution and Databricks reporting support the model lifecycle.
A 77-intent classifier trained on Hugging Face BANKING77. Compare a strong linear baseline with a pretrained encoder, calibrate confidence, and route uncertain questions to human review.
SELECT. CALIBRATE. ASSESS.
0.9086 macro-F1.
Measured on 3,076 held-out questions after model and routing-policy selection. Training, model selection, calibration, and policy tuning use separate partitions.
The local prediction API returns a native intent, three calibrated alternatives, routing reasons, model version, and inference latency. Every output maps to the 77-label vocabulary.
MEASURED SELECTIVE ROUTING
42.1% routed. 99.5% routed accuracy.
Questions below the confidence or margin threshold go to human review. CPU warm p95: 11.7 ms, measured over 200 single-query model calls after 20 warmups.
One hundred frozen authored challenge queries test unrelated, ambiguous, and multi-intent requests; 6.0% were accepted. The downloadable report includes confidence intervals and per-intent results.
Jamin follows a customer’s missing-card question from intent recognition to a routing decision, then explains human review, measured results, Kaggle training, recovery and traceability. Narrated walkthrough · 5 min 19 sec · English captions. The original engineering walkthrough follows below.
Jamin walks through dataset lineage, checkpoint recovery, distributed training, GPU LoRA and Databricks reporting. Follow the architecture and measured results, then inspect the execution below.
What happens when a training job crashes halfway through? This recording follows a small model learning to sort banking questions into 77 categories. First it trains without interruption. Then a second run is deliberately stopped at update 7 and restarted from the saved checkpoint at update 5.
The test: can the restarted run finish all 20 updates and reach the same training state as the uninterrupted run? The final comparison passed.
How to explore: The terminal starts with the full transcript. Choose a numbered chapter to inspect one stage, or select Play recording to watch the captured output appear in order. Pause to read, change the playback speed, or choose Show all to restore the complete transcript. This replays saved output; it does not launch a new training job.
How to read the terminal
Timestamps and commands: Brackets show elapsed recording time and the stage name. Lines beginning with $ are commands; the lines below are their recorded results.
The failure is intentional:state: failed, exit 1; expected 1 and Driver exited -9 show the planned worker shutdown. committed_step: 5 identifies the last complete saved checkpoint.
Recovery reuses saved work: The resume command restores checkpoint 5 and repeats updates 6–7 before continuing to 20. That is why there are 22 raw metric rows but 20 canonical rows: the raw log keeps both attempts, while the canonical view counts each update once.
Verification checks more than completion: The comparison covers model weights, optimizer, learning-rate schedule, random-number state and progress through the data. final_step: 20 and the final “Full-state recovery comparison passed” message show that recovery completed and matched the reference within the stated tolerance.
Evaluation measures a different question: Macro-F1 scores how well the model classifies unseen questions, giving each of the 77 categories equal weight. Higher is better, up to 1. These scores come from a tiny, 20-update recovery fixture. The full-data classifier above measures classification quality; this recording demonstrates deterministic training recovery.
Recorded 2026-09-17 on macOS / arm64, Python 3.12.14. This replay uses a local CPU; the separate T4 LoRA experiment appears in GPU LoRA below.
Baseline run-090fda28ddf7 · recovered run-d9166c292dde. Raw metrics: 22; canonical metrics: 20. Repeated updates remain visible in the raw record. Local absolute paths are replaced with <repo> in this public copy.
02 / MEASURED, NOT PROJECTED
Correctness first. Tradeoffs included.
RECORDED CPU RUN
State restored. Results reproducible.
Base macro-F1: 0.0029. Trained: 0.0126. All 77 intents; 20 updates; batch size 8. This lightweight baseline exercises the complete training, evaluation and recovery contract.
Seven state fields match the uninterrupted baseline within the declared tolerance.
EARLIER TWO-WORKER EVIDENCE
Two ranks. One physical host.
Three matched-batch repetitions per backend. Ray / Gloo recovery restored step 5 after rank-1 failure at step 7; final model difference: 0.0.
The matched-batch benchmark identifies where distributed coordination outweighs computation, informing workload sizing before adding workers.
Earlier repeated benchmark — batch 16, fixed dataset and 20 updates. Separate from the new batch-8 recording.
Backend
Run
Wall time
Macro-F1
CPU / 1 worker
run-047d1aac07c4
3.60 s
0.0202
CPU / 1 worker
run-d6d704212b1d
2.68 s
0.0202
CPU / 1 worker
run-152fb00bdb76
2.58 s
0.0202
Ray / 2 CPU workers
run-19bef4f74d0d
11.02 s
0.0201
Ray / 2 CPU workers
run-b089bc348547
9.62 s
0.0201
Ray / 2 CPU workers
run-cdd4739d5375
9.96 s
0.0201
DATABRICKS / EXTERNALLY VERIFIED
Import twice. Count once.
Databricks preparation, Delta reads/writes, volume export/readback, repeated imports and comparison queries passed on 2026-09-17.
8 run summaries · 246 raw metrics · 240 canonical metrics · 24,608 paired predictions · zero duplicate-key groups.
Executed notebook results verify idempotent imports and canonical metrics. Imports use table-level keyed MERGE; cross-table writes have separate commit boundaries.
0duplicate-key groups after every bundle imported twice
03 / REAL GPU EXECUTION
Fine-tune. Measure the result.
SmolLM2-135M-Instruct with PEFT LoRA on Kaggle's Tesla T4 allocation. Training and recovery were validated as independent single-GPU jobs.
PINNED MODEL / FROZEN BASE
100 updates. 460,800 adapter weights.
Same pinned BANKING77 data. Batch 2 × accumulation 4. Peak allocated memory during the successful evaluation resume: 588.0 MiB. Median update: 0.502 s.
15.75 examples/s across updates 3–100. Setup and evaluation are excluded from this training throughput.
CUDA / ACTUAL SIGKILL
Checkpoint 2. Finish at step 4.
A separate short GPU run died at step 3 and resumed at step 2. Full checkpoint state matched the uninterrupted GPU reference; maximum tensor difference: 0.
Recovery restores adapter, optimizer, scheduler, RNG and sampler state, preserving the training trajectory.
96 predictions improved; 0 regressed. Evaluation exposed a label-generation bottleneck: 95.64% of adapter outputs fall outside the accepted labels. The prompt omitted the 77-label vocabulary, and the base returned no exact valid labels. The classifier extension above addresses this interface directly with a native 77-class head and separate model-selection, calibration, and routing partitions. Combined runtime across the failed first attempt and successful evaluation resume: 56.9 minutes. Sequential evaluation hit the first attempt’s 45-minute deadline; batched evaluation resumed from checkpoint 100. The resume reused all 100 completed training updates.
Databricks imported all four LoRA runs twice: 111 raw metrics, 110 canonical metrics and 3,076 paired predictions. Counts stayed unchanged, with zero duplicate keys. Databricks used CPU serverless for reporting; GPU training and recovery ran on Kaggle.
FigJam access depends on board permissions. The architecture above and downloadable evidence remain available without sign-in.
Dataset provenance and review
mteb/banking77, revision 18072d2685ea682290f7b8924d94c62acc19c0b2. Data hash 375427283fcef7a1e557ab1f9626fb731f7543419b2571e53d055017669dcb07. Source holdout preserved; exact normalized duplicate groups audited. The next data-review stage covers semantic paraphrase overlap and independent label review.
Deployment scope and scaling roadmap
The verified deployment combines single-host CPU/Ray workers, single-GPU LoRA jobs and Databricks reporting. The architecture separates compute, checkpoint state and reporting through versioned artifacts. Production expansion would add durable shared checkpoint storage, managed job orchestration, access controls, monitoring and workload-specific release gates, then validate multi-node throughput and host-loss recovery under load. Verified configuration, recovery and reporting contracts provide the foundation for that expansion.