---
title: "Rocket Money x Hugging Face: Scaling Volatile ML Models in Production​"
description: "Rocket Money replaced a regex-and-decision-table merchant detector with a BERT-family transformer classifier spanning 4000+ classes, served through Hugging Face's hosted Inference API rather than an in-house MLOps stack."
url: "https://swe.quest/articles/rocket-money-x-hugging-face-scaling-volatile-ml-models-in-production-acc7e904259d3114"
canonical: "https://huggingface.co/blog/rocketmoney-case-study"
source: "Hugging Face"
published: "2023-09-19"
difficulty: "easy"
kind: "Case study"
reading_minutes: 8
tags: ["inference","ml-platform","machine-learning","caching","payments"]
---

# Rocket Money x Hugging Face: Scaling Volatile ML Models in Production​

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-09-19, 8 min read, Case study. Original: [https://huggingface.co/blog/rocketmoney-case-study](https://huggingface.co/blog/rocketmoney-case-study)

## Summary

Rocket Money replaced a regex-and-decision-table merchant detector with a BERT-family transformer classifier spanning 4000+ classes, served through Hugging Face's hosted Inference API rather than an in-house MLOps stack. They picked it over AWS SageMaker and a hand-rolled host after a three-month evaluation with gradual traffic ramps and worst-case load tests. An A/B split of new users showed better paid retention, and the rollout reached 100% over two months. A pre-inference cache cut costs, hitting about 85% hit rate in production against a theoretical 93%, as volume grew past a billion transactions per month. The team hit an outage when expanding classes and a stale-model caching bug on the vendor side, and so far has found LLMs slower and costlier than specialized classifiers.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Payments & fintech](https://swe.quest/tags/payments.md) (Domains)

## Prerequisites

- text classification basics
- model serving concepts ([easy posts on Inference & serving](https://swe.quest/tags/inference.md?difficulty=easy))

## Keywords

Hugging Face Inference API, BERT, Rocket Money, AWS SageMaker, Vertex Pipelines, Retool

## Related posts

- [Why we’re switching to Hugging Face Inference Endpoints, and maybe you should too](https://swe.quest/articles/why-we-re-switching-to-hugging-face-inference-endpoints-and-maybe-you-should-too-bfdcddeceab350fa.md): Hugging Face · 2023-02-15 · Medium · 6 min read · Inference & serving, ML platforms, Cost optimization, Cloud platforms
  A team moved CPU-based transformer inference off a self-built FastAPI + Docker + AWS ECS/Fargate stack onto Hugging Face Inference Endpoints, collapsing deployment to train, push to Hub, deploy.
- [1 Billion Classifications](https://swe.quest/articles/1-billion-classifications-90168b62de6ffa1b.md): Hugging Face · 2025-02-13 · Medium · 17 min read · Inference & serving, Cost optimization, Performance engineering, Machine learning
  Processing 1B classifications or embeddings on a single-GPU baseline costs about $254 for DistilBERT sentiment classification and $409 for ModernBERT-based gte embeddings on an NVIDIA L4 ($0.8/hr), but roughly $44,500 for ColQwen2 vision embeddings.
- [Deploy Hugging Face models easily with Amazon SageMaker](https://swe.quest/articles/deploy-hugging-face-models-easily-with-amazon-sagemaker-e09e9e34ef94ffa8.md): Hugging Face · 2021-07-08 · Medium · 9 min read · Inference & serving, Cloud platforms, ML platforms, Python
  Hugging Face Inference Deep Learning Containers and the SageMaker Hugging Face Inference Toolkit let Transformers models be deployed as SageMaker endpoints with a few lines of Python, using transformers pipelines for zero-code pre- and post-processing.
- [My Journey to a serverless transformers pipeline on Google Cloud](https://swe.quest/articles/my-journey-to-a-serverless-transformers-pipeline-on-google-cloud-202ccbc112026927.md): Hugging Face · 2021-03-18 · Medium · 8 min read · Serverless, Inference & serving, Cloud platforms, Python, Containers
  A Hugging Face transformers sentiment-analysis pipeline (DistilBERT fine-tuned on SST-2) was deployed as a low-traffic microservice on Google Cloud Run after AI Platform Prediction (beta instability, checkpoint not a pure TensorFlow model) and App Engine (TensorFlow install failure, PyTorch handling only 2 requests per instance) fell short.
- [Shopify's Playbook for Scaling Machine Learning](https://swe.quest/articles/shopify-s-playbook-for-scaling-machine-learning-01ef31091481dd96.md): Shopify Engineering · 2022-02-11 · Easy · 12 min read · ML platforms, Machine learning, Threat detection, E-commerce
  Shopify's approach to scaling machine learning grew out of its first ML product, an order fraud detector that replaced a rule-based system with a high false-positive rate.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
