modal

Deploy and run ML workloads on Modal's serverless GPU cloud platform.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/loteiron/ZeusAgent --skill modal-loteiron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modal
Source: https://github.com/loteiron/ZeusAgent/tree/main/optional-skills/mlops/modal
Command: npx skills add https://github.com/loteiron/ZeusAgent --skill modal-loteiron

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires modal, and includes references (resource) components.

What problem does it solve? Running GPU-intensive ML workloads typically requires provisioning servers, managing infrastructure, and paying for idle compute. This Skill guides you through deploying training jobs, inference APIs, and batch processing on Modal's serverless GPU cloud with pay-per-second pricing and scale-to-zero behavior. ## Core Features & Use Cases - Serverless GPU Execution: Run Python functions on T4, A10G, L40S, A100, H100, and B200 GPUs defined entirely in code, with auto-scaling from zero to hundreds of containers. - Model API Deployment: Expose ML models as FastAPI web endpoints, ASGI/WSGI apps, or streaming services with dynamic batching and zero-downtime updates. - Batch & Scheduled Jobs: Fan out parallel processing with .map(), and run cron-scheduled workloads with persistent Volumes for model caching. - Use Case: Deploy a text-generation model as an auto-scaling REST API: define a @app.cls with @modal.enter() to load the model once per container, attach an A10G GPU, and run modal deploy to get a production HTTPS endpoint. ## Quick Start Ask the agent to write and deploy a Modal app that runs a GPU inference function and exposes it as a web endpoint.

Frequently Asked Questions about modal

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a machine learning model as an API on Modal?▼

Define a Modal App with a function or class, attach a GPU and container image, then add the @modal.fastapi_endpoint or @modal.asgi_app decorator. Run modal deploy script.py to get a persistent HTTPS endpoint with zero-downtime updates.

How to run a Python function on a GPU without managing servers?▼

Install the modal package, authenticate with modal setup, and decorate a function with @app.function(gpu="T4"). Calling .remote() executes it on Modal's cloud, and modal run script.py runs it end to end with pay-per-second billing.

Modal vs RunPod vs SkyPilot for GPU workloads?▼

Modal suits serverless, scale-to-zero jobs and auto-scaling APIs defined in Python. RunPod fits longer-running pods with persistent state, while SkyPilot targets multi-cloud orchestration and cost optimization across providers.

Which GPUs does Modal support and how do I choose one?▼

Modal offers T4, L4, A10G, L40S, A100-40GB, A100-80GB, H100, H200, and B200. L40S is recommended for inference cost-performance, A100-80GB for large model training, and you can specify fallbacks like gpu=["H100", "A100"].

Why is my Modal function slow on the first request?▼

Cold starts happen when no warm container exists. Increase scaledown_window to keep containers alive, set min_containers to keep instances warm, and load models in a @modal.enter() lifecycle hook so initialization runs once per container.

How do I fix CUDA out of memory errors on Modal?▼

Switch to a larger GPU such as A100-80GB, enable gradient checkpointing, and use mixed precision with torch.autocast. You can also verify the allocated GPU at runtime by running nvidia-smi inside the function.