modal-serverless-gpu

Deploy machine learning models on serverless GPU infrastructure with Python.

2|Updated May 22, 2026
One-click install
npx skills add https://github.com/519lab/thoth-agent --skill modal-serverless-gpu-519lab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: modal-serverless-gpu
Source: https://github.com/519lab/thoth-agent/tree/main/optional-skills/mlops/modal
Command: npx skills add https://github.com/519lab/thoth-agent --skill modal-serverless-gpu-519lab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of running GPU-intensive ML workloads without the need for infrastructure management, providing on-demand GPU access and efficient deployment of ML models.

Core Features & Use Cases

  • Serverless GPUs: Access to a variety of GPUs like T4, L4, A10G, L40S, A100, H100, H200, B200 on-demand.
  • Python-native: Define infrastructure in Python code without YAML.
  • Auto-scaling: Scale resources to zero or up to 100+ GPUs instantly.
  • Sub-second Cold Starts: Rust-based infrastructure for fast container launches.
  • Container Caching: Image layers cached for rapid iteration.
  • Web Endpoints: Deploy functions as REST APIs with zero-downtime updates.
  • Use Case: Ideal for deploying ML models as APIs, running batch jobs with automatic scaling, and prototyping ML applications quickly.

Quick Start

Install the Modal CLI and authenticate:

pip install modal
modal setup

Create a simple ML model function and deploy:

import modal

app = modal.App("hello-gpu")

@app.function(gpu="T4")
def gpu_info():
    import subprocess
    return subprocess.run(["nvidia-smi"], capture_output=True, text=True).stdout

@app.local_entrypoint()
def main():
    print(gpu_info.remote())

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 machine learning models as auto-scaling APIs with serverless GPUs?

You can deploy machine learning models as auto-scaling APIs by defining Python-native infrastructure and exposing functions as web endpoints. This provides on-demand GPU access and instant scaling without infrastructure management.

What serverless GPU types are supported for running ML workloads?

Supported serverless GPU types for ML workloads include T4, L4, A10G, L40S, A100, H100, H200, and B200. These provide on-demand access to scale resources from zero to over 100 GPUs instantly.

Can I define cloud infrastructure for GPU deployment in Python without YAML?

Yes, you can define cloud infrastructure for GPU deployment entirely in Python without YAML. This Python-native approach allows you to specify resources and deploy functions as REST APIs directly in code.

Do I need the modal Python client to run batch jobs on serverless GPUs?

Yes, you need the modal Python client to run batch jobs on serverless GPUs. Installing the CLI and authenticating allows you to define functions that scale automatically and leverage cached container images for rapid iteration.

Why does serverless GPU infrastructure provide sub-second cold starts for model deployment?

Serverless GPU infrastructure provides sub-second cold starts for model deployment through its Rust-based infrastructure and container caching. Image layers are cached to enable rapid iteration and fast container launches.