<?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 Archish Patel on Medium]]></title>
        <description><![CDATA[Stories by Archish Patel on Medium]]></description>
        <link>https://medium.com/@archish9?source=rss-3cac4f9f4e10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fx5qJqgUuLTWOf_8tLM1IA.jpeg</url>
            <title>Stories by Archish Patel on Medium</title>
            <link>https://medium.com/@archish9?source=rss-3cac4f9f4e10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 04 Jun 2026 00:24:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@archish9/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[Little Bots, Smart Thoughts]]></title>
            <link>https://archish9.medium.com/little-bots-smart-thoughts-2f1b88c303d3?source=rss-3cac4f9f4e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f1b88c303d3</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-model]]></category>
            <dc:creator><![CDATA[Archish Patel]]></dc:creator>
            <pubDate>Sat, 03 May 2025 06:39:33 GMT</pubDate>
            <atom:updated>2025-05-03T06:39:33.083Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q5mxN0GpTKRjYteM" /><figcaption>Photo by <a href="https://unsplash.com/@drscythe?utm_source=medium&amp;utm_medium=referral">Dominik Scythe</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>The past few years have been a blast for artificial intelligence, with large language models (LLMs) stunning everyone with their capabilities and powering everything from chatbots to code assistants.</p><p>However, not all applications demand the massive size and complexity of LLMs, the computational power required makes them impractical for many use cases.</p><p>This is why Small Language Models (SLMs) or Medium Language Models (MLMs) entered the scene to make powerful AI models more accessible by shrinking in size.</p><h3><strong>So, What are these SLMs or MLMs?</strong></h3><blockquote>Imagine a language model is like a robot that can read and talk, kind of like a talking toy.</blockquote><p><strong>A small language</strong> <strong>model</strong> is like a tiny robot that knows some words and can answer simple questions or tell short stories. It’s fast and doesn’t eat much battery!</p><p><strong>A big language model</strong> is like a super big robot with a giant brain. It knows lots and lots of words, can talk about anything, and tell really long stories. But it needs a lot more power and space to work.</p><p><strong>Small model = tiny robot helper<br>Big model = giant robot storyteller</strong></p><p>Small language models (SLMs) are compact, efficient, and don’t need massive servers. They’re built for speed and real-time performance and can run on smartphones, tablets, or smartwatches.</p><h3>How Are They Made Small?</h3><p>Let’s stick with our robot toy example to explain how big robots are made into small robots (small language models)</p><p>Imagine a big robot made of LEGO blocks. 🧱<br>It’s huge and heavy because it has lots of blocks (that’s like the “parameters” in a language model).</p><p>To make it smaller, we do a few things:</p><p><strong>1. Take away the extra blocks</strong><br>Just like removing LEGO pieces you don’t need, we remove parts of the model that don’t help very much. This is called pruning.</p><p><strong>2. Squish the blocks</strong><br>We make the robot use smaller blocks so it takes up less space. That’s called quantization — it uses smaller numbers to do the same thinking.</p><p><strong>3. Teach it faster</strong><br>Instead of teaching the robot everything from scratch, we start with the big robot and train a tiny one to copy what it knows. That’s called knowledge distillation — like a big teacher robot teaching a smaller student robot.</p><p><strong>4. Use fewer layers</strong><br>Big robots have many thinking parts stacked up. Small robots have fewer layers, so they think faster, but maybe not as deeply.</p><p>So, in short, we make small language models by:</p><ul><li><strong><em>Cutting out extra stuff</em></strong></li><li><strong><em>Shrinking the parts</em></strong></li><li><strong><em>Learning from the big models</em></strong></li><li><strong><em>Using fewer thinking steps</em></strong></li></ul><h3>So, when to use SLMs or MLMs?</h3><ol><li><strong>Resource-Constrained Environments:</strong></li></ol><ul><li><strong>Mobile Applications:</strong> SLMs can power on-device language processing features like text prediction, voice commands, and translation without relying on constant internet connectivity.</li><li><strong>IoT and Edge Devices:</strong> They can provide natural language interfaces and intelligent data processing for smarter, more responsive edge computing.</li><li><strong>Embedded Systems:</strong> SLMs can enable natural language interfaces in various devices.</li></ul><p><strong>2. Specific Tasks and Applications:</strong></p><ul><li><strong>Chatbots and Virtual Assistants:</strong> SLMs are well-suited for creating efficient and engaging chatbots for customer service and other interactions.</li><li><strong>Language Translation: </strong>They can facilitate real-time language translation, bridging linguistic gaps in international communications.</li><li><strong>Sentiment Analysis:</strong> SLMs can analyze text and sentiment, helping businesses understand public opinion and customer feedback.</li><li><strong>Content Moderation:</strong> They can be used for tasks like identifying offensive or inappropriate content.</li><li><strong>Named Entity Recognition:</strong> SLMs can identify and extract key entities from text, such as people, organizations, and locations.</li><li><strong>Text Summarization:</strong> They can condense large amounts of text into concise summaries.</li><li><strong>Domain-Specific Tasks:</strong> SLMs can be fine-tuned for specific industries, such as medical transcription, invoice processing, or legal document analysis.</li></ul><h3><strong>Let’s see a few SLMs and MLMs:</strong></h3><p><strong>1. Qwen2: 0.5B, 1B, and 7B</strong><br>Qwen2 it’s a family of models, with sizes that go from 0.5 billion to 7 billion parameters. If you’re working on an app that needs a super lightweight model, the 0.5B version is perfect.</p><p>Parameters: 0.5 billion, 1 billion, and 7 billion versions<br>Access: <a href="https://huggingface.co/Qwen">https://huggingface.co/Qwen</a><br>Open source: Yes, with an open-source license</p><p><strong>2. Mistral Nemo 12B</strong><br>With 12 billion parameters, Mistral Nemo 12B model is great for complex NLP tasks like language translation and real-time dialogue systems. It competes with models like Falcon 40B and Chinchilla 70B, but it can still run locally without a massive infrastructure setup. It’s one of those models that balances complexity with practicality.</p><p>Parameters: 12 billion<br>Access: <a href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2">https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2</a><br>Open source: Yes, with an Apache 2.0 license</p><p><strong>3. Llama 3.1 8B</strong><br>Moving on to Llama 3.1 8B, this model has 8 billion parameters, and it provides an amazing balance between power and efficiency. It’s great for tasks like question answering and sentiment analysis.</p><p>Parameters: 8 billion<br>Access: <a href="https://ollama.com/library/llama3">https://ollama.com/library/llama3</a><br>Open source: Yes, but with usage restrictions</p><p><strong>4. Pythia</strong><br>Let’s talk about the Pythia series, a set of models ranging from 160 million to 2.8 billion parameters, designed for reasoning and coding skills tasks. If you’re into software development, Pythia is great for handling structured, logic-based tasks where accuracy and logic are key. It’s perfect for coding environments where you need the model to think in a structured, logical way.</p><p>Parameters: 160M — 2.8B<br>Access: <a href="https://github.com/EleutherAI/pythia">https://github.com/EleutherAI/pythia</a><br>Open Source: Yes</p><p><strong>5. TinyLlama</strong><br>Let’s talk about TinyLlama, a compact model with 1.1 billion parameters that performs really well for its size. It’s designed for efficiency, and it is perfect for devices that can’t handle the heavy computational load of larger models.</p><p>Parameters: 1.1B<br>Access: <a href="https://github.com/tinyLlama">https://github.com/tinyLlama</a><br>Open source: Yes</p><p>Now, Lest finish this part of SLMs with advantages, and next we will code and see how to use SLMs or MLMs practically.</p><ol><li><strong>Low Compute Requirements:</strong> Can run on consumer laptops, edge devices, and mobile phones.</li><li><strong>Lower Energy Consumption:</strong> Efficient models reduce power usage, making them environmentally friendly.</li><li><strong>Faster Inference:</strong> Smaller models generate responses quickly, ideal for real-time applications.</li><li><strong>On-Device AI:</strong> No need for an internet connection or cloud services, enhancing privacy and security.</li><li><strong>Cheaper Deployment:</strong> Lower hardware and cloud costs make AI more accessible to startups and developers.</li><li><strong>Customizability:</strong> Easily fine-tuned for domain-specific tasks (e.g., legal document analysis).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f1b88c303d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced Python Design Patterns for Large-Scale Projects]]></title>
            <link>https://archish9.medium.com/advanced-python-design-patterns-for-large-scale-projects-e7342ef2067e?source=rss-3cac4f9f4e10------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7342ef2067e</guid>
            <category><![CDATA[scalability]]></category>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Archish Patel]]></dc:creator>
            <pubDate>Sun, 13 Apr 2025 09:57:20 GMT</pubDate>
            <atom:updated>2025-04-13T10:08:41.478Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nIJGI-UHcV1tbdCsdU4toQ.jpeg" /></figure><p>Think of “Advanced Python Design Patterns for Large-Scale Projects” as your <strong>blueprint book and advanced construction techniques</strong> for building really big and complex software in Python. It’s not just about writing code that works; it’s about writing code that:</p><ul><li><strong>Scales Effortlessly:</strong> Can handle a growing number of users, data, and features without collapsing under pressure.</li><li><strong>Stays Maintainable:</strong> Remains easy to understand, modify, and debug even as the codebase grows huge and multiple developers work on it.</li><li><strong>Is Flexible and Adaptable:</strong> Can be easily extended or changed to accommodate new requirements without requiring massive rewrites.</li><li><strong>Promotes Collaboration:</strong> Provides a common vocabulary and structure for developers to work together effectively.</li><li><strong>Handles Complexity:</strong> Helps break down intricate problems into manageable, well-organized components.</li></ul><p><strong>Here’s a breakdown of what “advanced” implies in this context:</strong></p><ul><li><strong>Beyond the Basics:</strong> These patterns go beyond simple object-oriented principles like classes and inheritance. They focus on how objects collaborate and how responsibilities are distributed within a large system.</li><li><strong>Addressing Specific Challenges:</strong> They tackle recurring problems that arise in large projects, such as managing dependencies, handling state, coordinating complex workflows, and optimizing performance.</li><li><strong>Emphasis on Abstraction and Decoupling:</strong> A key theme is reducing dependencies between different parts of the system. This makes it easier to change one component without affecting others, which is crucial in large, evolving codebases.</li><li><strong>Architectural Considerations:</strong> Some of these patterns blur the line between object-level design and higher-level architectural decisions. They influence how you structure the overall application.</li></ul><h3><strong>Why are they important for “Large-Scale Projects”?</strong></h3><ul><li><strong>Managing Complexity:</strong> Large projects inherently have more moving parts. Design patterns provide proven ways to organize this complexity.</li><li><strong>Preventing “Big Ball of Mud”:</strong> Without a clear structure, large projects can easily become tangled and difficult to maintain. Design patterns offer established architectures to avoid this.</li><li><strong>Improving Team Efficiency:</strong> When everyone on the team understands and uses common patterns, it leads to more consistent and predictable code, making collaboration smoother.</li><li><strong>Reducing Technical Debt:</strong> By applying sound design principles from the start, you can minimize the accumulation of technical debt, which can significantly slow down development in the long run.</li><li><strong>Ensuring Long-Term Viability:</strong> Well-designed large-scale applications are more resilient to change and have a longer lifespan.</li></ul><h3><strong>When to Use Advanced Design Patterns.</strong></h3><p>These patterns are most beneficial in larger, more complex projects where:</p><ul><li><strong>Maintainability is crucial:</strong> They help structure code in a way that’s easier to understand and modify.</li><li><strong>Flexibility and extensibility are required:</strong> They allow you to adapt to changing requirements without major rewrites.</li><li><strong>Loose coupling is desired:</strong> They reduce dependencies between components, making the system more resilient to change.</li><li><strong>Testability is important:</strong> Well-structured code is generally easier to test.</li></ul><p><strong>Think of it this way:</strong></p><p>Imagine building a small house. You might just figure it out as you go. But if you’re building a skyscraper, you absolutely need detailed blueprints, specialized construction techniques, and a clear understanding of how all the different systems (electrical, plumbing, structural) will work together. “Advanced Python Design Patterns for Large-Scale Projects” provides those blueprints and techniques for software development.</p><p><strong>In essence, it’s about applying sophisticated and time-tested solutions to the unique challenges of building and maintaining large and complex Python applications.</strong> It’s about thinking strategically about the structure and interactions within your codebase to ensure it remains robust, scalable, and maintainable over time.</p><p>It’s important to remember that design patterns are tools, not rules. Apply them judiciously when they solve a specific problem and make your code cleaner and more maintainable. Don’t force a pattern where a simpler solution would suffice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7342ef2067e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>