modal-serverless-gpu

Deploy GPU-accelerated ML functions on Modal with auto-scaling and scheduling.

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

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 without provisioning or managing infrastructure by deploying them to Modal’s serverless GPU platform.

Core Features & Use Cases

  • Serverless GPU execution: Run inference and training on-demand (including scale-to-zero and fast container launches) using Modal functions and class-based services.
  • Deployable APIs and endpoints: Expose ML inference as REST endpoints (FastAPI/ASGI) or other web-serving patterns suitable for production usage.
  • Performance and cost controls: Configure GPU types and variants, batching/concurrency, container warm/idle timeouts, volumes for model/data persistence, and scheduling for unattended jobs.
  • Use Case: You need low-latency text generation as an API and periodic batch inference (e.g., nightly recommendations). Use this Skill to deploy an auto-scaling GPU endpoint and schedule daily jobs that load models efficiently.

Quick Start

Deploy a Modal serverless GPU endpoint for inference by installing the Modal CLI and running your function with a GPU like T4 for a first test.

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 serverless GPU inference APIs without managing infrastructure?

You can deploy serverless GPU inference APIs without managing infrastructure by using Modal to run ML functions on-demand. This platform supports scale-to-zero, fast container launches, and exposing inference as REST endpoints via FastAPI.

Can I schedule batch jobs and use dynamic batching for ML workloads on serverless GPUs?

Yes, you can schedule batch jobs and use dynamic batching for ML workloads on serverless GPUs. Modal supports cron-like scheduling for unattended jobs and allows configuring batching and concurrency to maximize inference throughput.

Does Modal work with FastAPI to serve ML models in production?

Modal works with FastAPI to serve ML models in production by supporting ASGI web-serving patterns. You can expose your GPU-accelerated ML inference as REST endpoints suitable for production usage with auto-scaling.

How do I configure container warm timeouts and persistent model caching for serverless ML deployment?

To configure container warm timeouts and persistent model caching for serverless ML deployment, you use Modal's performance and cost controls. You can set idle timeouts and attach volumes to ensure efficient model loading and data persistence across executions.

Do I need to specify GPU types explicitly when running ML training on serverless platforms?

Yes, you need to specify GPU types explicitly when running ML training on serverless platforms. Modal app and function setup requires explicit GPU specs, such as selecting a T4 GPU, alongside container images for production-ready execution.

What is the best way to run nightly batch inference and on-demand text generation using serverless GPUs?

The best way to run nightly batch inference and on-demand text generation using serverless GPUs is deploying an auto-scaling endpoint on Modal. You can schedule daily cron-like jobs that load models efficiently via persistent volumes.