Remove MLX artifacts: 7.5-19.6x slower than Core ML on device
Browse filesMLX measured substantially slower than Core ML on an iPhone 16 for every convolutional vision model tested (efficientnet-v2-s 19.6x, yolo26-s 16.0x, yolo26-seg-s 7.5x, yolo26-pose-n 10.0x). MLX weight quantization also cannot shrink a conv model, since it only rewrites nn.Linear/embedding modules.
The .pte and config.json are removed; each mlx/ dir keeps a NOTES.md with the measurements. The exporter is retained in export-scripts so this can be re-tested against a future ExecuTorch/MLX release.
Earlier tags (v0.9.0 and below) are untouched and still contain the MLX artifacts.
Files changed (3)
- mlx/NOTES.mdAdded+50
- mlx/config.jsonDeleted-42
- mlx/efficientnet_v2_s_mlx_fp16.pteDeleted-3
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950# MLX is not shipped for this model
The MLX artifacts for this model were removed deliberately. The exporter in`export-scripts` is kept so the decision can be re-tested against a futureExecuTorch/MLX release, but no `.pte` or `config.json` is published here.
## Why
Measured on device (iPhone 16, ExecuTorch 1.4.1, Release build, 3 warmup runs +15 timed runs, median):
| backend | precision | median latency ||---|---|---|| Core ML | fp16 | **2.4 ms** || MLX | fp16 | 47.0 ms |
MLX is **19.6x slower than Core ML** for EfficientNet-V2-S @384.
This is not specific to this model. MLX was measured behind Core ML on everyconvolutional vision model tested, by 7.5x to 19.6x:
| model | Core ML | MLX | MLX penalty ||---|---|---|---|| efficientnet-v2-s @384 | 2.4 ms | 47.0 ms | 19.6x || yolo26-s @640 | 3.7 ms | 59.2 ms | 16.0x || yolo26-seg-s @640 | 11.0 ms | 82.9 ms | 7.5x || yolo26-pose-n @384 | 1.2 ms | 12.0 ms | 10.0x |
Two things compound the latency result:
1. **MLX quantization cannot shrink a conv model.** `executorch.backends.mlx.llm.quantization.quantize_model_` only rewrites `nn.Linear` and embedding modules. EfficientNet-V2-S holds just 6.0% of its parameters (1,281,000 of 21,458,488) in its single `nn.Linear`, so 4-bit weight quantization buys about 5% file size. `nvfp4` is a literal no-op: it logs `Skipping classifier.1: weight shape [1000,1280] incompatible with nvfp4 (group_size=16)` and emits a byte-identical artifact.2. **Core ML quantizes the whole model.** Core ML's `op_linear_quantizer_config` reaches the convolutions, so int8/per_channel halves the artifact again (43.9 MB fp16 -> 22.1 MB) at identical latency.
## Scope
This applies to convolution-dominated vision models. It does **not** generalize:
- `rfdetr-nano` (conv + transformer) measured only **1.24x** behind Core ML.- The `lfm2.5` text encoders measured **2.7-3.1x faster on MLX** than XNNPACK.
MLX suits matmul-heavy graphs. The right backend depends on model class, sothis file is not a statement about MLX in general.123456789101112131415161718192021222324252627282930313233343536373839404142{ "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json", "model": "efficientnet_v2_s", "family": "efficientnet", "capabilities": [ "classification" ], "backend": "mlx", "license": "bsd-3-clause", "variants": [ { "file": "efficientnet_v2_s_mlx_fp16.pte", "precision": "fp16", "quantized": false, "default": true, "methods": { "forward": { "inputs": [ { "shape": [ 1, 3, 384, 384 ], "dtype": "float32" } ], "outputs": [ { "shape": [ 1, 1000 ], "dtype": "float32" } ] } } } ]}123version https://git-lfs.github.com/spec/v1oid sha256:fc41b9a923b89b27f95efc43d59c9651a3fe713619f61dd1d870bdd0713d7fafsize 43509376mlx/NOTES.mdAdded+50
mlx/config.jsonDeleted-42
mlx/efficientnet_v2_s_mlx_fp16.pteDeleted-3