Lesson 2: Making models faster: ONNX, batching, caching, compiling
28 min read·
Module 8 · Lesson 2 · About 55 minutes · Needs: lesson 1 (the float network and the LightGBM), attention (Module 4 lesson 3), and the Kestrel data (course-guide/06).
The situation
Week 8 at Kestrel, Tuesday 22 December 2026. Next week's scoring service runs models in ONNX Runtime. Rhys describes two loads: at 06:00 every parcel due that day arrives at once; during the day parcels arrive one at a time. "Make each model fast, and prove it gives the same answers."
The running example is again KP0104204 (simulated), the late Dartford parcel: the network gives it 0.546, the LightGBM 0.628, and every faster version must agree.