Choose an Ultralytics YOLO Model Size
Compare YOLO26 n, s, m, l, and x, benchmark them on your target hardware, and pick the smallest size that fits your latency budget.
Pick too large and a 30 FPS camera app runs at 12 FPS; pick too small and you give away accuracy a bigger model would deliver for free on a GPU. Since the size you train is the size you ship, this choice comes before the long training run.
YOLO26 ships in five sizes — n, s, m, l, and x — for all seven tasks: detect, segment, semantic segmentation, classify, pose, OBB, and depth. In this lesson you'll turn a frame rate into a millisecond budget, measure two sizes on your own machine with Benchmark mode, and choose.
Hands-on
Know the Lineup#

These are the official COCO detection numbers from the YOLO26 docs, all at 640 pixels:
| Model | Params (M) | FLOPs (B) | mAP50-95 | CPU ONNX (ms) | T4 TensorRT10 (ms) |
|---|---|---|---|---|---|
yolo26n | 2.4 | 5.5 | 40.9 | 38.9 | 1.7 |
yolo26s | 9.5 | 20.9 | 48.6 | 87.2 | 2.5 |
yolo26m | 20.4 | 68.4 | 53.1 | 220.0 | 4.7 |
yolo26l | 24.8 | 86.8 | 55.0 | 286.2 | 6.2 |
yolo26x | 55.7 | 194.4 | 57.5 | 525.8 | 11.8 |
Every size exists for every task — swap the suffix, as in yolo26s-seg.pt, yolo26s-sem.pt, yolo26s-depth.pt, yolo26s-cls.pt, yolo26s-pose.pt, or yolo26s-obb.pt. Migrating an older project? The YOLO11 vs YOLO26 comparison shows what changes.
Read the table as "what does the next size cost?":
| Step | mAP gained | Extra FLOPs | CPU latency multiplier |
|---|---|---|---|
| n → s | +7.7 | ×3.8 | ×2.2 |
| s → m | +4.5 | ×3.3 | ×2.5 |
| m → l | +1.9 | ×1.3 | ×1.3 |
| l → x | +2.5 | ×2.2 | ×1.8 |
The first step is the best deal; after m, each point of COCO accuracy gets expensive. And COCO, with 80 varied classes, is harder than most real projects: on a narrow task, such as one product on a conveyor, n and s often land within a point of m.
Start From the Budget#
Your inference latency budget is 1000 ms ÷ target FPS, and the model must share it with decoding, drawing, and your own logic. Typical starting points:
| Target | Start with |
|---|---|
| Phone, Raspberry Pi, browser, or other small edge AI device | n |
| Laptop or desktop CPU, 10–30 FPS | n, then s if there's headroom |
| Single GPU, real-time video | s or m |
| Offline batch processing, accuracy first | l or x |
Worked Example: Measure Two Sizes#
Benchmark mode exports the model, validates it on coco8, and times inference on your machine. format=onnx limits the run to one format so it finishes in seconds; leave it out to compare every export format.
yolo benchmark model=yolo26n.pt imgsz=640 format=onnx
yolo benchmark model=yolo26s.pt imgsz=640 format=onnxReal results on an Apple M5 Pro laptop CPU:
| Format Status❔ Size (MB) metrics/mAP50-95(B) Inference time (ms/im) FPS |
| 1 ONNX ✅ 9.5 0.6693 13.87 72.08 | <- yolo26n
| 1 ONNX ✅ 36.5 0.6654 30.87 32.39 | <- yolo26sReading it against a 30 FPS (33 ms) budget:
yolo26n, 13.87 ms: fits with 19 ms to spare for decoding and drawing.yolo26s, 30.87 ms: technically fits, with no room for anything else. The same benchmark took 60 ms while other jobs were running on the machine.Size (MB): the ONNX file size, which matters for app downloads and mobile memory.metrics/mAP50-95(B): ignore it here.coco8has four validation images: enough to prove the export works, far too few to rank accuracy.
Decision: train yolo26n first, and keep yolo26s at a lower imgsz as the fallback.
Avoid These Mistakes#
Symptom: a model that ran at 70 FPS on your laptop runs at 8 FPS on the edge device. Fix: benchmark on the device that will run the model, under realistic load — other processes, camera decoding, the actual runtime format.
Symptom: "s was faster than n" in your notes. Cause: one run used imgsz=480 or a different format. Fix: compare sizes at the same imgsz, format, and batch, and change one variable at a time.
Don't train x and plan to shrink it to n later with model pruning or quantization: a smaller architecture means training again. Pick the size first; treat quantization as an extra speedup on top of the right size, not a substitute for it.
Deeper latency work — batching, quantization, and runtime choice — belongs to Cost and Latency Tuning in the Production course, and the performance metrics guide explains each accuracy number.
Show solution
Budget: 30 FPS on a laptop CPU -> 33 ms per frame, shared with decode and drawing
Measured: ONNX at 640 -> yolo26n 13.9 ms (19 ms headroom), yolo26s 30.9 ms (none; 60 ms under load)
Decision: train yolo26n first. If accuracy on our val set falls short,
try yolo26s at imgsz=480 and re-benchmark before committing.