modal-serverless-gpu

Deploy GPU-accelerated machine learning workloads as serverless Modal functions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you deploy and run GPU-accelerated machine learning workloads without managing servers. It solves the friction of getting models to production by providing a practical, Modal-focused path for inference endpoints, batch jobs, and scheduled automation.

Core Features & Use Cases

  • Serverless GPU execution: Run GPU-intensive code on-demand with scale-to-zero behavior for cost control.
  • Deployable endpoints: Expose model inference as web APIs (FastAPI/ASGI/WSGI or simple function endpoints).
  • Performance and reliability knobs: Configure container idle timeout, concurrency, retries, batching, storage volumes, and GPU selection (including multi-GPU and fallbacks).
  • Use case: You want to serve a text-generation model as a REST endpoint and keep cold-start latency low while controlling costs—use GPU functions with lifecycle model loading, optional dynamic batching, and a persistent volume for cached model artifacts.

Quick Start

Use the modal-serverless-gpu Skill to set up Modal authentication and deploy a GPU-backed inference function as a web endpoint.

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 machine learning model as a serverless GPU inference API?

Deploy a machine learning model as a serverless GPU inference API by configuring Modal functions with required decorators, specifying GPU resources, and exposing the endpoint via FastAPI or ASGI. This approach supports scale-to-zero behavior to control costs while handling on-demand inference workloads.

Can I use FastAPI to expose Modal serverless functions for model inference?

Yes, you can use FastAPI to expose Modal serverless functions for model inference. The Skill supports API exposure through FastAPI, ASGI, or REST-style web endpoints, allowing you to serve text-generation models or other machine learning workloads directly over the web.

What is the best way to reduce cold-start latency for serverless GPU inference?

Reduce cold-start latency for serverless GPU inference by configuring container idle timeouts, warm container behavior, and persistent storage volumes for cached model artifacts. You can also tune concurrency and use dynamic batching to optimize performance and maintain reliable response times.

How do I configure auto-scaling and multi-GPU support for ML deployment?

Configure auto-scaling and multi-GPU support for ML deployment by defining a Modal App with function and class decorators. You can specify GPU resources, including variants and fallbacks, to handle multi-GPU training and batch processing jobs while managing scale-to-zero execution.

Does Modal serverless GPU execution support scheduled cron workloads and batch processing?

Yes, Modal serverless GPU execution supports scheduled cron workloads and batch processing jobs. You can configure serverless functions with specific GPU resources, concurrency settings, and retries to automate and run GPU-intensive code on a schedule without managing servers.

How do I manage persistent storage for model artifacts in a serverless GPU environment?

Manage persistent storage for model artifacts in a serverless GPU environment by configuring Modal storage volumes. These volumes cache models and maintain lifecycle model loading across container restarts, which helps reduce cold-start latency and improve inference performance.