Loading…

Modal
Serverless platform for running compute jobs — AI inference, batch processing, cron, and web endpoints. Pay only for what you use, with custom containers and GPU support.
- 52 posts summarised
- latest
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
From their blog
Latest articles
Sidecars: A low-latency trust boundary for Sandboxes
Modal introduces Sidecars, isolated containers that run alongside a main Sandbox on the same host, establishing a trust boundary between trusted and untrusted code. Sidecars enable communication across trust boundaries at least 3x faster than using separate Sandboxes, reducing latency for operation-heavy agent workloads. The feature addresses the security risk of running an agent’s harness and tool calls together, which creates the “lethal trifecta” of private data, untrusted content, and external communication. Existing solutions either move the harness to a remote service (adding network latency) or rely on egress controls that lack flexibility. Sidecars allow trusted services such as credential injection, proxy traffic, and harness logic to run locally alongside the Sandbox, with independent network policies and dynamic creation via the Modal SDK.
Hitting a billion tokens per minute on one GPU by combining a query planner and an inference engine
Modal and CMU built Quail, a query-aware inference layer for AI-SQL that combines a query planner with an inference engine to process structured LLM transformations of database entries. On a multi-join query, Quail achieves over a billion tokens per minute per H100 GPU, over 10x faster than vLLM, costing under 6 cents per billion tokens on Modal. The gain comes from using the query plan to order requests for better KV cache management, including a revised Hydragen-style cascade attention and batching small requests to reduce host overhead. On a new AI-SQL benchmark, Quail runs 1.84x faster than vLLM, but falls behind on agent trace processing. The authors see this as part of a trend toward custom inference engines for specific workloads, with a reusable core like databases post-DataFusion, and note that much work was done by prompting coding agents.
How to serve trillions of tokens for trillion-parameter coding agents
Serving inference for coding agents requires trillion-parameter sequence models like Moonshot AI’s Kimi K2.6 to process trillions of input and output tokens at extremely high relative and absolute performance. To be economically viable, these services must achieve large fractions of hardware peak performance, using contemporary matrix math accelerators like Tensor Cores at petaFLOP per second scale. Modal optimized by batching multiple sequences together, caching KV state, and patching SGLang with NVFP4 micro-scaling on Blackwell GPUs like the B200. Per-replica performance improved 2.8x per user and 5.6x across users, transforming ruinously expensive into a price-competitive service. One deployment processed hundreds of billions of tokens daily and trillions total, showing that careful engineering and benchmarking are key to scaling inference.
Product updates: Sandbox Sidecars, new models, a refreshed dashboard, and more
Modal added day-zero support for Kimi K3, Qwen 3.8, GLM 5.3, and GLM 5.3 Flash on Auto Endpoints, with custom DFlash speculators boosting throughput to 460 tokens per second. New environment-level budgets give Team and Enterprise workspaces per-environment compute limits, while the pricing multiplier for broad region selection dropped from 1.5x to 1.15x. The dashboard got a refreshed navigation, color system, and beta light mode, and Private Environments now support a default No Access role. Sandbox Sidecars are in public alpha, running additional containers via low-latency internal networking, and VM Sandboxes are in public beta with a real Linux kernel for Docker and eBPF. Sandbox directory snapshots and a new filesystem API are now GA, and regional Proxies allow selecting a region for static outbound IPs, while SDK updates improved log APIs and autoscaler reporting.
One compute platform for end-to-end training at Markov Robotics
Markov Robotics uses Modal as a unified compute platform for end-to-end training of world models targeting zero-shot general-purpose dexterity. The company processes hundreds of terabytes of video by writing each step as a Modal Function and fanning it out with .spawn_map, scaling to thousands of containers and up to 500 GPUs simultaneously. This parallelization reduces preprocessing from a full day to twenty to thirty minutes. The team runs between two and ten training runs concurrently, using Modal Volumes for fast data access and reproducible experiments that eliminate manual Docker image management, saving thirty to sixty minutes per experiment. For remote inference, Markov uses Modal Tunnels to open a direct path between the robot and a GPU, achieving a round-trip network overhead of approximately twenty milliseconds.
Modal is expanding in Europe with our new London office
Modal is expanding in Europe with a new London office, its second in the region, representing a larger investment in the area. The company already has nearly 20 engineers in Stockholm who built core parts of Modal, including its custom file system and Sandboxes product. Hugh Killingbeck-Jones joins as VP EMEA to lead go-to-market teams in London, which the company considers the AI capital of Europe. European AI-native companies like Black Forest Labs and Legora, as well as global platforms like DoorDash, run on Modal for tasks such as model evaluation and agent testing. The company is hiring across sales, engineering, and other roles in London and Stockholm, and plans meetups across EMEA.
How Botika runs full-stack generative AI on Modal
Botika builds agentic e-commerce teams that automate visual production for global fashion brands, using proprietary foundation models and a 100-terabyte image dataset. The company runs its entire full-stack AI operation on Modal, with the data pipeline processing 100 terabytes at less than 1% error rate across thousands of containers. Before Modal, the team struggled with Kubernetes fleet management and slow GCP Batch jobs; now a single researcher can launch 50 experiments daily using Claude, and they set up reinforcement learning infrastructure in less than a day. Modal handles autoscaling, cold starts, and multi-node training with RDMA, allowing Botika to double traffic in seconds, and they serve about 15 models on L4s, L40S, A100s, and H100s. The infrastructure is not Modal-specific, enabling the team to run open-source and custom frameworks without modification.
Bringing serverless functions closer to the speed of wire
Modal’s legacy I/O plane routed all function inputs and outputs through us-east servers, adding up to ~200ms of network latency for calls from other regions. The new geographically distributed I/O plane, available in four or more regions, reduces end-to-end function call latencies by roughly 80ms at p50. The redesign involved moving non-critical work to background async processing, minimizing shared storage interactions on the hot path, and rewriting the server layer in Go for better concurrency. The team evaluated Valkey but chose Redis 7.1 because engine CPU usage spiked aggressively on Redis 7.2 onwards during input queue load testing. Users can further optimize by selecting the nearest routing_region, keeping input and output payloads under 2MiB to avoid blob storage uploads, and batching small inputs to reduce network hops.
Kimi K3 by Moonshot now available on Modal
Moonshot released Kimi K3, a 2.8 trillion parameter multimodal mixture-of-experts transformer with a 1 million token context window and native vision, now on Modal. Modal runs the model at 460 tokens per second on release day through a partnership with Moonshot and vLLM, with token-based pricing on a Shared API or dedicated Auto Endpoint. K3 activates 16 of 896 experts per token and uses Kimi Delta Attention along with Attention Residuals to achieve roughly 2.5 times the scaling efficiency of its predecessor K2. Moonshot employed quantization-aware training from the SFT stage with MXFP4 weights and MXFP8 activations, and contributed a new prefix caching implementation to vLLM to address challenges from KDA. Modal deployed a custom DFlash speculative decoding drafter tuned to K3’s architecture, yielding 360 percent faster interactivity and 88 percent higher throughput on agentic workloads.
Devin Outposts on Modal
Devin, an AI software engineer by Cognition, plans, writes, tests, and ships code semi-autonomously. Cognition now extends Devin with Outposts, moving execution into user-controlled environments while reasoning stays in Cognition’s cloud. Modal is a launch partner with modal-devin, an open-source integration running Outpost sessions in Modal Sandboxes with pre-built custom images, fast cold-starts, snapshotting, and cost-efficient bursting. For example, a task that requires a GPU fails immediately in the default sandbox but succeeds on a Modal-backed Outpost that spins up a GPU on demand and scales to zero when done. One command, uvx modal-devin init, sets up secure infrastructure with a scheduler and worker functions, and each team can have its own outpost with separate credentials.
Scaling to 1 million concurrent sandboxes in seconds
Modal rebuilt its sandbox platform to support millions of concurrent sandboxes and tens of thousands of creations per second, removing all central bottlenecks from the control plane. The new architecture eliminates central coordination and durable datastores from the critical path, using horizontally scaled scheduling servers that run a fast load-balancing algorithm against in-memory cached worker state from Redis streams. Workers are contacted directly via RPC to create sandboxes, and sandbox metadata is written asynchronously, avoiding O(sandboxes) and O(nodes) operations that limited previous systems. In a benchmark, Modal created 1 million sandboxes in under a minute with median time-to-interactivity under half a second, though the long tail is attributed to kernel and network contention like the rtnl lock. The system is designed to scale without practical limits, supporting use cases like reinforcement learning and background agents that require massive concurrent sandbox creation.
Inkling by Thinking Machines now available on Modal
Thinking Machines released Inkling, a general-purpose multimodal model that accepts text, image and audio inputs and generates text outputs. The 975B-parameter mixture-of-experts transformer activates 41B parameters per token, uses a 1M-token context window, and employs local attention: five sliding window layers for every global layer. Modal provided day-zero support with a custom DFlash block-diffusion speculator, achieving 250 tokens per second per user on 8x B200s with 67% faster interactivity than the model’s built-in multi-token prediction path. The DFlash drafter uses all local attention and causal layers, keeping cost flat as block size grows. Inkling is available today as an OpenAI-compatible shared endpoint through Modal Auto Endpoints with token-based pricing, allowing users to try the model interactively.
Modal is a computer
Modal is a platform that runs programs of arithmetic and logic operations on information, making it a computer. It operates on hardware from dozens of cloud providers, building a virtualization layer that aggregates, isolates, and multiplexes demand for increased resource efficiency. Programs run in containers that receive inputs from the container runtime, similar to how a typical computer’s ALU fetches inputs from memory. Information in Modal lives in a tiered storage hierarchy, from container memory to object storage, with caches like page cache and ephemeral disk. Input and output pass through the Modal Input/Output Plane for functions and sandboxes, or the Routing Plane for HTTP servers, with direct Tunnels for extreme performance needs.
How to price serverless GPUs
Modal’s engineering blog presents a cost model comparing serverless and reserved GPU pricing for AI workloads, centered on the peak-to-average demand ratio. Serverless GPUs charge only for usage, while reserved GPUs require long-term contracts for fixed capacity, often achieving under 30% utilization. The model shows that when the peak-to-average ratio exceeds the reservation discount rate (typically 2-5x), serverless GPUs become cheaper despite higher base rates, with real workloads like inference and training having ratios of 5-10x, making serverless an obvious cost win. An interactive tool allows teams to estimate costs using preset workloads or custom traffic patterns, defaulting to current B200 GPU rates on Modal and hyperscaler reservations. The post discusses model limitations, including assumptions of perfect prediction and instant allocation, and notes that serverless also reduces engineering costs through faster development and reduced dev/prod skew, while mixed strategies can combine baseline reservations with serverless bursting for high peak-to-average bursts.
Multi-token Residual Prediction
Multi-Token Residual Prediction (MRP) adapts multi-token prediction for diffusion language models by training a small module to predict the residual between adjacent denoising steps rather than the full next-step distribution. This residual target is easier to learn, allowing a tiny 3-layer transformer to accurately predict corrections across multiple steps. In the static regime, MRP enables lossless speculative decoding with up to 1.56× throughput in SGLang, or direct decoding with a small quality cost. In the dynamic regime, MRP recovers up to +16 accuracy points lost by aggressive low-threshold decoding through a remasking mechanism. The module is trained on a frozen backbone and composes cleanly with existing inference methods.
Anthropic integration with Modal brings scalable compute to Claude Science
Anthropic launched Claude Science, an AI workbench where life sciences researchers run computational workloads from conversation with Claude. The workbench addresses the fragmented toolchain of local machines, HPC clusters, and cloud VMs by centralizing execution in one place. Modal integrates with Claude Science as the compute backend, routing GPU and CPU-heavy workloads to Modal sandboxes automatically and fanning out parallel tasks like virtual screening across hundreds of containers to reduce hours to minutes. Researchers can prompt for tasks such as predicting GFP structure, and Claude writes the folding code, runs it on a Modal GPU, and returns the structure with confidence scores inside the conversation, with Modal handling scheduling, shared storage, and reproducible environments. Modal is committing up to $100,000 in compute for the Claude Science Cohort, with 500– 2,000 allocations per project.
Modal's serverless Servers
Modal introduces Servers, a low-latency HTTP serving solution designed for applications like LLM inference where milliseconds matter. Servers reduce p50 latency from 39ms to 6ms compared to Modal Web Functions by removing control-plane lookups and queuing from the hot path. The architecture uses a stateless proxy (fprs) for domain association and load balancing, with Envoy for TLS termination and HTTP/2 multiplexing. Two design principles governed development: maximizing resource sharing while minimizing interference, and making no network calls on the request path. The system supports autoscaling, regionalized routing, proxy authentication, and mirroring for A/B testing and continual learning.
Achieve state-of-the-art inference latencies with speculative decoding
Modal launched Auto Endpoints, combining speculative decoding with Blackwell GPUs, SGLang engine, and Modal Servers to achieve low inference latency for production deployments. The decode phase, where each token requires a full forward pass loading model weights, is the primary latency source, making speculative decoding the most impactful optimization. Speculative decoding runs a separate DFlash speculator model in parallel with the target model using KV projections and a custom Triton kernel, achieving near-linear speedup proportional to acceptance length. In the Decagon voice case study, Modal cut 100ms from a 290ms baseline by mid-training a custom speculator on synthetic data, beating proprietary providers by 60ms. Modal plans to automate speculator training with continuous improvement on production data, moving toward autospec for Auto Endpoints.
Introducing Modal Auto Endpoints: Optimized inference you actually own
Modal Auto Endpoints is a self-serve service for production-grade LLM inference that gives teams ownership of the entire serving stack, not just an API. Unlike proprietary providers, it exposes the inference code, engine flags, and GPU selection, and provides detailed metrics like speculative decoding acceptance length and per-replica token latency quantiles in a dashboard. Built on Modal’s infrastructure, it uses autoscaling to handle traffic spikes by spinning up additional replicas automatically, global GPU capacity without capacity management, and Modal Servers for ultra-low-latency routing with only 5ms overhead. For each supported model, it offers a pre-configured deployment using speculative decoding with the DFlash block-diffusion drafter from Z Lab, and teams can benchmark latency and throughput tradeoffs with a click after deployment. The platform is designed with a declarative interface based on workloads and SLOs, with future automation levels including autoinference, autospec, autodistill, and autoresearch for continuous improvement of inference performance.
Unpacking sandbox startup latency: why started ≠ ready
Sandbox startup benchmarks measure container boot time, but in production application-level initialization after boot dominates, making container boot the smallest variable. Modal defines a lifecycle with events Created, Scheduled, Started, and Ready, where Ready indicates completion of tasks like git pulls or dependency installs. The gap between Started and Ready can be multiple seconds, directly affecting user-perceived latency for coding agents needing cloned repos and running services. To reduce perceived latency, Modal recommends warm pools that pre-initialize sandboxes using a Queue, combined with Directory Snapshots for per-project customization without rebuilding the environment. Readiness Probes, now generally available, allow defining a shell command that exits 0 or a TCP port that accepts connections, with wait_until_ready() blocking until the sandbox is truly ready, simplifying warm pool producer code and providing dashboard events for observability.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.