01Chapter 1: Why edge inference is different: latency, memory, power, and privacyThis chapter assumes you can read basic Python and have trained or used an image model in PyTorch or TensorFlow. You should know what a convolutional neural network (CNN) is, and how float32 and int8 differ as tensor data types. You don't need mobile development experience. Later chapters cover Andr7 min read
02Chapter 2: Choosing an efficient architecture for your deviceThis chapter assumes you can train or fine-tune a CNN in PyTorch or TensorFlow. It also assumes you know what a convolution, a channel, and a float32 tensor are. The chapter covers how to shortlist architectures for a phone or edge board, which numbers to trust, and which mistakes cause the most was6 min read
03Chapter 3: Quantization: float32 to int8This chapter assumes you know what a convolutional network is, can read basic PyTorch or TensorFlow code, and understand float32 and int8 as tensor data types. By the end you should be able to apply post-training quantization (PTQ), explain what the converter is doing, and decide when quantization-a7 min read
04Chapter 4: Pruning and knowledge distillationThis chapter assumes you know how to train a CNN classifier or detector in PyTorch. It also assumes you have met the idea of quantization from the previous chapter, and that you know what a loss function and a softmax are. You do not need a mobile app.6 min read
05Chapter 5: Exporting and converting a modelThis chapter assumes you can train or load a PyTorch or Keras image model and that you know what float32 and int8 tensors are. You should also have read the quantization chapter, because conversion is where quantization gets applied to a real file.5 min read
06Chapter 6: Inference runtimes: TensorFlow Lite, ONNX Runtime, Core ML, and ExecuTorchThis chapter covers what an on-device inference runtime does, how the four common runtimes differ, and how to pick one for a target platform. It assumes you can run a PyTorch or TensorFlow model in Python and that you know what float32 and int8 tensors are. You also need the export step from the pre7 min read
07Chapter 7: Using GPUs and NPUs through delegates and execution providersThis chapter assumes you can export a model to TensorFlow Lite or ONNX and run it on the CPU. It also assumes you know why int8 quantization shrinks a model. You will learn how a runtime hands part of a model to a GPU or NPU, what you gain, and what can go wrong.6 min read
08Chapter 8: Preprocessing and postprocessing that match trainingThis chapter assumes you can read Python and NumPy, know what a convolutional classifier or detector outputs, and have already exported a model to TensorFlow Lite or ONNX. You should also know the difference between float32 and int8 tensors.8 min read
09Chapter 9: Benchmarking latency on the real deviceThis chapter assumes you can export a model to TensorFlow Lite or ONNX and know what quantization does. It covers how to measure inference speed on the phone or board you will ship on, and how to read the numbers. A desktop run tells you little about a phone. Different CPU cores, memory bandwidth, d6 min read
10Chapter 10: Checking accuracy after quantization and conversionThis chapter assumes you can run a PyTorch or TensorFlow model, you know what float32 and int8 mean, and you have already exported a model as in the previous chapters. Here you will learn how to confirm that the optimized model still does its job, and how to find the cause when it does not.7 min read
11Chapter 11: Running the model inside an Android or iOS appThis chapter covers the app side of deployment: loading a converted model, feeding it camera frames, and getting results to the screen without freezing the interface or leaking memory. It assumes you have a converted model (for example the quantized .tflite file from the export chapter), you know 5 min read
12Chapter 12: Battery drain and thermal throttlingA model that runs fast for ten seconds in a benchmark can still fail in the field. After a few minutes of continuous inference, the phone gets warm, the operating system lowers clock speeds, and latency climbs. The battery meanwhile drains faster than users accept. This chapter explains why that hap7 min read
13Chapter 13: Unsupported operators, CPU fallback, and other common failuresThis chapter assumes you can export a model to ONNX or TensorFlow Lite, know what a delegate or execution provider is, and have run a basic latency benchmark. It covers the failures you are most likely to hit when a model that works on your desktop misbehaves on a phone, and how to find the cause of5 min read
14Chapter 14: Packaging, delivering, and updating modelsThis chapter covers how a converted and validated model reaches users' devices and how you replace it later. It assumes you can export and quantize a model, and that you know which runtime your app uses (TensorFlow Lite, ONNX Runtime, Core ML, or ExecuTorch). It also assumes you have benchmarked and6 min read