GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Guide
  • Examples
  • Log in
  • Sign up

This view

  • Original page
  • New address

GeezerVison is showing modal.com — Introduction

Guide Introduction to Modal Getting started Functions Functions Invocation methods Function lookups Container lifecycle management Parametrized Functions Dynamic configuration Sandboxes Sandboxes Running commands Networking and security File access Snapshots Exit Snapshots BetaPricing and resources Sidecars BetaSecret injection BetaModel APIs Model APIs Models and pricing Agent integrations Endpoints Endpoints Supported models Candidates Training Quickstart Tinker-compatible API BetaMulti-node training Images Defining Images Using existing container images Named images Fast pull from registry GPUs and other resources GPU acceleration Using CUDA on Modal Configuring CPU, memory, and disk Scaling out Scaling out Input concurrency Batch processing Job queues Dynamic batching Multi-node Clusters Deployment Apps, Functions, and entrypoints Managing deployments Continuous deployment Scheduled Functions Observability HTTP Applications Servers Sticky Sessions Web Functions Streaming endpoints Web Function URLs Request timeouts Proxy Tokens Networking Tunnels Proxies BetaCluster networking Data sharing and storage Passing local data Volumes Storing model weights Cloud bucket mounts Dicts Queues Dataset ingestion Secrets and environment variables Secrets Environment variables Performance Cold start performance Memory Snapshots High-performance LLM inference Reliability and robustness Failures and retries Preemption Timeouts GPU health Troubleshooting Security and privacy Security and privacy Data residency Customer-supplied encryption keys AlphaAudit logs Integrations Using OIDC to authenticate with external services Connecting Modal to your Datadog account Connecting Modal to your OpenTelemetry provider Slack notifications Workspace & account settings Workspaces Environments Service users User groups Role-Based Access Control (RBAC) Billing Network egress billing Budgets Identity and provisioning Okta SSO Microsoft Entra SSO Google Workspace SSO Custom SAML SSO SCIM Integration Other topics Feature maturity Restricted Functions JavaScript/Go SDKs BetaModal 1.0 migration guide File and project structure Developing and debugging Jupyter notebooks Asynchronous API usage Global variables Region selection Localized placement GPU Metrics Search syntax

Introduction

Modal is an AI infrastructure platform that lets you:

  • Run low latency inference with sub-second cold starts, using open weights or custom models
  • Scale out batch jobs to run massively in parallel
  • Train or fine-tune open weights or custom models on the latest GPUs
  • Spin up thousands of isolated and secure Sandboxes to execute AI generated code

You get full serverless execution and pricing because we host everything and charge per second of usage.

Notably, there’s zero configuration in Modal - everything, including container environments and GPU specification, is code. Take a breath of fresh air and feel how good it tastes with no YAML in it.

Here’s a complete, minimal example of LLM inference running on Modal:

Using a GPU requires having a valid payment method on file.

from pathlib import Path

import modal

app = modal.App("example-inference")
image = modal.Image.debian_slim().uv_pip_install("transformers[torch]")


@app.function(gpu="h100", image=image)
def chat(prompt: str | None = None) -> list[dict]:
    from transformers import pipeline

    if prompt is None:
        prompt = f"/no_think Read this code.\n\n{Path(__file__).read_text()}\nIn one paragraph, what does the code do?"

    print(prompt)
    context = [{"role": "user", "content": prompt}]

    chatbot = pipeline(
        model="Qwen/Qwen3-1.7B", device_map="cuda", max_new_tokens=1024
    )
    result = chatbot(context)
    print(result[0]["generated_text"][-1]["content"])

    return result

That’s it! You can copy and paste that text into a Python file in your favorite editor and then run it with modal run path/to/file.py.

How does it work? 

Modal takes your code, puts it in a container, and executes it in the cloud. If you get a lot of traffic, Modal automatically scales up the number of containers as needed. This means you don’t need to mess with Kubernetes, Docker, or even an AWS account.

We pool capacity over all major clouds. That means we can optimize for both high GPU availability and low cost by dynamically deciding where to run your code based on the best available capacity.

Programming language support 

Python is the primary language for building Modal applications and implementing Modal Functions, but you can also use JavaScript/TypeScript or Go to call Modal Functions, run Sandboxes, and manage Modal resources.

Getting started 

Developing with Modal is easy because you don’t have to set up any infrastructure. Just:

  1. Create an account at modal.com
  2. Run pip install modal to install the modal Python package
  3. Run modal setup to authenticate (if this doesn’t work, try python -m modal setup)

…and you can start running jobs right away. Check out some of our simple getting started examples:

  • Hello, world!
  • A simple web scraper

And when you’re ready for something fancier, explore our full library of examples, like:

  • Running your own LLM inference
  • Transcribing speech in real time with Kyutai STT
  • Fine-tuning a model to paint flowers
  • Building a coding agent with Modal Sandboxes and LangGraph
  • Training a small language model from scratch
  • Parallel processing of Parquet files on S3
IntroductionHow does it work?Programming language supportGetting started
See it in action
Hello, world!
A simple web scraper
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.