modal-serverless-gpu

Deploy GPU-backed ML workloads as serverless functions using Modal.

Updated May 2, 2026
One-click install
npx skills add https://github.com/qcmuu/AI-Research-Skills --skill modal-serverless-gpu-qcmuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modal-serverless-gpu
Source: https://github.com/qcmuu/AI-Research-Skills/tree/main/09-infrastructure/modal
Command: npx skills add https://github.com/qcmuu/AI-Research-Skills --skill modal-serverless-gpu-qcmuu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Modal Serverless GPU removes the burden of managing servers and GPU infrastructure by letting you run ML training, batch jobs, and inference workloads on demand with reliable scaling.

Core Features & Use Cases

  • Serverless GPU execution: Run GPU-intensive code with on-demand GPUs and pay-per-use behavior.
  • API deployment options: Expose model inference as FastAPI/ASGI endpoints or web endpoints for direct consumption.
  • Production-oriented controls: Configure container images, volumes for caching, scheduling, concurrency, retries, batching, and cold-start mitigation.
  • Use case example: Deploy a text-generation service that scales to zero when idle, loads the model once per container, and serves low-latency requests via a web endpoint.

Quick Start

Install Modal with pip, authenticate using modal setup, and create a function that specifies a GPU (e.g., T4 or A10G) to run your inference code on-demand.

Frequently Asked Questions about modal-serverless-gpu

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

FAQPage Schema
How do I deploy a serverless GPU inference endpoint?

Deploy a serverless GPU inference endpoint by configuring a Modal App with a container Image and GPU settings, then wire your model code to a FastAPI or ASGI web endpoint for direct request consumption.

What is the best way to scale ML batch jobs to zero when idle?

Scaling ML batch jobs to zero when idle is achieved by running them as serverless functions, which provide pay-per-use behavior and automatically scale down infrastructure when no workloads are active.

Do I need to manage infrastructure manually for scheduled GPU jobs?

No, you do not need to manage infrastructure manually for scheduled GPU jobs. Modal removes the burden of managing servers by running scheduled workloads on demand with reliable auto scaling.

How do I avoid cold starts when running GPU ML workloads?

To avoid cold starts when running GPU ML workloads, you can use production-oriented controls like model caching via volumes and configure container concurrency and timeout settings to keep instances warm.

Can I use Modal with FastAPI to serve model inference?

Yes, you can use Modal with FastAPI to serve model inference. You can expose your model inference code as FastAPI or ASGI endpoints for direct consumption via web endpoints.