Notes from the deployment side of machine learning.
Mostly things that went wrong first. Written up so the next person loses less time than I did.
NNAPI was the obvious choice. It was also up to 2.5× slower.
Android's neural API looked like the right path for on-device detection. Measured against the plain GPU delegate, it lost on every phone I tried.
Why quantising the detection head killed my YOLO model
Full int8 halved the model and destroyed its confidence outputs. Restricting QDQ to convolution layers kept the 2× size cut and the 3× CPU speedup with accuracy within one percent. Here's how to tell which layers to leave alone.
Stop classifying products. Retrieve them.
When the product catalogue changes every week, a classifier needs retraining every week. Visual search turns a new product into a gallery insert.
Open weights vs closed APIs: what I found
Local open-weight models and hosted APIs, tested on plain-English questions over a large capital-markets database. The hosted models pulled ahead as soon as the questions got hard.
Have a project in mind? Let’s talk.
Open to contract and full-time work. Based in Lahore, working with teams in the UK, EU and US.