<?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 Mohammed Luqmaan on Medium]]></title>
        <description><![CDATA[Stories by Mohammed Luqmaan on Medium]]></description>
        <link>https://medium.com/@mohammedluqmaan29?source=rss-d7cb0626a149------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*L_7q5UmgKCQM0FUg</url>
            <title>Stories by Mohammed Luqmaan on Medium</title>
            <link>https://medium.com/@mohammedluqmaan29?source=rss-d7cb0626a149------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:57:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohammedluqmaan29/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[ChatGPT Unboxed: Peeking Into the Brain of an AI]]></title>
            <link>https://medium.com/@mohammedluqmaan29/chatgpt-unboxed-peeking-into-the-brain-of-an-ai-94ba2a6933c1?source=rss-d7cb0626a149------2</link>
            <guid isPermaLink="false">https://medium.com/p/94ba2a6933c1</guid>
            <dc:creator><![CDATA[Mohammed Luqmaan]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 13:27:29 GMT</pubDate>
            <atom:updated>2025-06-16T13:27:29.184Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>In recent years, AI has made remarkable strides in understanding and generating human language. One of the most impressive outcomes of this progress is ChatGPT — a conversational AI developed by OpenAI that can respond intelligently to a wide range of inputs. From writing emails and answering questions to generating code and offering tutoring, ChatGPT is transforming how we interact with technology.</strong></p><p><strong>But how does it actually work?</strong></p><p><strong>Large Language Model:</strong></p><p><strong>A Large Language Model (LLM) is a type of artificial intelligence (AI) model specifically designed to understand and generate human-like text. These models are based on deep learning architectures, particularly a subclass called transformers. Large language model trained on massive amount of text data to understand and generate human languages. They are “large” because they contain billions, sometimes even trillions, of parameters — the internal variables the model adjusts during training to learn patterns from data.</strong></p><p><strong>Transformer or Generative Pre-trained Transformer:</strong></p><p><strong>Transformer architecture is to use attention mechanisms, rather than recurrent or convolutional layers, to model relationships between elements in a sequence, like words in a sentence.</strong></p><p><strong>THE WORKING:</strong></p><p><strong>The GPT architecture is a type of transformer model that relies heavily on the attention mechanism. Transformers have revolutionized natural language processing due to their ability to handle long-range dependencies in text and their efficiency in training on large datasets. GPT models, including ChatGPT, are based on this architecture but are pre-trained on extensive text data and fine-tuned for specific tasks.</strong></p><p><strong>Evolution of ChatGPT</strong></p><p><strong>The development of ChatGPT has seen significant advancements over the years, from its initial inception to its current state. Here, we trace the evolution of ChatGPT through its various iterations.</strong></p><ol><li><strong>GPT-1: The first model, GPT-1, was introduced in 2018. It consisted of 117 million parameters and was trained using the BooksCorpus dataset. GPT-1 demonstrated the potential of transformer models for NLP tasks, but it had limitations in generating coherent long-form text.</strong></li><li><strong>GPT-2: In 2019, OpenAI released GPT-2, a much larger model with up to 1.5 billion parameters. GPT-2 showcased significant improvements in generating coherent and contextually relevant text. It was trained on a diverse dataset called WebText, which included data from various web pages. The release of GPT-2 highlighted the model’s ability to perform multiple NLP tasks without task-specific training.</strong></li><li><strong>GPT-3: The next major leap came with GPT-3, released in 2020. GPT-3 boasted an unprecedented 175 billion parameters, making it the largest transformer model at the time. This massive increase in parameters allowed GPT-3 to generate highly sophisticated and context-aware text. It demonstrated remarkable capabilities in few-shot and zero-shot learning, where the model could perform tasks with minimal or no task-specific training.</strong></li><li><strong>GPT-3.5 and ChatGPT: ChatGPT is based on GPT-3.5, an iteration of GPT-3 that includes refinements and optimizations for conversational AI. GPT-3.5 focuses on improving coherence, context retention, and safety in responses. The model is fine-tuned with a specific focus on interactive dialogues, making it more adept at handling conversations and providing relevant, human-like responses.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3aKtfGeVJDfCrO8FBziTWw.png" /><figcaption>i.e Evolution of GPT Transformers</figcaption></figure><p><strong>Working and Architecture:</strong></p><p><strong>1. Input Processing</strong></p><p><strong>The input text is tokenized into smaller units called tokens. These tokens are then converted into embeddings, which are dense vector representations of the tokens. Positional Encoding are added to these embeddings to retain the sequence information.</strong></p><p><strong>2. Transformer Layers</strong></p><p><strong>ChatGPT consists of multiple stacked transformer layers. Each layer has two main components:</strong></p><ul><li><strong>Self-Attention Mechanism: Each token in the input attends to every other token, allowing the model to understand the context from all parts of the input.</strong></li><li><strong>Feed-Forward Networks: These networks apply transformations to the attended information, enabling the model to learn complex patterns.</strong></li></ul><p><strong>Transformer Architecture</strong></p><p><strong>Attention Mechanism</strong></p><p><strong>The attention mechanism is the backbone of ChatGPT’s ability to understand and generate text. It involves:</strong></p><ul><li><strong>Query, Key, and Value Matrices: The input embeddings are transformed into three matrices. The query matrix interacts with the key and value matrices to compute attention scores.</strong></li><li><strong>Scaled Dot-Product Attention: The attention scores are calculated using the dot product of the query and key matrices, scaled, and then passed through a softmax function to obtain the attention weights.</strong></li><li><strong>Multi-Head Attention: Multiple attention heads allow the model to focus on different parts of the input simultaneously, improving its contextual understanding.</strong></li></ul><p><strong>3. Output Generation</strong></p><p><strong>After passing through the transformer layers, the final hidden states are used to generate the output tokens. The model uses a soft max layer to predict the probability distribution over the vocabulary for the next token, generating text step-by-step.</strong></p><p><strong>4. Self-Attention in Depth</strong></p><p><strong>Self-attention allows each word to look at every other word in the sentence, enabling the model to determine the relevance of other words to the current word. This mechanism helps the model capture nuances and relationships in the text, leading to more coherent and contextually appropriate responses.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*aHGLpu7OKKjg4jSXgB8mMQ.png" /><figcaption>i.e Architecture of Transformer used in CHATGPT</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94ba2a6933c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>