cd /news/machine-learning/i-benchmarked-4-lightweight-transfor… · home topics machine-learning article
[ARTICLE · art-18949] src=dev.to pub= topic=machine-learning verified=true sentiment=· neutral

I Benchmarked 4 Lightweight Transformers for Fault Detection. Here's What Survived.

A developer benchmarked four lightweight transformer models—DistilBERT, MobileBERT, TinyBERT-6L, and TinyBERT-4L—against traditional ML baselines for fault detection, finding that TinyBERT-4L achieved 87.8% F1 with 55 MB size and 18 ms CPU latency, nearly matching XGBoost's 87.9% F1 at 0.5 MB. MobileBERT, designed for mobile deployment, scored 0% F1 on every dataset by predicting only the majority class. The most promising result came from combining models, with all code and results published on GitHub.

read1 min publishedMay 31, 2026

Everyone talks about deploying ML on edge devices. Very few people show what happens when you actually try.

I ran a full benchmark of four lightweight transformer models - DistilBERT, MobileBERT, TinyBERT-6L, and TinyBERT-4L — against traditional ML baselines on three real-world fault detection datasets.

All experiments ran on a T4 GPU with consistent hyperparameters.

Model F1 Size CPU Latency
XGBoost 87.9%
0.5 MB
0.002 ms
TinyBERT-4L 87.8% 55 MB 18 ms
DistilBERT 87.6% 255 MB 138 ms

MobileBERT — specifically designed for mobile deployment — scored 0% F1 on every dataset. It predicted the majority class for every sample across all configurations.

“Designed for mobile” does not mean “works for your use case.”

The most promising result came from combining models:

All code and results:

https://github.com/disha8611/edge-fault-detection-benchmark Previous research on LLM-based anomaly detection:

https://arxiv.org/abs/2604.12218 Disha Patel — Software Engineer & ML Researcher. I write about engineering, on-device ML, and building systems that work in the real world.

── more in #machine-learning 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-benchmarked-4-ligh…] indexed:0 read:1min 2026-05-31 ·