<?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 Muskan on Medium]]></title>
        <description><![CDATA[Stories by Muskan on Medium]]></description>
        <link>https://medium.com/@simplymuskan2014?source=rss-42da34c96613------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UvfaQv6c6VekuDIc4jhNvA.png</url>
            <title>Stories by Muskan on Medium</title>
            <link>https://medium.com/@simplymuskan2014?source=rss-42da34c96613------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:08:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@simplymuskan2014/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[InstructLab — Revolutionising the way LLMs are enhanced !]]></title>
            <link>https://medium.com/@simplymuskan2014/instructlab-revolutionising-the-way-llms-are-enhanced-f87980686c7b?source=rss-42da34c96613------2</link>
            <guid isPermaLink="false">https://medium.com/p/f87980686c7b</guid>
            <category><![CDATA[redhat-linux]]></category>
            <category><![CDATA[ibm]]></category>
            <category><![CDATA[ibm-watsonx]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[llm-finetuning]]></category>
            <dc:creator><![CDATA[Muskan]]></dc:creator>
            <pubDate>Sun, 26 May 2024 19:34:59 GMT</pubDate>
            <atom:updated>2024-05-26T19:34:59.907Z</atom:updated>
            <content:encoded><![CDATA[<h3>InstructLab — Revolutionising the way LLMs are enhanced !</h3><blockquote>Red Hat and IBM bring a unique solution to the table to enhance the alignment of large language models.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1lsPCOBhv726NNlnGbsKg.png" /><figcaption>The official mascot</figcaption></figure><p>Recently I was lucky to have a first crack at trying InstructLab because of an internal hackathon at IBM and it was definitely one of the coolest experiences. To understand what is InstructLab and why it is so groundbreaking, let’s understand how LLMs were enhanced in its absence.</p><h3>First let’s understand how LLM enhancements worked before InstructLab:</h3><ul><li>Fine tuning a large language model(LLM) to grasp a particular domain or skill set usually entails branching off an existing open model and conducting training. This training is not only <strong><em>resource-demanding</em></strong> but also<strong><em> computationally expensive.</em></strong> This process requires significant computational resources, such as GPU clusters or cloud computing instances, making it prohibitively costly for smaller organizations or those operating in resource-constrained environments.</li><li>Effective fine-tuning requires high-quality, task-specific, <strong><em>large amounts of human-generated datasets</em></strong>, which may not be readily available or may be expensive to acquire or annotate, particularly for individuals or low-resource languages.</li><li>Additionally there’s no way to incorporate improvements back to the upstream project(LLM), and thus no way for models to continuously improve from community contributions.Again fine-tuned LLMs can be large and complex models, making them challenging to deploy and integrate into production systems, especially in resource-constrained environments or edge devices.</li></ul><h3><strong>So what is InstructLab?</strong></h3><p>InstructLab is an open-source initiative dedicated to enhancing large language models (LLMs). This community-driven project offers a cost-effective solution for improving the alignment of LLMs, making it accessible even to those with minimal machine learning experience. By democratizing the process, InstructLab not only reduces costs but also invites broader participation, fostering innovation and collaboration across diverse skill levels.</p><blockquote>It can enhance an LLM using far less human-generated information and far fewer computing resources than are typically used to retrain a model.</blockquote><h3>How it works:</h3><ol><li>It is model-agnostic. It can provide supplemental skills and knowledge fine-tuning to an LLM of your choice.</li><li>You use ilab a Command-Line Interface (CLI) tool that allows you to download a pre-trained LLM and chat with it.</li><li>To update the pre-trained LLM with new knowledge and skills, simply add information to the<strong><em> companion taxonomy repository.</em></strong> This taxonomy consists of diverse, human-curated training data that serve as examples for the model. You can choose to focus on either knowledge or skills.</li><li>After you add your training examples in a specific easy-to-use format(yaml structured <strong><em>question-and-answer template), you can validate </em></strong>your new data.</li><li>Then the model is used to generate new examples based on the seed training data.</li><li>You also have an option to verify the files that have been created.</li><li>Finally, you can retrain the model based on the set of synthetic data.</li><li>You can test the newly trained model by running the command: ilab test.</li></ol><p>Now to answer the burning question:</p><h3>How is this different?</h3><p>The main answer to this is LAB method — Large-scale Alignment for chatBots.The LAB method includes two key components:</p><p>1. A taxonomy-guided synthetic data generation and quality assurance process that creates a diverse, high-quality instruction dataset without using proprietary LLMs like GPT-4 or extensive human curation.</p><p>2. A special training process that helps pre-trained LLMs learn new information and skills without forgetting what they already know.</p><p>Currently we have 2 refined models ( and their quantised version) available:</p><ol><li><strong><em>instructlab/granite-7b-lab</em></strong></li><li><strong><em>instructlab/merlinite-7b-lab</em></strong></li></ol><p>It was exciting for me to think of different usecases and train and test the model. Do give it a try this weekend if you got an hour or 2.</p><p>Sources:</p><ul><li><a href="https://github.com/instructlab/">https://github.com/instructlab/</a></li><li><a href="https://arxiv.org/abs/2403.01081">https://arxiv.org/abs/2403.01081</a></li><li><a href="https://www.ibm.com/blog/announcement/democratizing-large-language-model-development-with-instructlab-support-in-watsonx-ai/?utm_medium=OSocial&amp;utm_source=Linkedin&amp;utm_content=WXAWW&amp;utm_id=InstructLab2024May22">https://www.ibm.com/blog/announcement/democratizing-large-language-model-development-with-instructlab-support-in-watsonx-ai/?utm_medium=OSocial&amp;utm_source=Linkedin&amp;utm_content=WXAWW&amp;utm_id=InstructLab2024May22</a></li><li><a href="https://huggingface.co/instructlab">https://huggingface.co/instructlab</a></li><li><a href="https://instructlab.ai/">https://instructlab.ai/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f87980686c7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Catastrophic forgetting]]></title>
            <link>https://medium.com/@simplymuskan2014/catastrophic-forgetting-7f26192abd28?source=rss-42da34c96613------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f26192abd28</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-market]]></category>
            <dc:creator><![CDATA[Muskan]]></dc:creator>
            <pubDate>Sat, 09 Mar 2024 20:59:09 GMT</pubDate>
            <atom:updated>2024-03-09T20:59:09.112Z</atom:updated>
            <content:encoded><![CDATA[<p>What, Why and How we solve it … in lay man terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pitRoNv7ct1C-2UUn-DzKw.jpeg" /></figure><p><strong><em>Catastrophic forgetting</em></strong>, otherwise known as catastrophic interference, is one of the greatest concerns in the world of generative AI. It refers to the phenomenon in which a generative AI model abruptly “forgets” the specifics of how to perform a task it was previously trained on because of training for a new task.</p><p><em>So to put it simply, it is just like you and me when we try to cram hundreds of lecture slides one after the other during exam week — we tend to get confused and forget what we learnt. Quite catastrophic isn’t it, being able to recall the slide number but not the content- yikes!</em></p><p>In thw world of AI, models face a similar issue as well.To breakdown the problem:</p><ul><li><strong>Generative AI models</strong> are adept at learning from data and generating new content, like images, text, or music.</li><li>Training them typically involves adjusting <strong><em>internal parameters</em></strong> based on the data they are fed.This data can be massive amounts of text and code.</li><li>Catastrophic forgetting arises when training on new data <strong>disrupts these parameters</strong>, essentially overwriting the knowledge gained from previous tasks.</li><li>When an LLM is <strong>fine-tuned </strong>for a new task, like writing different kinds of creative content or translating languages, those adjustments can overwrite the knowledge it learned from its initial training.</li></ul><p>It has some major consequences:</p><ul><li><strong>Decline in performance:</strong> It hinders the model’s ability to retain knowledge from past experiences leading to a sudden decline in performance.</li><li><strong>Limited applicability:</strong> This hinders the ability of generative AI to learn sequentially and adapt to new situations.</li></ul><p>Let us consider an example:</p><p>I am training a large language model to create factual reports based on numerical data provided from turnovers of last financial year gathered from various companies. I want these report to be crisp and concise while being formal and factual. Later I decide to use the same model to work on a different use-case. Based on popular request i train the model to write creative advertisements in informal tone to attract customers for various domains of product. This could lead it to “forget” the formal structure and tone it learned for informative writing. The model might struggle to generate factual reports after being exposed extensively to creative writing prompts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ttzKjKHnrCK-EGRr9Yeh_g.jpeg" /></figure><p>Let us explore what are some of the methods researchers have come up with to solve this trying issue to make sure the potential of LLMs is not limited.</p><ul><li><strong>Rehearsal methods:</strong> Here, the LLM is exposed to old data (e.g., factual reports examples) alongside the new data (e.g., creative writing prompts) during training. This helps the model retain older skills while acquiring new ones.</li><li><strong>Parameter regularization:</strong> This restricts how much the LLM’s internal parameters can change during fine-tuning. It prevents the new task from completely overwriting the knowledge from previous tasks.</li><li><strong>FLAN</strong>: By combining few-shot learning and language modelling, FLAN helps LLMs learn new tasks efficiently while minimizing the risk of catastrophic forgetting.<br><em>a. FLAN uses few shot prompting based on the new task to adapt the model . This minimizes the disruption to the existing knowledge stored in the model’s parameters.</em><br><em>b. FLAN utilizes the power of language models. It first trains a large language model on a massive dataset. Then, when presented with a new task, FLAN fine-tunes the LLM parameters based on the few-shot examples of that task. You can read more about it </em><a href="https://blog.research.google/2021/10/introducing-flan-more-generalizable.html"><em>here:</em></a></li></ul><p>However LLMs are on an average at less risk of this phenomenon. This is because:</p><ol><li><strong>Limited Deployment of Continuously Learning AI: </strong>Most generative AI LLMs are deployed today for specific domains or are trained on vast amount of data that is not continuously updated, so there is less chance of overwriting.</li><li><strong>Internal Testing and Safeguards: </strong>Most developers today use the methods mentioned above to safeguard the LLMs against catastrophic forgetting to prevent public-facing failure.</li></ol><p><em>The field of generative AI is constantly evolving, and as more AI systems are designed for continuous learning, catastrophic forgetting might become a more prominent issue. Fortunately there is more awareness today and researchers are actively paying attention to the issue. The future AI models will definitely be able to learn and adapt without sacrificing their existing knowledge.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f26192abd28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Attention is all you need” Let me explain to why…]]></title>
            <link>https://medium.com/@simplymuskan2014/attention-is-all-you-need-let-me-explain-to-why-7838afec8686?source=rss-42da34c96613------2</link>
            <guid isPermaLink="false">https://medium.com/p/7838afec8686</guid>
            <category><![CDATA[attention-mechanism]]></category>
            <category><![CDATA[easy-to-understand]]></category>
            <category><![CDATA[attention]]></category>
            <category><![CDATA[simple-explanations]]></category>
            <category><![CDATA[transformers]]></category>
            <dc:creator><![CDATA[Muskan]]></dc:creator>
            <pubDate>Wed, 07 Feb 2024 05:38:15 GMT</pubDate>
            <atom:updated>2024-02-07T05:38:15.416Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Attention</strong> — a word you would see all over the internet. Did someone ever tell you , “<strong>oh you are very attention-seeking!</strong>”? Well guess what, apparently it’s actually very essential — umm, but in a different context- in the world of <strong>Neural Networks</strong>! Before I lose you, bear with me, let me explain it to you like you are 5.</blockquote><p>Attention is defined as ‘noticing something with great detail’. So what happens when you give yourself the attention you deserve? That’s when the magic happens — you blossom! With self-attention, you flourish, and so do the neural networks. The paper “Attention is all you need” was one of the revolutionary papers in the field, published back in 2016 by Ashish Vaswani et al.</p><p><em>So what is attention-mechanism?</em></p><p>An attention mechanism is a key concept in natural language processing that enables a model to focus on specific parts of input data when making predictions or decisions. Consider you want to summarize a big chunk of a reference essay to understand what the gist was. Ideally the summary should be informative as well as concise.Attention mechanisms come into play by allowing the model to focus on the most relevant parts of the input document while generating each word of the summary. It mimics the selective focus or attention mechanism found in <strong><em>human cognition</em></strong>. This enables the model to efficiently grasp contextual information and long-range dependencies. However it was observed such attention mechanisms were used along with other recurrent networks(more on that on a later).</p><p>So <strong>Transformer model architecture</strong> was proposed eschewing recurrence and instead relying entirely on an attention mechanism to draw global dependencies between input and output. Wait - that was a lot to process, let me break it down for a 5 year old:</p><p><em>Imagine you have</em><strong><em> a magic box</em></strong><em> that can understand and talk about stories. This magic box has two parts: the listener and the storyteller.</em></p><p><em>The listener listens to a story and understands each part of it very well. It then gives this understanding to the storyteller, which then uses it to tell a new story. The storyteller can make up new stories based on what it learned from listening.</em></p><p><em>Inside each part of the magic box, there are special layers that help it pay attention to different parts of the story and understand how they relate to each other. These layers make sure the magic box can handle long and complicated stories. The listener takes in a story, understands it, and passes that understanding to the storyteller, which creates a new story based on what it learned.</em></p><p><em>So, the magic box, called a Transformer model, is like a smart friend who listens to a story, understands it really well, and then tells a new story based on what it heard.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*UfZ40pMW45gdHmhL48ilqA.png" /></figure><p>The most exciting thing about our magic box model is the <strong><em>attention visualization</em> </strong>— it’s like looking at colorful pictures that show how well the box pays attention to different parts of a story. Remember how the magic box has a listener and a storyteller inside? Well, these visualizations highlight which parts of the story the listener focuses on the most.</p><p>These pictures are important because they help us see how the magic box understands things like the order of events (<strong><em>syntax</em></strong>) and the meaning of words (<strong><em>semantics</em></strong>) in a story. By looking at these visualizations, we can learn how the magic box processes one part of the story at a time and how it puts everything together to tell a new and interesting story.</p><p>So, it’s like having a magical friend who not only listens and tells stories but also shows us colourful pictures to explain how it understands the words and sentences in those stories. It’s like a special peek into the magic happening inside the box!</p><p>So the takeaway is that the transformer model is highly scalable ,uses parallel processing (enhancing training speed)- making it highly efficient as well as it has improved contextual understanding.No wonders, this magical friend named “Transformer” is so popular in the world of Neural Networks!</p><p><em>See you next Wednesday with a different jargon!</em></p><p>References:</p><ol><li><a href="https://arxiv.org/pdf/1706.03762.pdf">https://arxiv.org/pdf/1706.03762.pdf</a></li><li><a href="https://medium.com/@dminhk/attention-is-all-you-need-summary-6f0437e63a91">https://medium.com/@dminhk/attention-is-all-you-need-summary-6f0437e63a91</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7838afec8686" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>