# MobileOne: a reparameterizable backbone for on-device image classification

> The official implementation of the MobileOne paper, with ImageNet checkpoints and CoreML exports for five model sizes. The whole Python side is one file, and the pinned dependencies date from 2020.

**apple-aiml-research/ml-mobileone** — This repository contains the official implementation of the research paper, "An Improved One millisecond Mobile Backbone" CVPR 2023.

- Repository: https://github.com/apple-aiml-research/ml-mobileone
- Stars: 834 · Forks: 65
- Language: Swift
- License: NOASSERTION
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/apple-aiml-research-ml-mobileone

## One Python file holds the model definition

The repository is unusually small for a research project, and the top level listing shows why. There is a single mobileone.py, a requirements.txt, a README, a LICENSE, an ACKNOWLEDGEMENTS file, a docs directory and a ModelBench directory for the iOS application. The model code is therefore not a package with dozens of modules but one file you can read end to end, which matters if you intend to understand what reparameterization does or adapt the block to your own architecture. The project accompanies the paper An Improved One millisecond Mobile Backbone, and the README links the arXiv version. The stated headline result is a Top-1 accuracy of 75.9 percent under one millisecond, with the latency measured on an iPhone 12 Pro.

## Reparameterization is the mechanism, and it changes what you download

MobileOne's distinguishing idea is that the multi-branch training structure collapses into a single branch at inference time. The library exposes this as reparameterize_model, and the practical consequence is that there are two kinds of checkpoint. The model zoo in the README links, for every variant, both a fused checkpoint and an unfused one. Training and fine-tuning use the unfused weights, and the fused checkpoint is the one to use when you only want to evaluate, because its branches are already reparameterized. The API reflects that split:

```python
import torch
from mobileone import mobileone, reparameterize_model

# To Train from scratch/fine-tuning
model = mobileone(variant='s0')
```

For inference you switch the model to evaluation mode and reparameterize it, then use the resulting object at test time:

```python
model.eval()
model_eval = reparameterize_model(model)
```

A separate path exists for pure evaluation, where the reparameterized weights are already in the file you load:

```python
model = mobileone(variant='s0', inference_mode=True)
checkpoint = torch.load('/path/to/checkpoint.pth.tar')
model.load_state_dict(checkpoint)
```

Mixing up fused and unfused checkpoints is the easiest mistake to make here, and the state dict loader will not warn you that you did.

## Five ImageNet variants with matching CoreML artefacts

The model zoo lists five sizes on ImageNet-1K, each with an accuracy figure, a latency figure and links to a PyTorch checkpoint and a CoreML model. MobileOne-S0 reaches 71.4 percent top-1 at 0.79 milliseconds, S1 reaches 75.9 percent at 0.89, S2 reaches 77.4 percent at 1.18, S3 reaches 78.1 percent at 1.53 and S4 reaches 79.4 percent at 1.86, with all latencies measured on an iPhone 12 Pro. Each row also offers an unfused checkpoint for people who intend to continue training rather than deploy. The CoreML mlmodel files are the part that makes this usable on a phone without shipping PyTorch to the device, and they are published for every variant rather than only for the smallest one. The repository also includes an accuracy against latency chart in the docs directory, so you can see the trade-off curve the project is claiming.

## Pinned PyTorch versions are the first thing you will hit

The requirements file is three lines and pins an environment from 2020:

```text
torch==1.7.1+cu110
torchvision==0.8.2+cu110
torchaudio==0.7.2
```

Those are the CUDA 11.0 builds of PyTorch, and they are old enough that installing them on a current machine can fail outright, since the wheel index for that combination is no longer the default one. The good news is that the model code itself has no exotic dependencies, so a port to a newer torch release is a small job if the API you need has not moved. The bad news is that the repository has no GitHub releases and no visible compatibility matrix, so there is no tested statement about newer versions. The repository is not archived and the last push was on 2026-09-11, so the code is still being touched.

## ModelBench measures the CoreML models on a real device

Alongside the Python code there is an iOS benchmark application written in Swift, which is why the repository's primary language is listed as Swift rather than Python. Its purpose is narrow: it benchmarks the MobileOne CoreML models on hardware, and the README points to ModelBench/README.md for the details of building and running it. This is the difference between measuring latency in a research harness and measuring it in the environment where the model will live, since the README's latency column is already tied to a specific phone, the iPhone 12 Pro. If you are choosing between the PyTorch checkpoint and the CoreML model for a product, this app is the tool the project provides for checking the difference on your own devices.

## A custom licence and a citation request

Licence handling is the part to read carefully before building anything commercial on top of this. The repository is listed with a custom licence that GitHub cannot classify, and the root contains a LICENSE file rather than a standard open source licence file, so the terms have to be read there instead of assumed from the badge. Separately, the README asks that the paper be cited if the code or models help your work, and gives a BibTeX entry for the arXiv preprint. The project also ships an ACKNOWLEDGEMENTS file, and the ModelBench app and the published checkpoints come out of a collaboration between Apple's machine learning research group and the paper's authors, which is visible in the repository layout.

## Conclusion

MobileOne suits an engineer building an on-device image classifier who wants a reparameterizable training-time graph and a deployable CoreML artefact for the same weights, and who is prepared to work around an old PyTorch pin. It does not suit a team that needs a maintained training stack or a broad set of detection and segmentation heads, since this repository ships classification backbones and checkpoints only. Before building, check that torch 1.7.1 with CUDA 11.0 is installable in your environment, since the requirements file pins that exact pair.

## FAQ

### What accuracy and latency does MobileOne-S1 reach?

The README's model zoo lists MobileOne-S1 at 75.9 percent top-1 accuracy on ImageNet-1K with a latency of 0.89, measured on an iPhone 12 Pro.

### How do I reparameterize a MobileOne model for inference?

Call model.eval() and pass the model to reparameterize_model, then use the returned object at test time. The README also offers mobileone(variant='s0', inference_mode=True) when you have a fused checkpoint and only want to evaluate.

### Which PyTorch version does the MobileOne repository require?

The requirements file pins torch==1.7.1+cu110 with torchvision==0.8.2+cu110 and torchaudio==0.7.2, which are CUDA 11.0 builds.

### Are CoreML versions of the MobileOne models available?

Yes. The model zoo lists a CoreML mlmodel download for every variant from MobileOne-S0 to MobileOne-S4, and the repository includes a ModelBench iOS app for benchmarking those CoreML models.

### How do I fine-tune a MobileOne model?

Build the model with mobileone(variant='s0'), load an unfused checkpoint with torch.load and model.load_state_dict, and train from there. The fused checkpoint is intended for evaluation only.

## Sources

- [apple-aiml-research/ml-mobileone on GitHub](https://github.com/apple-aiml-research/ml-mobileone)
- [Issues](https://github.com/apple-aiml-research/ml-mobileone/issues)
- [README](https://github.com/apple-aiml-research/ml-mobileone/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/apple-aiml-research-ml-mobileone
