Instructions to use litert-community/MobileNet-v3-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/MobileNet-v3-small with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Replace the dynamic int8 file with a weight-only int8 file
This swaps mobilenet_v3_small_dynamic_wi8_afp32.tflite for a weight-only int8 file built from this repo's own float model, because the dynamic file does not reproduce the float model's predictions (0/6 top-1 on real photos; the weight-only file restores 6/6 at the same size). Same shape as the EfficientNet fix you merged earlier. Nothing here is urgent, and if you would rather keep both files or use a different recipe, that is entirely your call β happy to redo it either way.
Details, if useful:
- Checked against this repo's own
mobilenet_v3_small.tfliteon six natural images (two photos, plus mirrored and center-cropped variants). - dynamic: 0/6 top-1, logit correlation 0.21β0.46. The misses are unrelated classes rather than near ties β a cat reads as banded gecko, Christmas stocking, safety pin; a baseball scene as wall clock, jigsaw puzzle.
- The float file itself is fine: correlation 1.0000 against torchvision's
mobilenet_v3_small, so this is the quantization step and not the checkpoint. - Likely cause: MobileNetV3's squeeze-excite gates and hard-swish activations have a wide activation range that dynamic-range quantization does not measure. Same shape as the EfficientNet family (SE + SiLU).
- The replacement is quantized directly from this repo's published
mobilenet_v3_small.tflite(sha256c7a8324aβ¦) with theweight_only_wi8_afp32recipe: 6/6 top-1, logit correlation 0.9918β0.9938, 2.75 MB against the dynamic file's 2.74 MB (3.7x smaller than float32). - README updated to match: the file table row, plus a short "Quantized variant" note in the same wording as the EfficientNet cards.
If it is useful I can run the same check across the other repos that still ship a dynamic_wi8_afp32 file and send whatever it turns up β just say the word.
This model, because with quantization, may be the answer to those that are implemented.