modal-serverless-gpu

Deploy machine learning workloads as serverless GPU functions on Modal.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Modal serverless GPU eliminates the friction of provisioning and maintaining GPU infrastructure so you can run ML training, inference, and batch workloads on demand.

Core Features & Use Cases

  • Serverless GPU execution: Run GPU-intensive functions without managing servers, enabling scale-to-zero and pay-per-use.
  • Deploy ML as endpoints: Package inference logic as web APIs (FastAPI/ASGI) for low-latency requests and production use.
  • Production-friendly orchestration: Use volumes, secrets, scheduling, batching, concurrency controls, and container lifecycle hooks to support real workloads end-to-end.

Use Case Examples:

  • Host a text generation inference API that loads the model once per container and serves requests.
  • Run nightly scheduled training or data-processing jobs that scale up when needed and stay idle otherwise.
  • Batch-process large datasets with dynamic batching for better GPU utilization and lower cost.

Quick Start

Use the modal-serverless-gpu skill to deploy a GPU inference function by creating a Modal app, selecting a GPU (for example T4 or A10G), defining the model image dependencies, and then running the script to generate an accessible 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 inference API on serverless GPUs?

You can deploy an ML inference API on serverless GPUs by defining a Modal app, configuring a specific GPU like T4 or A10G, setting container image dependencies, and using web endpoint decorators to serve low-latency requests.

Can I run scheduled batch jobs on serverless GPUs for nightly data processing?

Yes, you can run scheduled batch jobs on serverless GPUs using cron-like scheduling to execute nightly training or data-processing workloads that scale up on demand and scale to zero when idle.

How does serverless GPU execution handle model warm-up for inference endpoints?

Serverless GPU execution handles model warm-up through container lifecycle hooks, loading the model once per container to serve subsequent requests efficiently without reloading dependencies for every API call.

What's the best way to improve GPU utilization for large dataset batch processing?

The best way to improve GPU utilization for large dataset batch processing is implementing dynamic batching within serverless GPU functions, which groups requests to maximize throughput and lower overall compute costs.

Do I need to manage servers manually when running ML training workloads on Modal?

No, you do not need to manage servers manually when running ML training workloads on Modal, as the platform eliminates infrastructure provisioning friction by offering auto-scaling execution and pay-per-use pricing.

Can I use volumes and secrets for production-friendly ML orchestration on serverless GPUs?

Yes, you can use volumes and secrets for production-friendly ML orchestration on serverless GPUs, allowing you to mount persistent storage and securely manage credentials for auto-scaling API deployments.