Eliminate unnecessary inference
Inference compute budgets are bursting, and ML systems still make errors, costing business value.
Organizations must use a lot of compute (CPUs and GPUs) to run at-scale classification in order to meet strict latency requirements.
The number of GPUs needed to serve one model can be estimated as (requests per second) x (seconds per inference) / (utilization = 0.7).
For a system with 1 million requests per second, and one model classifying every request in 1ms per inference, 1400 GPUs are required.
The number of GPUs required scales with the number of models that run in parallel for each request.
Only run the model on the inputs (logs, transactions, events) that need it.
Many inputs can be classified correctly long before the final layer of a model.
moco adds early-exit paths to existing classifiers so easy inputs skip the remaining layers or avoid model execution all together.
Assuming utilization of 0.7, required GPU count = 55k.
Computationally-efficient models in high-throughput settings slashes GPU costs
moco exposes a variety of API endpoints that ML performance engineers can use to optimize ML models.
These endpoints return routed systems that output the same predictions as the original model.
Teams can "plug-and-play" these routed systems into their pipelines.
A preview of the API docs is here.
moco is a post-training optimization tool that improves classification efficiency. Given a calibration dataset and a chosen representation of the data, moco identifies low-complexity rules that simplify the decision problem itself by decomposing the decision into easier-to-solve subproblems.
Can be applied in combination with quantization/pruned models. Quantization & pruning alike risk accuracy degradation.
Knowledge Distillation occurs at training time, and requires significant development cost to optimize the model for deployment, meeting both latency & accuracy targets.
Cascaded systems are great! Why evaluate a complex ML model if a simple rule will suffice? moco scales this idea and automatically generates these rules, and builds a routed system automatically.
| Task | Dataset | Base Model | Fine Tuned Model | Compute Reduction | Accuracy Change |
|---|---|---|---|---|---|
| Image Classification | CIFAR-10 | ResNet-18 | HF Model finetuned on CIFAR-10 | 34.6% | -0.3% |
| Text Classification | IMDB Reviews | BERT | Fine-Tuned TinyBERT | 21.5% | +0.1% |
Transaction risk monitoring systems make real-time decisions (100ms) to avoid business losses because of fraudulent activity, but suffer from immense operational costs due to false positives.
High-volume threat detection systems (phishing, malware, intrusion detection) must scan massive streams of events. There is a cost tradeoff between analyzing data at scale and accuracy.
Perception systems must process a large volume of continously generated sensor data under strict real-time constraints. Critical decisions rely on perception systems which constantly scan their environment for pedestrians, stoplights and obstacles.
Classifiers are commonplace in chatbots to run customer sentiment analysis, intent classification for proper routing, topic tagging, and guardrails that protect the system from out-of-bounds user queries.
Evaluation Steps