---
title: "How Doppel eliminated ML infrastructure tax with Modal"
description: "Doppel, which builds ML models to detect social engineering attacks, moved much of its training and inference from sequential experiments and GCP Cloud Run to Modal."
url: "https://swe.quest/articles/how-doppel-eliminated-ml-infrastructure-tax-with-modal-6cfb61f19c711d02"
canonical: "https://modal.com/blog/how-doppel-eliminated-ml-infrastructure-tax-with-modal"
source: "Modal"
published: "2026-03-25"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["ml-platform","serverless","inference","model-training","threat-detection"]
---

# How Doppel eliminated ML infrastructure tax with Modal

A post on [Modal](https://swe.quest/sources/modal.md), published 2026-03-25, 5 min read, Case study. Original: [https://modal.com/blog/how-doppel-eliminated-ml-infrastructure-tax-with-modal](https://modal.com/blog/how-doppel-eliminated-ml-infrastructure-tax-with-modal)

## Summary

Doppel, which builds ML models to detect social engineering attacks, moved much of its training and inference from sequential experiments and GCP Cloud Run to Modal. On the training side, independent work such as K-fold cross-validation now runs in parallel via Modal's map(), and coding agents drive the experiment loop through Modal's CLI. For inference, image layer caching and persistent volumes for model weights cut builds from 10–30 minutes by up to 10x, with sub-minute warm builds. Autoscaling absorbs attack-campaign spikes without Cloud Run's one-GPU-per-instance limit, and direct remote calls replace the hand-built Flask HTTP layer around each model.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Threat detection](https://swe.quest/tags/threat-detection.md) (Security)

## Prerequisites

- Python ML workflows ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- Docker containers ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))
- model serving basics ([easy posts on Inference & serving](https://swe.quest/tags/inference.md?difficulty=easy))

## Keywords

Modal, Doppel, Google Cloud Run, Flask, GCP

## Related posts

- [Augment Your LiveKit Agent with Modal GPUs](https://swe.quest/articles/augment-your-livekit-agent-with-modal-gpus-7c537d7efe5221b2.md): Modal · 2026-10-15 · Medium · 2 min read · Serverless, Real-time systems, Inference & serving, Speech & audio, Video & media
  LiveKit agents can offload custom or open-weights models to Modal serverless GPUs, demonstrated with a BitHuman Expression video avatar voiced by Qwen3-TTS.
- [Autoscaling Autoresearch: Give your agents elastic GPUs on Modal](https://swe.quest/articles/autoscaling-autoresearch-give-your-agents-elastic-gpus-on-modal-149826d2e84207c1.md): Modal · 2026-04-14 · Medium · 8 min read · AI agents, ML platforms, Serverless, Model training, Capacity planning
  A Claude Code agent equipped with Modal Skills ran OpenAI's Parameter Golf challenge overnight, executing 113 experiments over 238 GPU-hours and dropping bits-per-byte from 1.42 to 1.12.
- [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.
- [How we achieved truly serverless GPUs](https://swe.quest/articles/how-we-achieved-truly-serverless-gpus-d82b0620ff18c95f.md): Modal · 2026-05-12 · Medium · 23 min read · Serverless, Inference & serving, Containers, Storage systems, Capacity planning
  Modal cuts GPU inference replica cold starts from roughly 2,000 seconds to about 50 seconds, a 40x speedup, by attacking each stage of spin-up.
- [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)
