Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Modal 5 min read Case study mediumAdept

How Doppel eliminated ML infrastructure tax with Modal

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.

Related posts

  • Augment Your LiveKit Agent with Modal GPUs

    Modal mediumAdept

    LiveKit agents can offload custom or open-weights models to Modal serverless GPUs, demonstrated with a BitHuman Expression video avatar voiced by Qwen3-TTS. The BitHuman container's /launch endpoint returns as soon as the avatar joins the room, which conflicts with Modal Servers scaling on in-flight requests. Modal's Sticky Sessions solve this by letting the agent open a session before calling /launch and close it when the call ends, holding the container slot for the session's duration. GPU snapshots hide cold starts that would otherwise require reloading gigabytes of model weights.

  • Autoscaling Autoresearch: Give your agents elastic GPUs on Modal

    Modal mediumAdept

    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. The agent changed its compute footprint as the work required. It used single-GPU Sandboxes for smoke tests, about 40 parallel single-H100 runs for a hyperparameter sweep, and five concurrent 8×H100 jobs for validation. It dropped back to one or two runs while debugging a CPU-bound GPTQ quantization step, which it eventually fixed by moving quantization to GPU. Compared with an 8-GPU workstation and a 40-GPU always-on cluster, elastic provisioning finished the core runs about 5x faster than the workstation and avoided paying for idle capacity during exploration and debugging.

  • Why we’re switching to Hugging Face Inference Endpoints, and maybe you should too

    Hugging Face mediumAdept

    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. In ab benchmarks with a RoBERTa text classifier, a 4-vCPU endpoint answered in 80±30 ms versus ~200 ms on their ECS container, and an 8-vCPU endpoint in 43 ms. Cost runs 24–50% higher than Fargate (about $60/month more for a large instance), which they judge worth it without a dedicated MLOps team, though not at hundreds of services. The main gap they note is the lack of a Terraform provider; they deploy with their own hugie CLI.

  • How we achieved truly serverless GPUs

    Modal mediumAdept

    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. A solver-managed buffer of idle, health-checked GPUs, allocated with Google's GLOP linear program, takes instance provisioning out of the hot path. ImageFS, a libfuse filesystem, serves container images lazily from a tiered content-addressed cache, and CPU and CUDA checkpoint/restore skip host- and device-side initialization. The motivation is GPU Allocation Utilization: spiky inference demand leaves fixed allocations at 10-20% use, and fast autoscaling raises utilization and quality of service together.

  • Shopify's Playbook for Scaling Machine Learning

    Shopify Engineering easyNovice

    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. Teams should pick a problem users care about, confirm the data is trustworthy and accessible, account for downstream dependencies such as fulfillment, and optimize for product outcomes rather than raw model scores. Shopify shipped a simple logistic regression model, built in Python, serialized to PMML, scheduled with Airflow and served in real time from Rails. To scale to hundreds of models, Shopify relies on input/output reconciliation, shadow backtesting, drift monitoring, platform-enforced best practices and automated model operations.

The quest for software engineering knowledge.

Look:
Layout: