May 2024 Summaries
3 posts from Modal
Filter
Month:
Year:
Post Summaries
Back to Blog
The authors of the blog post fine-tuned a Stable Diffusion model on the Heroicons library to create a generative icon model. They used Modal, a scalable serverless cloud computing platform, to run the fine-tuning training script and deploy the fine-tuned model as an interactive web app. The authors explored different fine-tuning techniques, including full fine-tuning, sequential adapter fine-tuning, and parallel adapter fine-tuning. They found that full fine-tuning worked best for their use-case but also discussed the advantages of parallel adapter fine-tuning methods like LoRA. The authors prepared the dataset by downloading the Heroicons from GitHub, converting them to PNGs, adding white backgrounds, generating captions, and uploading the dataset to the HuggingFace Hub. They then set up a Modal account, created a `TrainConfig` class to hold training hyperparameters, and defined an `AppConfig` class to store inference hyperparameters. The authors fine-tuned the Stable Diffusion model on the Heroicons library using the `train_text_to_image.py` script and saved the fine-tuned model in a Modal Volume. They then mounted the volume to a new Modal `inference` function, which they used to generate icons based on user input. Finally, the authors set up a Gradio UI that called the `Model.inference` function and deployed the app on Modal using one command. The fine-tuned model was evaluated for its performance as an infinite icon library, and the authors discussed the challenges of fine-tuning and the potential of grid searches to scale up the process.
May 21, 2024
2,435 words in the original blog post.
Substack is a popular platform for writers to publish newsletters, employing machine learning (ML) for various purposes such as spam detection and sentiment analysis. The company has moved its ML training and deployment from AWS SageMaker to Modal, a shift that has significantly improved their developer experience, collaboration, and deployment speed. Previously, Substack's pipelines were built on SageMaker and Airflow, but this process was slow and painful due to issues with the developer experience, collaboration, and container startup times. By migrating to Modal, Substack can now iterate quickly, share components across projects, and deploy ML workflows with greater speed and flexibility than ever before.
May 20, 2024
453 words in the original blog post.
Modal, a serverless compute platform, now allows developers to select the cloud region for their Functions, making it easier to manage infrastructure. This feature is available on the Team plan and Enterprise plan, and requires an email request to [email protected]. To specify a region, developers can use a line of code, with options ranging from broad regions like "us" or "eu" to specific underlying regions like "us-east-1". Specifying regions can help meet regulatory requirements, reduce egress fees, and minimize latency for applications that require real-time inference. By selecting the desired cloud region, developers can ensure their Functions run in a location that meets their needs, such as running near users or external databases.
May 13, 2024
481 words in the original blog post.