modal-serverless-gpu

Deploy serverless GPU ML workloads with Python-defined apps, functions, and endpoints.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/MarbleSodas/Mavis --skill modal-serverless-gpu-marblesodas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modal-serverless-gpu
Source: https://github.com/MarbleSodas/Mavis/tree/main/optional-skills/mlops/modal
Command: npx skills add https://github.com/MarbleSodas/Mavis --skill modal-serverless-gpu-marblesodas

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you run GPU-accelerated machine learning workloads by providing a serverless, auto-scaling platform so you can avoid provisioning and maintaining GPU infrastructure.

Core Features & Use Cases

  • Serverless GPU compute: Run on-demand GPU functions with automatic scaling and scale-to-zero behavior for cost control.
  • Python-native infrastructure: Define apps, functions, images, volumes, and endpoints directly in Python rather than YAML.
  • Production-ready serving patterns: Expose inference as REST endpoints or full ASGI apps, add dynamic batching, schedule jobs, manage secrets, and improve latency with warm containers.

Use cases:

  • Turning ML inference into HTTP endpoints for web apps and services.
  • Running batch inference/training jobs with cron-like schedules.
  • Serving low-latency model predictions using container warm-up and concurrency controls.

Quick Start

Install the Modal client by running modal setup, then create and deploy your GPU-backed inference function.

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 FastAPI inference endpoint with serverless GPU acceleration?

You can deploy a FastAPI inference endpoint with serverless GPU acceleration by defining apps, functions, and web endpoints directly in Python, allowing automatic scaling without managing infrastructure.

What is the best way to run scheduled GPU batch jobs without maintaining servers?

Running scheduled GPU batch jobs without servers is achieved by defining cron-style workflows and on-demand GPU functions in Python, enabling cost-efficient scaling and automatic scale-to-zero behavior.

Can I use Modal to serve machine learning models with dynamic batching and concurrency limits?

Yes, Modal allows you to serve machine learning models with dynamic batching and concurrency limits by orchestrating runtime behaviors and exposing inference as REST endpoints or full ASGI apps.

How do I persist large ML models across serverless GPU function calls?

To persist large ML models across serverless GPU function calls, you optionally attach volumes to your Python-defined functions, allowing container images to access stored models without reloading.

Does serverless GPU execution support specifying custom GPU types and memory variants for ML deployment?

Serverless GPU execution supports specifying custom GPU types and memory variants for ML deployment by configuring on-demand GPU acceleration settings directly within your Python function definitions.

How do I manage secrets and container warm-up for low-latency model predictions?

You manage secrets and container warm-up for low-latency model predictions by configuring runtime behaviors in Python, improving initial response times and securely passing credentials to your serverless functions.