Get confident with Modal's serverless GPU platform — function decorators, persistent volumes, container images, and web endpoints.
0 / 5 completed
1 / 5
During a code review, a teammate asks why your Modal function decorator specifies gpu="A10G". The reason is:
Setting gpu="A10G" (or gpu=modal.GPU.A10G()) in @app.function tells Modal to attach an NVIDIA A10G GPU to that function's container — no cluster management required.
2 / 5
In a standup, an ML engineer says model weights reload on every invocation, causing slow cold starts. You suggest using a Modal Volume. What is a Volume in Modal?
Modal Volumes are persistent network filesystems mountable by functions. Storing model weights in a Volume means they survive across invocations and can be shared between parallel workers.
3 / 5
A PR adds a Modal Image definition with pip_install and apt_install calls. In a review, a senior engineer asks what a Modal Image is:
Modal Images are Python-defined container specifications (built via modal.Image.debian_slim().pip_install(...)). Modal builds and caches them, ensuring reproducible function environments.
4 / 5
Your team wants to expose a Modal function as an HTTP endpoint. In a design discussion, you explain that @app.function() combined with @modal.web_endpoint():
@modal.web_endpoint() wraps a Modal function as an HTTPS endpoint. Modal handles TLS, scaling, and routing — ideal for serving ML inference over HTTP.
5 / 5
In a platform review, a colleague asks when to use app.function().remote() vs .map(). You explain that .map():
.map() distributes a list of inputs across many parallel Modal containers, collecting results lazily. It's the primary way to parallelise batch inference or data-processing workloads.