<?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 Mohd Shakeb Umar on Medium]]></title>
        <description><![CDATA[Stories by Mohd Shakeb Umar on Medium]]></description>
        <link>https://medium.com/@shakeb_umar?source=rss-71dcaa3da8ce------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hxR6yMw-tZ96HvswcCXRug.png</url>
            <title>Stories by Mohd Shakeb Umar on Medium</title>
            <link>https://medium.com/@shakeb_umar?source=rss-71dcaa3da8ce------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 23:08:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shakeb_umar/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[Unlocking Conversational AI Diversity: Beyond GPT — Exploring Alternative Models and Techniques]]></title>
            <link>https://medium.com/@shakeb_umar/unlocking-conversational-ai-diversity-beyond-gpt-exploring-alternative-models-and-techniques-8249be05c77c?source=rss-71dcaa3da8ce------2</link>
            <guid isPermaLink="false">https://medium.com/p/8249be05c77c</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Mohd Shakeb Umar]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 19:49:07 GMT</pubDate>
            <atom:updated>2023-10-12T19:49:07.416Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unlocking Conversational AI Diversity: Beyond GPT — Exploring Alternative Models and Techniques</h3><p>In the rapidly evolving landscape of conversational artificial intelligence (AI), there exists a wide spectrum of approaches and methodologies that extend far beyond the towering presence of Large Language Models (LLMs) like GPT. While LLMs have undeniably demonstrated impressive prowess in natural language generation, it’s essential to recognize that they are but one facet of this multifaceted field. From rule-based systems to memory networks, from transfer learning to domain-specific models, the universe of conversational AI techniques is vast and dynamic. In this article we will go through some of these approaches</p><ol><li><strong>Rule-Based Systems:</strong> These systems are designed using predefined rules and patterns to respond to user inputs. Rule-based chatbots and virtual assistants can handle specific tasks effectively, but they may lack the flexibility and natural language understanding of LLMs.</li><li><strong>Sequence-to-Sequence Models:</strong> Sequence-to-sequence models, such as Recurrent Neural Networks (RNNs) and their variations (e.g., LSTM and GRU), are used to map input sequences to output sequences. They have been employed for tasks like machine translation and chatbot development.</li><li><strong>Memory Networks:</strong> Memory-augmented neural networks, like Neural Turing Machines and Memory Networks, are capable of maintaining context over longer conversations and can be used for building conversational systems.</li><li><strong>Intent Recognition and Slot Filling:</strong> Conversational AI can be developed by combining intent recognition models with slot filling techniques. These systems identify the user’s intent and extract relevant information from their input to fulfill a specific task.</li><li><strong>Reinforcement Learning (RL):</strong> RL can be used to train chatbots or virtual assistants by providing rewards based on user feedback. The model learns to optimize responses over time through trial and error.</li><li><strong>Hybrid Approaches:</strong> Many conversational AI systems combine multiple techniques, such as rule-based components for specific responses and ML/DL models for handling more general and context-rich conversations.</li><li><strong>Domain-Specific Models:</strong> Some applications may use custom ML or DL models tailored to specific domains, like healthcare or finance, to provide specialized conversational capabilities.</li><li><strong>Transfer Learning:</strong> Transfer learning techniques, which allow models to leverage knowledge from pre-trained models, can be applied to create conversational agents that learn from data in a specific domain or context.</li></ol><p>Comparison of these approaches when it comes to handling question and answer scenarios, continuing conversation and remembering user information:</p><figure><img alt="Pros and Cons of various approaches discussed" src="https://cdn-images-1.medium.com/max/1024/1*Sy_YW1gvYiIEcynvR969jg.png" /><figcaption>Pros and Cons of various approaches discussed</figcaption></figure><p>Eventually the choice of approach depends on the specific requirements of the conversational AI application. As it can be seen from the table, some approaches are better at handling question and answer (Q&amp;A) tasks, while others excel at continuing conversations and remembering user information.</p><p>Thank you for staying till the end :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8249be05c77c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Demystifying the Global Interpreter Lock (GIL): Unveiling Python’s Multithreading Limitations”]]></title>
            <link>https://medium.com/@shakeb_umar/demystifying-the-global-interpreter-lock-gil-unveiling-pythons-multithreading-limitations-8cfbc520feb4?source=rss-71dcaa3da8ce------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cfbc520feb4</guid>
            <category><![CDATA[cpython]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[gil]]></category>
            <category><![CDATA[global-interpreter-lock]]></category>
            <category><![CDATA[multithreading]]></category>
            <dc:creator><![CDATA[Mohd Shakeb Umar]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 19:30:16 GMT</pubDate>
            <atom:updated>2023-06-29T19:30:16.556Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*TBwzZzVwY-uKttHPkWSLTA.png" /><figcaption>Source: <a href="https://www.geeksforgeeks.org/multithreading-python-set-1/">https://www.geeksforgeeks.org/multithreading-python-set-1/</a></figcaption></figure><p>The Global Interpreter Lock (GIL) is a mechanism in the CPython interpreter, which is the default and most widely used implementation of Python. The GIL is a <strong><em>mutex </em></strong>(a lock) that allows only one native thread to execute Python bytecode at a time. This means that even in a multi-threaded Python program, only one thread can execute Python bytecode at any given moment.</p><p>The purpose of the GIL is to simplify memory management in CPython and protect data structures from concurrent access, ensuring thread safety. However, it also introduces some limitations and affects the performance of multi-threaded CPU-bound tasks.</p><p>To understand the GIL more clearly, consider the following points:</p><p>1. GIL and Python Threads: Python threads are managed by the operating system’s thread scheduler, which assigns CPU time to different threads. However, due to the GIL, only one Python thread can execute Python bytecode at a time, even if multiple threads are running on multiple CPU cores.</p><p>2. GIL and I/O-bound Tasks: The GIL has less impact on I/O-bound tasks where the threads spend most of their time waiting for I/O operations (such as reading from or writing to a file, making network requests, or accessing a database). In such cases, the GIL is often released during I/O operations, allowing other threads to run.</p><p>3. GIL and CPU-bound Tasks: The GIL has a more noticeable impact on CPU-bound tasks, where threads are primarily performing computations and not waiting for I/O. Since only one thread can execute Python bytecode at a time, multi-threaded CPU-bound tasks may not achieve full parallelism and may not fully utilize multiple CPU cores. This limitation can affect performance in scenarios where significant CPU processing is required.</p><p>Here’s a simplified example to illustrate the GIL’s effect on CPU-bound tasks:</p><pre>import threading<br><br>counter = 0<br><br>def increment():<br>    global counter<br>    for _ in range(1000000):<br>        counter += 1<br><br>def decrement():<br>    global counter<br>    for _ in range(1000000):<br>        counter -= 1<br><br># Create two threads to increment and decrement the counter simultaneously<br>t1 = threading.Thread(target=increment)<br>t2 = threading.Thread(target=decrement)<br><br>t1.start()<br>t2.start()<br><br>t1.join()<br>t2.join()<br><br>print(&quot;Counter:&quot;, counter)</pre><p>In this example, two threads are created to increment and decrement a shared counter. However, due to the GIL, the threads cannot execute simultaneously. As a result, the final value of the counter may not be what you expect, and it can vary between different runs.</p><p>It’s important to note that the GIL is specific to the CPython interpreter. Other implementations of Python, such as Jython and IronPython, do not have a GIL and can achieve true multi-threading.</p><p>To overcome the GIL limitations in CPython, you can explore alternatives like using multiprocessing (which allows separate Python processes to utilize multiple CPU cores) or using asynchronous programming with libraries like asyncio for I/O-bound tasks. Additionally, you can leverage native extensions written in other languages (such as C/C++) or use multiple processes in combination with inter-process communication for CPU-bound tasks.</p><p>While the GIL presents challenges for certain types of applications, it’s worth noting that for many Python programs, especially those that involve I/O or are heavily dependent on external libraries, the GIL’s impact is minimal or negligible.</p><p>Reference: — <a href="https://www.geeksforgeeks.org/multithreading-python-set-1/">https://www.geeksforgeeks.org/multithreading-python-set-1/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cfbc520feb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unleashing the Magic: Exploring Dunder Methods in Python Programming]]></title>
            <link>https://medium.com/@shakeb_umar/unleashing-the-magic-exploring-dunder-methods-in-python-programming-28ec4eff169b?source=rss-71dcaa3da8ce------2</link>
            <guid isPermaLink="false">https://medium.com/p/28ec4eff169b</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[object-oriented]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Mohd Shakeb Umar]]></dc:creator>
            <pubDate>Wed, 28 Jun 2023 20:00:21 GMT</pubDate>
            <atom:updated>2023-06-28T20:00:21.979Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to the world of Python programming! Lets learn about “Dunder Methods”, also known as “magic methods” in Python. Dunder methods provide a way of enhancing the functionality of classes in Python. They are special type of methods that have two underscores before and after their names.</p><p>Dunder methods are used to create custom behavior for objects in Python. For example, when an object is printed, the __str__ method is used to get a string representation of the object. Similarly, when an object is added, the __add__ method is used to calculate the result. In this way, dunder methods enable developers to write code that behaves differently based on the type of objects it is operating on.</p><p>Let’s look at an example of a dunder method in action. Suppose we have a Student class which has two attributes: name and age. To get a string representation of a Student object, we can write a __str__ method to give us a nice output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*_zHyknETmuTjBHurgLskGw.png" /></figure><p>In the code above, we have created a Student class with two attributes (name and age). We then defined a __str__ method which will be called when we try to print the Student object. This method returns a string with the name and age of the student. As you can see, the use of dunder methods makes it easy to define custom behavior for our objects.</p><p>Apart from __str__, there are many other dunder methods that can be used to create custom behavior for objects in Python. Some other examples include:</p><ol><li>__len__ for getting the length of an object</li><li>__add__ for addition</li><li>__getitem__ for indexing</li><li>__call__ for calling a function.</li></ol><p>Each of these methods provides a different way of customizing objects in Python.</p><p>In addition to providing custom behavior for objects, dunder methods can also be used to make our code more readable and maintainable. By using dunder methods, we can easily distinguish between regular methods and special ones that provide certain functionality for our objects. This makes it much easier to locate and modify these special methods when needed, as they are clearly marked with two underscores before and after their names.</p><p>Overall, dunder methods provide a powerful way of customizing objects in Python in order to create more complex and useful applications. By using dunder methods, we can easily define custom behavior for our objects and make our code more readable and maintainable. So if you’re working on a project that requires customizing objects in Python, make sure to take advantage of dunder methods!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28ec4eff169b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>