<?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 Akash Nagarkar on Medium]]></title>
        <description><![CDATA[Stories by Akash Nagarkar on Medium]]></description>
        <link>https://medium.com/@akash.nagarkar?source=rss-bb0bf42eb07b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3UeFBpUKnUugspZy</url>
            <title>Stories by Akash Nagarkar on Medium</title>
            <link>https://medium.com/@akash.nagarkar?source=rss-bb0bf42eb07b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 07:23:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akash.nagarkar/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[Microsoft’s Orca 2: A Leap Forward in AI Reasoning]]></title>
            <link>https://medium.com/ml-abeja/microsofts-orca-2-a-leap-forward-in-ai-reasoning-6f8aae65e567?source=rss-bb0bf42eb07b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f8aae65e567</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Akash Nagarkar]]></dc:creator>
            <pubDate>Fri, 26 Jan 2024 09:56:54 GMT</pubDate>
            <atom:updated>2024-01-26T09:56:54.225Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In June 2023, Microsoft made waves in the AI community with the release of a groundbreaking paper “Orca: Progressive Learning from Complex Explanation Traces of GPT-4”. in that paper the researchers showed that a smaller 13 billion parameter model can outperform much bigger models including chat GPT and BARD on certain benchmarks. Recently, Microsoft announced the release of Orca 2 with not only a research paper but also releasing the model weights which is a great news for the open source community. In this blog post, we will go through the technical details of Orca 2, the second version of Microsoft’s AI model, equipped with remarkable reasoning capabilities.</p><h3>Orca 2: A Closer Look</h3><p>The key highlight of Orca 2 is its ability to outperform much larger models. Orca 2, boasting a 13 billion parameter model, consistently outperforms a 70 billion parameter model on reasoning capabilities, showcasing its impressive prowess.</p><h4>Understanding Orca 2’s Training Approach</h4><p>The paper, titled “Orca 2: Teaching Small Language Models How to Reason,” focuses on enhancing the reasoning abilities of smaller models. Researchers at Microsoft contend that excessive emphasis on imitating large models may restrict the potential of smaller models. Unlike traditional approaches relying on imitation learning, Orca 2 introduces various reasoning techniques. These include step-by-step recall, direct answer generation, and tailored solution strategies for different tasks. The emphasis is on empowering smaller models to employ diverse solution strategies, not limited to imitating larger models.</p><h4>Benchmarks and Performance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzV7dSKYCHq-2rPbwWhaLg.png" /></figure><p>Orca 2’s performance speaks volumes about its training methodology. The above results showcase its superior reasoning capabilities. The 13 billion parameter Orca-2 model consistently outperforms the 70 billion parameter LLAMA-2 model on almost all the reasoning benchmarks. The 70 billion parameter WizardLM outperforms Orca-2 on the GSM8K benchmark, however Orca-2-13B is at-par when it comes to other metrics. The results highlight the effectiveness of the unique training strategies employed by Microsoft.</p><h4>Running Orca 2 Locally</h4><p>For those eager to explore Orca 2 locally, the process is made simple. Using the Transformer package in Python, you can load the model weights and unleash its capabilities. Additionally, Microsoft offers LM Studio, a user-friendly interface for testing large language models. In this blog, let us explore the step-by-step process of inferencing with Hugging Face library.</p><p>Step 1: Import and set-up</p><pre>import torch<br>import transformers<br><br>if torch.cuda.is_available():<br>    torch.set_default_device(&quot;cuda&quot;)<br>else:<br>    torch.set_default_device(&quot;cpu&quot;)</pre><p>Step 2: Load the Orca-2–13b language model using the AutoModelForCausalLM class from the Hugging Face Transformers library.</p><pre>model = transformers.AutoModelForCausalLM.from_pretrained(&quot;microsoft/Orca-2-13b&quot;, device_map=&#39;auto&#39;)</pre><p>Step 3: Load the tokenizer associated with the Orca-2–13b model. The use_fast=False argument ensures that the slow tokenizer is used</p><pre>tokenizer = transformers.AutoTokenizer.from_pretrained(<br>        &quot;microsoft/Orca-2-13b&quot;,<br>        use_fast=False,<br>    )</pre><p>Step 4: Create a conversation prompt by combining system, user, and assistant messages.</p><pre>system_message = &quot;You are an AI language model. You are a cautious and polite \<br>                  assistant. Please carefully follow the user&#39;s instructions.&quot;<br><br>user_message = &quot;What came first, the chicken or the egg?&quot;<br><br>prompt = f&quot;system\n{system_message}\nuser\n{user_message}\nassistant&quot;</pre><p>Step 5: Tokenize the prompt and generate a response from the Orca-2–13b model.</p><pre>inputs = tokenizer(prompt, return_tensors=&#39;pt&#39;)<br>output_ids = model.generate(inputs[&quot;input_ids&quot;],)<br>answer = tokenizer.batch_decode(output_ids)[0]<br><br>print(answer)</pre><p>In summary, the above code demonstrates how to use the Microsoft Orca-2–13b model for conversational AI tasks, handling conversations and generating responses based on user input. From philosophical inquiries about the chicken and the egg to practical questions on AI investments, Orca 2 provides insightful and well-reasoned responses. The model’s ability to analyze market criteria and offer potential investment considerations demonstrates its practical utility.</p><h4>Orca 2’s Licensing and Availability</h4><p>It’s crucial to note that Orca 2 is licensed under Microsoft Research License for research purposes. While not suitable for commercial use, the base Llama 2 model, on which Orca 2 is fine-tuned, is licensed for commercial purposes. Understanding the licensing terms will ensure compliance with usage guidelines.</p><h3>Conclusion</h3><p>Microsoft’s Orca 2 emerges as a game-changer in the realm of AI reasoning, pushing the boundaries of what smaller models can achieve. The combination of innovative training techniques, impressive benchmarks, and user-friendly accessibility makes Orca 2 a valuable asset for researchers and developers alike. As we explore the landscape of AI advancements, Orca 2 stands as a testament to Microsoft’s commitment to pushing the frontiers of artificial intelligence.</p><h3>References</h3><ol><li>Microsoft Research (2023) “Orca: Progressive Learning from Complex Explanation Traces of GPT-4” <a href="https://arxiv.org/pdf/2306.02707.pdf">Link to paper</a></li><li>Microsoft Research (2023) “Orca 2: Teaching Small Language Models How to Reason” <a href="https://arxiv.org/pdf/2311.11045.pdf">Link to paper</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f8aae65e567" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ml-abeja/microsofts-orca-2-a-leap-forward-in-ai-reasoning-6f8aae65e567">Microsoft’s Orca 2: A Leap Forward in AI Reasoning</a> was originally published in <a href="https://medium.com/ml-abeja">ML@ABEJA</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplifying Data Management with Data Version Control (DVC)]]></title>
            <link>https://medium.com/@akash.nagarkar/simplifying-data-management-with-data-version-control-dvc-6342bf44948c?source=rss-bb0bf42eb07b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6342bf44948c</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-version-control]]></category>
            <dc:creator><![CDATA[Akash Nagarkar]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 07:53:42 GMT</pubDate>
            <atom:updated>2023-09-06T08:51:49.350Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Data Version Control, also known as DVC, is a robust tool designed to address the challenges of managing and tracking data in data science and machine learning projects. It integrates seamlessly with existing software engineering practices and is built on top of Git, which is a popular version control system. DVC allows data scientists and machine learning engineers to efficiently manage large datasets, ensure project reproducibility, and collaborate effectively. It extends version control concepts beyond code to include data files, making it an essential tool for projects where data plays a significant role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g8vc7xvz9NXcV3zkkDrsbA.jpeg" /></figure><h3>Advantages of Using DVC:</h3><ol><li><strong>Efficient Data Versioning</strong>: DVC enables you to version your data just like you version your code. This means you can track changes, revert to previous versions, and collaborate on data files with team members.</li><li><strong>Reproducibility</strong>: With DVC, you can ensure that your experiments and analyses are reproducible. By linking data files to specific code versions, you can recreate any analysis at a later time.</li><li><strong>Smarter Storage</strong>: DVC doesn’t store your actual data files, but rather lightweight pointers to those files. This means you can work with large datasets without worrying about consuming excessive storage space.</li><li><strong>Collaboration</strong>: DVC simplifies collaboration by allowing team members to share and track data changes easily. It works seamlessly with Git, making it a natural extension of your version control workflow.</li><li><strong>Data and Model Versioning</strong>: DVC goes beyond data versioning — it also supports model versioning. This means you can track the evolution of your models alongside the data they were trained on.</li></ol><h3>Code Implementation</h3><p>Now, we will walk through a step-by-step code implementation example of core DVC features, including adding data sets, tracking changes, pushing to remote storage, and using Git to manage versions. By the end of this guide, you’ll have a solid understanding of how DVC can enhance your data and model versioning workflow.</p><p>For reference, here is the link to the official DVC Github repository — <a href="https://github.com/iterative/dvc">https://github.com/iterative/dvc</a></p><p>The first step is installing dvc on your system (Install using <strong>pip install dvc</strong>)</p><p><strong>Step 1: Initializing Git and DVC</strong></p><p>To get started, open your terminal and create a new directory for your project. Navigate to the directory and run the following commands:</p><pre>mkdir dvc_example<br>cd dvc_example<br><br># Initialize Git repository<br>git init<br># Initialize DVC repository<br>dvc init</pre><p><strong>Step 2: Adding Data Sets with DVC</strong></p><p>In this step, we’ll use the ‘<strong>dvc get’ </strong>command to fetch a sample data set from a data registry and add it to our project.</p><pre># Create a data directory<br>mkdir data<br><br># Use dvc get to fetch a data set and place it in the data directory<br>dvc get https://example-data-registry/data.xml data/</pre><p><strong>Step 3: Tracking Data Changes with DVC</strong></p><p>The next step is to add the data set to DVC tracking and commit the changes.</p><pre># Add the data set to DVC tracking<br>dvc add data/data.xml<br><br># Commit the changes<br>git add data/.gitignore data.xml.dvc<br>git commit -m &quot;Add data set to DVC&quot;</pre><p><strong>Step 4: Pushing to Remote Storage (Google Drive)</strong></p><p>We will now set up remote storage using Google Drive and push our data set to it. The remote storage can be any other storage and does not have to be limited to Google Drive.</p><pre># Add a DVC remote (Replace &#39;YOUR_GOOGLE_DRIVE_ID&#39; with your Google Drive folder ID)<br>dvc remote add -d storage gdrive://YOUR_GOOGLE_DRIVE_ID<br><br># Push the data set to the remote storage<br>dvc push</pre><p><strong>Step 5: Pulling Data from Remote Storage</strong></p><p>In this step, we’ll simulate removing the data set and then pull it back from remote storage using DVC.</p><pre># Simulate removing the data set and clearing DVC cache<br>rm data/data.xml<br>dvc gc -c<br><br># Pull the data set back from remote storage<br>dvc pull</pre><p><strong>Step 6: Changing Data Set and Versioning</strong></p><p>Let’s try implementing the following tasks — modify the data set, track the changes with DVC, and version it using Git.</p><pre># Create a new version of the data set (double the size)<br>cp data/data.xml data/data_double.xml<br><br># Add the new version to DVC tracking<br>dvc add data/data_double.xml<br><br># Commit the changes to Git and DVC<br>git add data/.gitignore data_double.xml.dvc<br>git commit -m &quot;Add new data set version&quot;</pre><p><strong>Step 7: Using Git to Manage Versions</strong></p><p>Now, we’ll use Git to switch between different versions of the data set.</p><pre># Check out a previous version using Git<br>git checkout HEAD~1 data/.gitignore data_double.xml.dvc<br><br># Use DVC to checkout the corresponding data set version<br>dvc checkout</pre><p>Congratulations! You’ve successfully implemented core features of Data Version Control (DVC) in your project. In this article we learned how to add data sets, track changes, push to remote storage, and use Git to manage versions.DVC is a valuable tool for effectively managing and versioning your data and models, enhancing collaboration, and improving your overall workflow in data science projects.</p><h3><strong>Conclusion</strong></h3><p>DVC is a versatile tool that can greatly simplify the process of managing and versioning data sets and models in your machine learning projects. By integrating DVC with Git, you can ensure the reproducibility and traceability of your experiments while efficiently managing large data sets and models.</p><p>Give DVC a try in your next project, and experience the benefits of streamlined data version control. Let us know what you would like to learn next. Until then, Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6342bf44948c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>