<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>modal &#8211; iAIFeed</title>
	<atom:link href="https://www.iaifeed.com/tag/modal/feed" rel="self" type="application/rss+xml" />
	<link>https://www.iaifeed.com</link>
	<description>iAIFeed</description>
	<lastBuildDate>Wed, 07 Oct 2026 12:43:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://www.iaifeed.com/wp-content/uploads/2026/07/cropped-iaifeed1-80x80.png</url>
	<title>modal &#8211; iAIFeed</title>
	<link>https://www.iaifeed.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to Run Batch GPU Inference on Modal Without a Server</title>
		<link>https://www.iaifeed.com/how-to-run-batch-gpu-inference-on-modal-without-a-server</link>
					<comments>https://www.iaifeed.com/how-to-run-batch-gpu-inference-on-modal-without-a-server#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Wed, 07 Oct 2026 12:43:39 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[modal]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-run-batch-gpu-inference-on-modal-without-a-server</guid>

					<description><![CDATA[Processing thousands of items through a model does not need an always-on GPU box. Modal parallelizes the work across containers and charges only for the seconds you use. Here is the pattern.]]></description>
										<content:encoded><![CDATA[<p>Batch inference — running a model over thousands of rows, images or documents — is a classic case for <a href="https://www.iaifeed.com/ai-tool/modal">Modal</a>. You fan the work out across many containers, each with a GPU if needed, and pay only for the seconds each one runs. No server sits idle waiting for the next batch.</p>
<p>Start with the basic Modal deployment guide if you have not run a function yet. This article covers the scaling and cost patterns specific to batch jobs.</p>
<h2>How do you parallelize a batch in Modal?</h2>
<p>Use a function that takes one item and a driver that maps it over the whole list. Modal lets a function spawn many parallel containers, so the wall-clock time depends on concurrency, not list length.</p>
<ol>
<li>Write a <code>process_one(item)</code> function with the GPU decorator.</li>
<li>In a driver function, call <code>process_one.map(items)</code>.</li>
<li>Set <code>max_containers</code> to control how wide it scales.</li>
<li>Collect results as they return.</li>
</ol>
<p>A batch of 10,000 short items can finish in minutes if you let it scale wide.</p>
<h2>How do you avoid loading the model repeatedly?</h2>
<p>Loading a large model on every call wastes time and money. Modal keeps containers warm while a batch runs and can cache the model weights in a volume or the image cache. Load the model once at container start and reuse it for every item that container handles.</p>
<h2>How do you keep costs predictable?</h2>
<ul>
<li>Cap concurrency with <code>max_containers</code> so a big list cannot spin up hundreds of GPUs.</li>
<li>Use <code>gpu="any"</code> to accept cheaper hardware when the model tolerates it.</li>
<li>Right-size the GPU — a small model on an A100 is money burned.</li>
<li>Test on 100 items before running 100,000.</li>
</ul>
<h2>How do you store and read results?</h2>
<p>Write outputs to a Modal volume for persistence, or push to your own S3/GCS bucket. Volumes survive between runs, so a crashed batch can resume instead of restarting. For huge datasets, stream results out rather than holding everything in memory.</p>
<h2>Modal vs. a rented GPU box</h2>
<p>If your workload runs continuously, a rented GPU instance is cheaper and simpler. Modal wins when the job is intermittent — nightly embeddings, a weekly re-index, occasional fine-tuning. You skip provisioning, and the meter stops when the batch ends. The trade-off is cold-start latency and a platform to learn.</p>
<h2>Key Takeaways</h2>
<ul>
<li>Modal maps one function over a list to run batch inference in parallel.</li>
<li>Cache model weights so each container loads them once.</li>
<li>Cap concurrency with <code>max_containers</code> to control cost.</li>
<li>Use volumes to persist results and resume failed batches.</li>
<li>Best for intermittent jobs; a continuous workload is cheaper on a rented box.</li>
</ul>
<p>Last updated October 2026. More at <a href="https://www.iaifeed.com/ai-tool/modal">Modal</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-run-batch-gpu-inference-on-modal-without-a-server/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Deploy a Python Function to the Cloud with Modal</title>
		<link>https://www.iaifeed.com/how-to-deploy-a-python-function-to-the-cloud-with-modal</link>
					<comments>https://www.iaifeed.com/how-to-deploy-a-python-function-to-the-cloud-with-modal#respond</comments>
		
		<dc:creator><![CDATA[iamltlb]]></dc:creator>
		<pubDate>Wed, 07 Oct 2026 12:43:23 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[modal]]></category>
		<guid isPermaLink="false">https://www.iaifeed.com/how-to-deploy-a-python-function-to-the-cloud-with-modal</guid>

					<description><![CDATA[Modal runs Python functions in the cloud without a Dockerfile or Kubernetes. Here is how to install the client, run a function remotely, add a GPU, and expose it as a web endpoint.]]></description>
										<content:encoded><![CDATA[<p>Modal is a serverless platform for Python that runs your functions in the cloud on demand. You write normal Python, decorate a function, and Modal handles containers, scaling and GPUs. There is no Dockerfile and no cluster to manage. The free tier includes $30 of monthly compute credit, which is enough to test real workloads.</p>
<p>It is aimed at data and ML developers who want a function to run somewhere fast without DevOps overhead. If you have ever waited on a Kubernetes setup just to run a batch job, <a href="https://www.iaifeed.com/ai-tool/modal">Modal</a> is the shorter path.</p>
<h2>What is Modal?</h2>
<p>Modal is a serverless compute platform for Python. You define an app, attach an image with your dependencies, and deploy. Modal builds the container, runs your function on demand, and scales to zero between calls so you do not pay for idle time.</p>
<h2>How do you install and run your first function?</h2>
<ol>
<li><code>pip install modal</code></li>
<li>Run <code>modal setup</code> to authenticate in the browser.</li>
<li>Write a file that imports <code>modal</code> and defines an app plus one function.</li>
<li>Run it locally with <code>modal run app.py</code> — it executes in the cloud.</li>
<li>Deploy it persistently with <code>modal deploy app.py</code>.</li>
</ol>
<p>The first run pulls and builds an image, so it takes longer than later calls.</p>
<h2>How do you add dependencies and a GPU?</h2>
<p>Point the image at packages and the runtime picks it up:</p>
<ul>
<li><code>modal.Image.debian_slim().pip_install("torch")</code> for libraries.</li>
<li><code>@app.function(gpu="A100")</code> to request a GPU type.</li>
<li>Use <code>gpu="any"</code> to take whatever is available at a lower cost.</li>
</ul>
<p>GPUs bill per second of use, so a 30-second job on an A100 costs cents.</p>
<h2>How do you expose it as a web endpoint?</h2>
<p>Add a decorator that turns the function into an HTTP route, then deploy. Modal gives you a URL that scales from zero. This works for an API, a webhook handler, or a simple inference endpoint. You can also schedule functions to run on a cron.</p>
<h2>What should you watch out for?</h2>
<p>Cold starts happen when a deployed function has been idle, and a GPU cold start can add several seconds. Long-running state does not survive between calls unless you use Modal&#8217;s storage primitives like volumes and dicts. And the pricing model rewards bursty work — a function running 24/7 may be cheaper on a plain VM.</p>
<h2>Key Takeaways</h2>
<ul>
<li>Modal runs Python functions serverlessly with no Dockerfile or Kubernetes.</li>
<li>Install with <code>pip install modal</code>, authenticate with <code>modal setup</code>.</li>
<li>Request GPUs with one decorator argument; billed per second.</li>
<li>Functions can be HTTP endpoints or scheduled jobs.</li>
<li>Free tier gives about $30/month compute; best for bursty workloads.</li>
</ul>
<p>Last updated October 2026. Details at <a href="https://www.iaifeed.com/ai-tool/modal">Modal</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.iaifeed.com/how-to-deploy-a-python-function-to-the-cloud-with-modal/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
