Serverless LLMs and Agentic AI with Modal โ€“ Lesson 5

BrainOmega ยท Beginner ยท๐Ÿ—๏ธ Systems Design & Architecture ยท3mo ago
๐Ÿ’– Support BrainOmega โ˜• Buy Me a Coffee: https://buymeacoffee.com/brainomega ๐Ÿ’ณ Stripe: https://buy.stripe.com/aFa00i6XF7jSbfS9T218c00 ๐Ÿ’ฐ PayPal: https://paypal.me/farhadrh ๐ŸŽฅ In this video, we continue our Serverless LLMs and Agentic AI course with Lesson 5: Volumes โ€“ Persistent Storage Across Containers in Modal. After learning how to control environments, scaling, and hardware resources, we now tackle a critical missing piece of serverless systems: state. Most serverless functions are stateless by default, but real AI systems need to persist results, metrics, checkpoints, and artifacts across runs. In this lesson, youโ€™ll learn how Modal Volumes solve this problem cleanly and safely. This lesson is fully hands-on and systems-oriented. We build a small Experiment Tracker that logs benchmark results into a shared Modal Volume using a simple JSONL format. Youโ€™ll see how multiple functions can read and write the same persistent data across different runs, days, or even weeks. Along the way, youโ€™ll learn the two most important operational concepts when working with volumes: commit(), which makes writes durable and visible to other containers, and reload(), which ensures long-lived or reused containers see the latest data instead of stale state. By the end of this lesson, youโ€™ll understand how to design stateful serverless AI workflows without databases, how to avoid subtle consistency bugs, and how to use volumes for experiment tracking, caching, checkpoints, and intermediate artifacts. This mental model is essential for building real-world LLM systemsโ€”whether youโ€™re logging embedding benchmarks, storing RAG indexes, or persisting agent memory across runs. ๐Ÿ’ปCode on GitHub: https://github.com/frezazadeh/serverless-llm-agentic-ai/blob/main/lesson5.ipynb โธป ๐Ÿ“š What Youโ€™ll Learn โ€ข What Modal Volumes are and how they provide persistent storage โ€ข How to create and mount named volumes in Modal โ€ข How to write and read shared files across containers and runs โ€ข Why co
Watch on YouTube โ†— (saves to browser)
Sign in to unlock AI tutor explanation ยท โšก30

Related AI Lessons

โšก
ACID vs BASE Transactions
Learn the difference between ACID and BASE transaction models and how to choose the right one for your database needs
Dev.to ยท ไธไน…
โšก
Chapter 1. The Big Three of Circuits โ€” R, L, C
Learn the fundamentals of R, L, C circuits in electronics to improve your embedded software skills
Medium ยท Programming
โšก
Angular Interviews Questions Morgan Stanley Questions for 5+ Years Experience
Prepare for Angular interviews with Morgan Stanley questions for 5+ years experience and learn key concepts to succeed
Medium ยท Programming
โšก
I Used to Think System Design Diagrams Had to Look Cool. I Was Wrong
Effective system design diagrams prioritize clarity over aesthetics, focusing on communicating complex ideas simply
Dev.to ยท Flik โ€“ Software Critical Dev
Up next
How do I remove the restriction on port 25 from my Amazon EC2 instance or Lambda function?
Amazon Web Services
Watch โ†’