Phase 03 — From Models to Browser Inference
This phase moves from hand-built kernels to real exported models. Success now depends on three contracts agreeing: model graph and weights, runtime operator/backend support, and the media transformations surrounding inference.
Branches
- Model Formats, Conversion & Quantization — ONNX, TFLite/LiteRT, safetensors, specialized formats, graph optimization, shapes, operator coverage, precision, calibration, and numerical drift.
- Browser Inference Runtimes — ONNX Runtime Web, LiteRT.js, Transformers.js, MediaPipe, TensorFlow.js where relevant, sessions, tensors, lifecycle, execution providers, and fallbacks.
- Preprocessing, Postprocessing & Media Pipelines — image/audio/text decoding, resize, normalization, layouts, tokenization, masks, thresholds, and deterministic output interpretation.
Workbench milestone
v3 — Real models and real runtimes: export the same small model to ONNX and TFLite/LiteRT in FP32 and a justified quantized form, execute it through ONNX Runtime Web and LiteRT.js, and compare each complete pipeline with golden outputs.
What this phase establishes
- Reproducible export commands and artifact manifests.
- Operator and shape compatibility checked before product integration.
- One conceptual backend interface without erasing runtime-specific behavior.
- Explicit tensor ownership, disposal, preprocessing, and postprocessing.
- Numerical comparisons that separate conversion, quantization, runtime, and pipeline drift.
Exit criteria
- Every model artifact has source, format, precision, checksum, size, and operator assumptions.
- The same fixtures run through both runtime paths or produce an explicit unsupported result.
- Preprocessing and postprocessing match the reference implementation within declared tolerances.
- Initialization, first inference, warm inference, peak memory, cleanup, and fallback are recorded.
Continue with Phase 04: Hardware Acceleration.