<?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 Manasi Pandit on Medium]]></title>
        <description><![CDATA[Stories by Manasi Pandit on Medium]]></description>
        <link>https://medium.com/@manasi.pandit197?source=rss-b3ade40c1101------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5D5kwQNVyoBH7PyU</url>
            <title>Stories by Manasi Pandit on Medium</title>
            <link>https://medium.com/@manasi.pandit197?source=rss-b3ade40c1101------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 15:21:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manasi.pandit197/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[Unpacking Google Gemini: The Multimodal AI Powerhouse Redefining Intelligence]]></title>
            <link>https://medium.com/@manasi.pandit197/unpacking-google-gemini-the-multimodal-ai-powerhouse-redefining-intelligence-05e8f6596304?source=rss-b3ade40c1101------2</link>
            <guid isPermaLink="false">https://medium.com/p/05e8f6596304</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-use-cases]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[llm-evaluation]]></category>
            <category><![CDATA[google-gemini]]></category>
            <dc:creator><![CDATA[Manasi Pandit]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 06:16:55 GMT</pubDate>
            <atom:updated>2025-04-21T06:18:52.880Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>What is Gemini?</strong></p><p>Google’s most recent AI model, Gemini, is causing a stir in the IT industry. In addition to text, it can comprehend and produce images, audio, video, and even code. It can be compared to a super-intelligent assistant that speaks several “data languages” — one brain that can analyze several kinds of information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*8VbVFLWShXKym7j1" /><figcaption>Meet Gemini, Google’s all-in-one artificial intelligence brain that uses bespoke TPUs and state-of-the-art transformer architecture to comprehend and produce text, images, and music.</figcaption></figure><p>The IT community is talking about Google’s Gemini, a multimodal AI that is showing off its abilities in language, graphics, and other fields.</p><p>But what’s going on underneath? What kind of computational sorcery powers this beast, and how did Google create it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*u6qtz4egRJc-LMCS.jpg" /></figure><p>We’ll examine Gemini’s algorithmic underpinnings, development history, and the illusive temporal and space complexity that characterize its performance in this blog. Hold on, let’s unravel this wonder of artificial intelligence for your interest and my own blogging enjoyment!</p><h3>What Gives Gemini Their Power?</h3><p>We can make some informed assumptions, but Google is keeping the precise recipe for Gemini a culinary secret. Gemini was created from the ground up to handle various data formats, including text, graphics, and audio, like a polyglot genius, in contrast to previous models that were pieced together from disparate elements. This is what we believe drives it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*2uaD28nr-0exFzfV" /><figcaption>Gemini’s Multimodal Engine: A simplified look at how Google’s AI powerhouse processes text, images, and audio through a transformer core with expert networks, all accelerated by custom TPU hardware.</figcaption></figure><ul><li><strong>Built on Transformers</strong>: Gemini uses a type of neural network called a “transformer.” This is the same tech behind ChatGPT and Google’s earlier models like PaLM. It works well for writing, coding, and picture analysis, among other jobs.</li><li><strong>Makes use of MoE (Mixture of Experts):</strong> Gemini only activates the “experts” it need, rather than utilizing the full network for every task. Similar to calling in the appropriate specialist rather than an entire team, this speeds up and improves efficiency.</li><li><strong>Reinforcement Learning (RL):</strong> Given that DeepMind, Google’s AI research group, is involved, it’s likely that Gemini also picks up new skills through trial and error, much like AlphaGo did when it mastered board games.</li></ul><p>Together, these characteristics provide Gemini intelligence, speed, and proficiency in comprehending various kinds of data, all of which are made possible by strong processors known as TPUs (Tensor Processing Units).</p><h3>The lineup for Gemini: A Single Family, Numerous Models</h3><p>Gemini is a family of models, each designed for a distinct function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*SEriEIpcoSQa5Rud9lutzQ.png" /><figcaption>Google Gemini Models Overview: a comparison of the many Gemini versions, emphasizing their supported systems, special features, and optimal use cases.</figcaption></figure><p>There is a Gemini model designed specifically for use on Pixel phones and in large data centers.</p><h3>How Much Time Was Needed to Build Gemini?</h3><p>The creation of Gemini took time. This is an approximate timeline:</p><ul><li><strong>2021–2022:</strong> Google most likely began preliminary study using DeepMind tools and models like PaLM.</li><li><strong>May 2023:</strong> Gemini received its initial shoutout at Google I/O.</li><li><strong>Dec 2023:</strong> Gemini 1.0 released featuring Ultra, Pro, and Nano variants.</li><li><strong>Feb 2024:</strong> Gemini 1.5 launched featuring larger context windows and improved speed.</li><li><strong>Dec 2024–2025:</strong> Gemini 2.0 and 2.5 launched, demonstrating the rapid pace at which Google enhances the model approximately every 6–12 months.</li></ul><p>It’s quite an impressive speed for something so intricate.</p><h3>Area Complexity: The Effectiveness Formula</h3><p>Let’s dive into the figures — or at least the most informed estimates, as Google has remained tight-lipped about the precise specifications. Time and space complexity indicate how quickly Gemini processes information and how much memory it consumes.</p><h3>Complexity of Time (The speed of processing):</h3><ul><li><strong>Baseline: </strong>Transformers generally operate at O(n²) for each layer, with n being the input length (for instance, a context of 1 million tokens in Gemini 1.5). That’s a significant amount of math for lengthy conversations!</li><li><strong>Optimizations</strong>:Google probably reduced this using sparse attention methods — perhaps O(n log n) — to maintain Gemini’s speed. Inference (producing answers) adds O(m), where m represents the length of the output.</li><li><strong>Real Talk</strong>: It’s sufficiently quick to enable Google Search modifications instantly, but what about those million-token contexts? They are doing heavy lifting.</li></ul><h3>Complexity of Space (The amount of memory it consumes):</h3><ul><li><strong>Model Size</strong>: Gemini Ultra may contain billions or potentially a trillion parameters, along with space for that extensive context window — consider O(p + n), where p represents parameters.</li><li><strong>MoE Magic</strong>: By engaging only a selection of “experts,” the effective space can reduce to O(p/k + n), with k representing the number of experts. Reduced waste, greater impact.</li><li><strong>Real Talk</strong>: It’s a virtual storage facility, yet Google has organized it efficiently to accommodate TPUs.</li></ul><blockquote><em>Gemini’s like a turbo-charged sports car — tons of horsepower (parameters), optimized aerodynamics (MoE), and a giant fuel tank (context) — tuned to race without overheating.</em></blockquote><h3>Architectural Deep Dive: Gemini’s Evolution</h3><p>Gemini’s architecture is a masterclass in innovation, rooted in transformers and enhanced across generations. Here’s how it evolved:</p><ul><li><strong>Gemini 1.0</strong>: A decoder-only transformer with native multimodality, handling text, images (variable resolution), audio (via Universal Speech Model), and video (as image sequences). Context: 32,768 tokens.</li><li><strong>Gemini 1.5</strong>: Introduced sparse MoE in Gemini 1.5 Pro (up to 2M tokens, experimental 10M), with Flash distilled for speed (1M tokens). Efficiency meets scale.</li><li><strong>Gemini 2.0 &amp; 2.5</strong>: Agentic AI with reasoning focus — Gemini 2.5 Pro (128B MoE + 12B verifier) adds “thinking” steps, native image/audio outputs, and tool use (1M tokens, 2M soon).</li><li><strong>Gemini Nano</strong>: Distilled for Android, Nano-1 (1.8B) and Nano-2 (3.25B) run via AICore, retaining multimodal chops in a tiny package.</li></ul><p>Its multimodal encoder processes each data type separately, then fuses them (likely via cross-modal attention) for a unified understanding — trained jointly across vast datasets of web docs, code, and media.</p><h3>Visualization: Gemini’s Architecture in a Nutshell</h3><p>Here’s a diagram concept to bring Gemini to life:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nSKB4kFYLOyXl1SA" /><figcaption>Gemini’s Multimodal Engine</figcaption></figure><p>This simplified transformer architecture diagram showcases the encoder-decoder structure at the heart of models like Gemini.While the decoder (right) uses encoder-decoder cross-attention and masked attention to forecast output tokens step-by-step, the encoder (left) processes input tokens using feedforward networks and layers of multi-head attention. A softmax layer is used to generate the final output, and positional encoding is added to maintain word order.</p><h3>The Significance of Gemini</h3><p>Gemini is not your typical AI model. It offers a glimpse of the direction that technology is taking:</p><ul><li>More intelligent applications that comprehend more than just text.</li><li>AI on phones, not just in the cloud.</li><li>Quick updates and ongoing enhancements; AI on phones as well as in the cloud.</li></ul><p>Whether you’re chatting, Googling, coding, or taking pictures, Google is obviously placing a lot of money into Gemini, and it’s already transforming the way we engage with AI.</p><h3>Quick Facts &amp; Views</h3><ul><li><strong>Algorithm</strong>: The multimodal glory was especially designed by the transformer-MoE-RL hybrid algorithm.</li><li><strong>Architecture</strong>: Decoders-only MoE-boosted transformers and multimodal fusion throughout generations.</li><li><strong>Timeline</strong>: One to two years, updated every six to twelve months.</li><li><strong>Complexity</strong>: TPUs and device-friendly lean mode optimized with O(n²) time and O(p + n) space.</li><li><strong>Impact</strong>: A driving force of innovation in anything from smartphones to search engines.</li></ul><p>Gemini is increasingly becoming the minds behind many Google products. Not only is it smart, but it’s also broadening the scope of AI.</p><p>Gemini is the behind-the-scenes math hero who does the calculations, so shout them out the next time you Google something and get an exact answer. Is Gemini the future or just another step in the AI marathon, in your view? Share your thoughts below; I’d love to discuss!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05e8f6596304" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Memory Management: A Comprehensive Guide to Optimizing Performance and Preventing Leaks]]></title>
            <link>https://medium.com/@manasi.pandit197/mastering-memory-management-a-comprehensive-guide-to-optimizing-performance-and-preventing-leaks-e0a0f9bbff78?source=rss-b3ade40c1101------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0a0f9bbff78</guid>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[memory-leak]]></category>
            <dc:creator><![CDATA[Manasi Pandit]]></dc:creator>
            <pubDate>Sun, 13 Oct 2024 17:55:31 GMT</pubDate>
            <atom:updated>2024-10-23T13:26:57.911Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a0ugFiAmYJNl_nm1.jpg" /></figure><p>Memory management controls how memory is allocated and deallocated in a computer system. It’s especially important in multitasking environments where multiple processes run simultaneously. Efficient memory management ensures processes run smoothly without hogging resources, preventing performance bottlenecks, crashes, and memory leaks.</p><h3>Understanding Memory Management</h3><p>Memory management is a critical process that controls how memory is allocated and deallocated in a computer system, particularly in multitasking environments where multiple processes run simultaneously. Its main function is to ensure efficient memory utilization, preventing any single process from monopolizing resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OmvtZb3DUAU6C-Za" /><figcaption>Fig. Stack vs. Heap</figcaption></figure><p>Memory management assigns memory blocks to running programs, allowing them to operate without interference. Key components include the heap (for dynamic memory allocation) and the stack (for static memory allocation). Effective memory management optimizes memory use, while poor practices can lead to performance issues, crashes, and memory leaks.</p><h3>In memory management, two primary modes exist: uniprogramming and multiprogramming.</h3><ul><li><strong>Uniprogramming</strong> supports only one process in memory at a time, leading to inefficiencies due to idle CPU time between operations.</li><li><strong>Multiprogramming</strong>, on the other hand, allows multiple processes to coexist in memory, optimizing resource use by enabling one process to run while another waits for I/O.</li></ul><p>Effective memory management is vital in multiprogramming to ensure that processes run concurrently without interference.</p><h3>Memory Management Requirements</h3><p>Effective memory management must meet several key requirements:</p><ul><li><strong>Relocation</strong>: Seamlessly handle swapping processes between memory and disk during execution.</li><li><strong>Protection</strong>: Isolate processes to prevent data corruption or unauthorized access.</li><li><strong>Sharing</strong>: Manage shared memory efficiently for scenarios like shared libraries.</li><li><strong>Logical Organization</strong>: Load program modules into memory in a logically ordered manner.</li><li><strong>Physical Organization</strong>: Organize memory, including RAM and storage, to minimize overhead and optimize performance.</li></ul><h3>Memory Partitions: Static and Dynamic</h3><p>Memory partitioning is a technique used to divide the available memory into fixed or dynamic segments, depending on the needs of the system and running programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPMuyqa-CwhlmfYv2lDNUQ.jpeg" /><figcaption>Fig. Memory partitioning</figcaption></figure><h3>Static or Fixed Partitioning</h3><p>In static partitioning, memory is divided into fixed partitions at system start-up, with each partition assigned to a process. There are two forms:</p><ul><li><strong>Equal Partitioning</strong>: All partitions are the same size. It’s simple to manage but often leads to internal fragmentation when processes don’t fully use the allocated space.</li><li><strong>Unequal Partitioning</strong>: Partitions vary in size, offering more flexibility. However, it can still cause external fragmentation, where free memory is scattered in small, unusable blocks.</li></ul><h3>Dynamic Partitioning</h3><p>In contrast, dynamic partitioning creates memory blocks as needed for each process, with no predetermined partition sizes. This approach minimizes internal fragmentation but increases the risk of external fragmentation, which we’ll explore further below.</p><h3>Fragmentation: A Critical Challenge</h3><p><strong>Fragmentation</strong> is one of the most common challenges in memory management, leading to inefficient use of memory. It comes in two forms:</p><p><strong>Internal Fragmentation</strong> occurs when allocated memory blocks are larger than needed, leaving unused space within a partition. For instance, if a process needs 100KB but gets 200KB, the extra 100KB is wasted, reducing memory efficiency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/0*JnaOb_YWNGMUVQT1" /><figcaption>Fig. Internal Fragmentation</figcaption></figure><p><strong>External Fragmentation</strong> happens when free memory is divided into non-contiguous blocks, making it hard to allocate space for larger processes, even if the total available memory is sufficient. This scattered free memory becomes difficult to utilize effectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/0*90ocHlxvC4zkOMUf.png" /><figcaption>Fig. External Fragmentation</figcaption></figure><p><strong>Compaction</strong> is a solution to external fragmentation, where memory blocks are shuffled to group free space together, making it easier to allocate larger memory blocks. However, this process is time-consuming and may not be practical in systems with high memory demands.</p><h3>Compaction and Memory Allocation Strategies</h3><p>To manage fragmentation, various memory allocation strategies are employed, including:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*yLZWFiEBniS1JCbw1XoLOw.png" /><figcaption>Fig. Compaction methods</figcaption></figure><p><strong>First Fit</strong>: Allocates the first memory block large enough for the process. It’s simple but often causes external fragmentation as leftover memory becomes unusable.</p><p><strong>Best Fit</strong>: Allocates the smallest block that fits the process, minimizing wasted space but leading to many small unusable blocks, increasing external fragmentation.</p><p><strong>Next Fit</strong>: Similar to First Fit, but starts searching from the last allocated block. It reduces repeated scanning but still risks external fragmentation.</p><p><strong>Worst Fit</strong>: Allocates the largest available block, aiming to leave a sizeable free chunk, but fragmentation can still occur over time.</p><h3>Preventing and Detecting Memory Leaks</h3><p>Memory leaks are a major issue in systems where memory is manually managed, as in low-level languages like C/C++. They occur when memory is allocated but never freed, resulting in the gradual depletion of available memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*fxcNPDbyC13zJeOfFcEGxw.jpeg" /><figcaption>Fig. Memory Leaks</figcaption></figure><h3>Techniques for Leak Detection</h3><ul><li><strong>Valgrind</strong>: Tracks memory allocations and deallocations to detect unreachable blocks, pinpointing memory leaks, uninitialized memory usage, and out-of-bounds access.</li><li><strong>AddressSanitizer</strong>: Identifies buffer overflows, use-after-free, and other memory errors by intercepting memory access operations.</li><li><strong>Detailed Reporting</strong>: Both tools provide specific code locations for memory issues, helping developers quickly resolve them.</li><li><strong>Improvement</strong>: Using these tools enhances software stability, reliability, and security by proactively detecting and fixing memory-related problems.</li></ul><h3>Best Practices for Preventing Memory Leaks in C++</h3><ol><li><strong>RAII (Resource Acquisition Is Initialization)</strong>:</li></ol><ul><li>Ties resource management to object lifecycle; resources are automatically released when the object goes out of scope.</li><li>Promotes reliable resource management and cleaner code.</li></ul><p><strong>2. Smart Pointers</strong>:</p><ul><li>Provide automatic memory management through reference counting, reducing the need for manual deallocation.</li><li>Include std::unique_ptr for exclusive ownership and std::shared_ptr for shared ownership, minimizing memory leak risks.</li></ul><p>By following these practices, developers can create more reliable and efficient C++ programs.</p><h3>Conclusion</h3><p>Mastering memory management is key to optimizing system performance and preventing issues like fragmentation and leaks. In both uniprogramming and multiprogramming environments, techniques like compaction, memory partitioning, and leak detection tools boost system stability. Addressing memory challenges with the right strategies ensures peak performance, minimizes downtime, and reduces resource waste, leading to improved overall efficiency and stability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0a0f9bbff78" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>