<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Natasha Savic on Medium]]></title>
        <description><![CDATA[Stories by Natasha Savic on Medium]]></description>
        <link>https://medium.com/@natasha-savic?source=rss-f19afff72062------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FQj5R2_pnf6XYnGEc0HHeQ.jpeg</url>
            <title>Stories by Natasha Savic on Medium</title>
            <link>https://medium.com/@natasha-savic?source=rss-f19afff72062------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:30:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@natasha-savic/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding LLMOps: Taking MLOps to the Next Level]]></title>
            <link>https://medium.com/@natasha-savic/understanding-llmops-taking-mlops-to-the-next-level-7c206e77723?source=rss-f19afff72062------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c206e77723</guid>
            <dc:creator><![CDATA[Natasha Savic]]></dc:creator>
            <pubDate>Mon, 15 May 2023 03:27:16 GMT</pubDate>
            <atom:updated>2023-05-15T03:27:16.452Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SoAuLj7W1nncngccAojGnw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jupp?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jonathan Kemper</a> on <a href="https://unsplash.com/s/photos/OpenAI?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>LLMOps, the next generation of MLOps, is revolutionizing the field of machine learning operations by introducing new concepts and challenges. In this blog post, we will delve into the key aspects of LLMOps and explore its implications for businesses. We will highlight the differences between LLMOps and regular MLOps and discuss the journey from experimentation to enhancing model outputs. So let’s dive in!</p><p>This article is inspired by the following excellent talk by “The Full Stack” which I recommend you to watch: <a href="https://www.youtube.com/watch?v=Fquj2u7ay40&amp;list=PL1T8fO7ArWleyIqOy37OVXsP4hFXymdOZ&amp;t=3s">LINK</a></p><p><strong>LLMOps vs. MLOps: What sets them apart?</strong></p><p>Traditional MLOps typically involves a training process that results in a model file. However, LLMOps expands this horizon by incorporating not only open source models but also proprietary models that cannot be fine-tuned. This presents a unique challenge as it restricts access to the original model and often leaves users unaware of how it was trained, as is the case with OpenAI’s GPT models.</p><p><strong>Key Takeaways to Enhance LLMOps</strong></p><ol><li><strong>Experimentation Starting Point:</strong> When exploring Proof of Concepts (PoCs), GPT-4 serves as an excellent starting point. If GPT-4 fails to solve your problem, lower-level models are unlikely to succeed. Conversely, if GPT-4 proves successful, considering lower level models may be beneficial for cost or performance optimization.</li><li><strong>Model Selection:</strong> Open source models often suffer from licensing issues and generally exhibit lower quality compared to proprietary models. Commercial viability becomes a significant factor in choosing the right model for your LLMOps implementation.</li><li><strong>Experimentation Tracking:</strong> To effectively track LLMOps experimentation, there is a need for prompt tracking tools that are decoupled from git. Instead of training models with different experimentation settings, such as varying data partitions or hyperparameters, experimentation is conducted through prompts to identify the optimal setup for your Language Model (LLM). Although prompt tracking is still an emerging practice, there is a need for sophisticated tools that track prompts so they can be versioned and re-instated. We are looking forward to see established tools like e.g. MLFlow to enable a functionality that considers and tracks prompts.</li><li><strong>Model Evaluation:</strong> Determining the appropriate metrics and quantifying the quality of an LLMOps system can be challenging due to the non-deterministic nature of some LLM outputs. Effective data drift detection techniques, which quantify distribution changes, prove invaluable for assessing the relevance of context prompts. Another approach involves deploying a separate LLM to criticize the LLM in production, providing insight into the quality of the outputs.</li><li><strong>Output Tuning: </strong>Instead of focusing solely on selecting the “right model,” consider methods to improve the quality of your outputs. Emphasize techniques that allow the LLM to generate multiple answers and subsequently self-criticize to select the best response (ensemble sampling similar to ensemble learning in classical Machine Learning).</li></ol><p><strong>Automating LLMOps: Challenges and Approaches</strong></p><p>LLMOps represents a significant leap forward in the world of MLOps, presenting new opportunities and challenges. By understanding LLMOps’ distinctive characteristics and focusing on key aspects like experimentation, model selection, evaluation, output tuning, and automation, organizations can harness the full potential of LLMOps to optimize language models for their specific use cases.</p><h3>The question arises: Can we automate LLMOps development today? While there are approaches available, automating LLMOps remains a complex task with numerous manual steps involved. From model selection and measuring quality to tracking experimentation, LLMOps is still an emerging field with many tooling and licensing dependencies.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c206e77723" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Instance Segmentation with Azure Machine Learning and AutoML]]></title>
            <link>https://medium.com/@natasha-savic/instance-segmentation-with-azure-machine-learning-and-automl-951a9717c26c?source=rss-f19afff72062------2</link>
            <guid isPermaLink="false">https://medium.com/p/951a9717c26c</guid>
            <category><![CDATA[instance-segmentation]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Natasha Savic]]></dc:creator>
            <pubDate>Wed, 05 Oct 2022 06:31:03 GMT</pubDate>
            <atom:updated>2022-10-05T23:21:12.827Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*6yBwn-rmDEyHUOf5JDLHjQ.png" /><figcaption>Trash items segmented according to their class</figcaption></figure><p>You don’t need to work in the field of Artificial Intelligence (AI) to be stunned by the advances made in the field in the recent past. This revelation could have also come through a random digital interaction such as scrolling through your iPhone’s camera roll and when tapping on an image it suddenly segments a person out of the image and removes the background (this surprised me recently, try it out!). We will use the same technique as Apple did <a href="https://machinelearning.apple.com/research/panoptic-segmentation">here</a> and guess what, it is much more accessible than you would think at first.</p><h4>You don’t need to be a rockstar data scientist anymore to make use of Computer Vision and use it for your own applications!</h4><p>This article will provide a practical guide on training your own Instance Segmentation model using Azure’s AutoML capability as part of Azure Machine Learning Studio (Azure ML). Before starting with the code snippets that allow you to train your model, let us first explain the data and storage options that will be used as part of this tutorial.</p><p><strong>The dataset &amp; storage</strong></p><p>We will work on a problem that recognises, locates and labels trash items. For this, we will use the <a href="http://tacodataset.org/">TACO trash dataset</a> which currently contains 1500 pre-labelled images. To download the images, you can follow the instructions of the <a href="https://github.com/pedropro/TACO">GitHub </a>repository. Once you obtain the images, it is recommended to upload them into your Azure ML Blob Storage through Azure Storage Explorer. Azure Storage Explorer allows you to upload/download and organise your files through an intuitive UI. It also allows us to train our models more efficiently as we will later read the training files from the associated storage account directly rather than from the local file share. To download Azure Storage Explorer, follow the instructions <a href="https://azure.microsoft.com/en-us/products/storage/storage-explorer/"><strong>here</strong></a>.</p><p>Azure ML allows you to version datasets. This is beneficial as you can access them easily through the SDKs (Python or CLI) but also because it provides lineage with every artefact that consumes this versioned dataset. Most notably such artefact is a trained model, but it could also be used for other tasks that do not necessarily involve training a model such as data transformation pipelines or, data monitoring via <a href="https://towardsdatascience.com/getting-a-grip-on-data-and-model-drift-with-azure-machine-learning-ebd240176b8b"><strong>data drift</strong></a> . To make use of this, we will connect the images that we uploaded to the blob storage with our Azure ML data functionality. To do so, follow the following instructions depicted on the screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*21oiwio4LnXBFxlTASRwIQ.jpeg" /><figcaption>Connect files from Storage Account into Azure Machine Learning Studio as versioned data asset</figcaption></figure><p><strong>The task</strong></p><p>In computer vision, we distinguish between 3 different tasks:</p><ol><li><em>Image Classification:</em> Given an image, what kind of objects/classes are present</li><li><em>Object Detection: </em>Image Classification + where are those images located using a rectangular bounding box</li><li><em>Instance Segmentation:</em> Object Detection + what are the exact coordinates of the object. Rather than using a rectangular bounding box, we locate the item using a polygon</li></ol><p>The task we will be performing is instance segmentation. This will allow us to precisely locate the trash items and pass those coordinates onto a downstream application. While this will not be covered in this tutorial a downstream application could be an autonomous system that grabs those trash items or, a calculation that quantifies how much trash is present in a given area using areal images.</p><p>Now that we’re all set with the data, we will go ahead and train our model. The full training code can be found in this <a href="https://github.com/natasha-savic-msft/trash_recycling_computer_vision/tree/main"><strong>repository</strong></a>. In order to train a model, we will perform 2 steps:</p><ol><li>Pre-process the data that comes in the COCO file format into JSONL</li><li>Train the model using Azure ML’s Python v2 SDK (preview)</li></ol><p><strong>The concepts</strong></p><p>The data pre-processing and all necessary steps can be understood from <a href="https://github.com/natasha-savic-msft/trash_recycling_computer_vision/blob/main/model_training_automl/1_automl_data_preprocessing.ipynb"><strong>this notebook</strong></a><strong> </strong>. You can git clone this repository directly into your Azure ML workspace by following <a href="https://learn.microsoft.com/en-us/azure/machine-learning/concept-train-model-git-integration"><strong>those instructions</strong></a><strong> </strong>. As all code is explained in the notebook, I will rather focus on explaining a few concepts.</p><ul><li><strong>JSONL file:</strong> The JSONL format are dictionaries that are separated by a new line. This is the only format that AutoML for images accepts. You can imagine Azure AutoML as an API that receives the data in this standardised file format.</li><li><strong>AutoML for images</strong>: Extensive documentation of Azure ML’s AutoML can he found <a href="https://learn.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models?tabs=cli">here</a></li><li><strong>AzureML Python SDK v2 </strong>(preview): This SDK comes with a few significant changes. For example, it introduces a concept called the ML Client that is used across multiple tasks / jobs that can be launched either through the Python SDK or the command line interface (CLI). It allows you to register datasets, launch jobs (previously known as experiments), track jobs, author components or, pipelines and much more through one unified class. More can be found <a href="https://learn.microsoft.com/en-us/python/api/azure-ai-ml/azure.ai.ml.mlclient?view=azure-python-preview">here</a>.</li></ul><p><strong>The training</strong></p><p>The very core of this entire tutorial, the model training, is surprisingly short and easy. <a href="https://github.com/natasha-savic-msft/trash_recycling_computer_vision/blob/main/model_training_automl/2_automl_training.ipynb"><strong>This notebook</strong></a> explains the different configuration options as well as hyperparameter tuning options. To launch your AutoML run, the following code snippet will do the job. It uses a <strong>Mask R-CNN backbone</strong> (just as Apple’s new camera roll feature does). Within the configuration you can also swap the “maskrcnn_resnet50_fpn” for a different network size such as “maskrcnn_resnet101_fpn”.</p><pre><strong>from</strong> azure.ai.ml <strong>import</strong> automl</pre><pre><em># Create the Instance Segmentation AutoML job</em><br><br>image_instance_segmentation_job <strong>=</strong> automl<strong>.</strong>image_instance_segmentation(<br>    compute<strong>=</strong>compute_name,<br>    experiment_name<strong>=</strong>exp_name,<br>    training_data<strong>=</strong>my_training_data_input,<br>    validation_data<strong>=</strong>my_validation_data_input,<br>    target_column_name<strong>=</strong>&quot;label&quot;,<br>)<br><br>image_instance_segmentation_job<strong>.</strong>set_limits(timeout_minutes<strong>=</strong>700) <em>#The larger the dataset, the larger the timeout. </em><br><br>image_instance_segmentation_job<strong>.</strong>set_image_model(model_name<strong>=</strong>&quot;maskrcnn_resnet50_fpn&quot;)</pre><pre><em># Submit the AutoML job</em><br>returned_job <strong>=</strong> ml_client<strong>.</strong>jobs<strong>.</strong>create_or_update(image_instance_segmentation_job)</pre><pre><em># Stream the AutoML job progress</em><br>ml_client<strong>.</strong>jobs<strong>.</strong>stream(returned_job<strong>.</strong>name)</pre><p>Once you have submitted your job, you can monitor it in the UI which could look something like below. You can expect your model to train multiple hours (4.5 in my case). What is especially useful is that AutoML already creates all artefacts that can be used to later deploy your model such as the environment configuration, model file, scoring script etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ny5gU8qMK1XxU7cON5iaaw.png" /><figcaption>AutoML job summary</figcaption></figure><p>The results of the model are not perfect but also not too bad which was expected. When following the tutorial, you can see that there is a strong class imbalance between the different trash item classes. Some trash items like bottles are very frequent while batteries are highly infrequent. To improve the results, you can try a hyperparameter sweep and/or different network configurations as provided in the code samples. Also, you could collect images of the infrequent classes and label them yourself using <a href="https://learn.microsoft.com/en-us/azure/machine-learning/how-to-label-data">AzureML’s labelling capability</a>.</p><p><strong>The deployment</strong></p><p>Now that your model is trained, we can deploy it through the SDK as well as through the UI using a <a href="https://learn.microsoft.com/en-us/azure/machine-learning/concept-endpoints">managed endpoint</a>.</p><pre>online_endpoint_name <strong>=</strong> endpoint<strong>.</strong>name<br>deployment_name <strong>=</strong> &quot;trash-segmentation-granular&quot;<br><br>deployment <strong>=</strong> ManagedOnlineDeployment(<br>    name<strong>=</strong>deployment_name,<br>    endpoint_name<strong>=</strong>online_endpoint_name,<br>    model<strong>=</strong>registered_model<strong>.</strong>id,<br>    instance_type<strong>=</strong>&quot;Standard_DS3_V2&quot;,<br>    instance_count<strong>=</strong>1,<br>    liveness_probe<strong>=</strong>ProbeSettings(<br>        failure_threshold<strong>=</strong>30,<br>        success_threshold<strong>=</strong>1,<br>        timeout<strong>=</strong>2,<br>        period<strong>=</strong>10,<br>        initial_delay<strong>=</strong>2000,<br>    ),<br>    readiness_probe<strong>=</strong>ProbeSettings(<br>        failure_threshold<strong>=</strong>10,<br>        success_threshold<strong>=</strong>1,<br>        timeout<strong>=</strong>10,<br>        period<strong>=</strong>10,<br>        initial_delay<strong>=</strong>2000,<br>    ),<br>)</pre><pre><em># This may take 30 minutes</em><br>ml_client<strong>.</strong>online_deployments<strong>.</strong>begin_create_or_update(deployment)</pre><p>It might take a bit of time to deploy the model but once done, you can start embedding the endpoint into an application of your liking (App, Edge device etc.) and get started sorting trash!</p><p><strong>The end</strong></p><p>Thank you for reading though this tutorial. All code samples can be found under:</p><ul><li><a href="https://github.com/natasha-savic-msft/trash_recycling_computer_vision">natasha-savic-msft/trash_recycling_computer_vision (github.com)</a></li></ul><p>You can also follow me on <a href="https://www.linkedin.com/in/natasha-savic/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=951a9717c26c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>