<?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 Dr. Kiran Kumar on Medium]]></title>
        <description><![CDATA[Stories by Dr. Kiran Kumar on Medium]]></description>
        <link>https://medium.com/@kiran.phd.0102?source=rss-89abc90e6218------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iJ7XwS50gg_FvkyCsL5ZSA.jpeg</url>
            <title>Stories by Dr. Kiran Kumar on Medium</title>
            <link>https://medium.com/@kiran.phd.0102?source=rss-89abc90e6218------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:14:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kiran.phd.0102/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[How to Convert Business Problems to Data Science Problems [Ft. Mathematical Modelling]]]></title>
            <link>https://medium.com/@kiran.phd.0102/how-to-convert-business-problems-to-data-science-problems-ft-mathematical-modelling-0a495dd0d268?source=rss-89abc90e6218------2</link>
            <guid isPermaLink="false">https://medium.com/p/0a495dd0d268</guid>
            <category><![CDATA[mathematical-modeling]]></category>
            <category><![CDATA[dependent-variables]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[independent-variable]]></category>
            <category><![CDATA[business-problem-solution]]></category>
            <dc:creator><![CDATA[Dr. Kiran Kumar]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 05:39:21 GMT</pubDate>
            <atom:updated>2024-01-28T05:39:21.965Z</atom:updated>
            <content:encoded><![CDATA[<p>The number and degree of complexity of challenges in machine learning, AI, and data science fields are significantly increasing. We cannot control the problems but improve our problem-solving skills to find an apt solution. Mathematical modeling is your answer if you are a growing business entrepreneur or curious professional looking for innovative problem-solving methods to<strong> convert business problems into data science problems</strong>.</p><p>However, can we really <strong>convert every business problem to a data science problem</strong>? Mathematical modeling is your strategic tool that can transform any business problem into a data science problem to find an effective solution. It highlights all the mistakes to avoid at all costs to cross out all the circumstances that can lead to costly mistakes or waste resources, time, and effort.</p><h3>Understanding Mathematical Modeling</h3><p>To break down the concept into simpler terms, mathematical modeling can be referred to as representing and explaining real business problems and concepts using basic arithmetic, mathematical formulas, and methods.</p><p>When it comes to <strong>converting business problems into data science problems</strong>, mathematical modeling is a series of equations and inequalities to be used as tools for making decisions. Then, algebra and laws of arithmetic are used to build models and solve. To give an example:</p><p><em>Let’s consider a simple situation of profit and loss:</em></p><p>Revenue — Expenses = Profit (or loss if negative)</p><p><em>This equation explains the definition of profit and loss: </em>profits are the amount by which the revenue exceeds the expenses, and losses is<em> the amount by which expenses exceed the revenue. The above equation explains the relationship within the model. Based onthis mathematical model, the laws of arithmetic can help to deduce other relationships:</em></p><p>Revenue = Profit(or loss if negative) + Expenses</p><p>Expenses = Revenue — Profit(or loss if negative)</p><p>This is just a simple example to explain how to convert a business problem into mathematical modeling using basic arithmetic. However, when <strong>converting a business problem into a data science problem</strong> through mathematical modeling, advanced mathematics is utilized per the objective function or aim.</p><p>For example, the Taylor polynomial can be used to approximate the values. So, a business is analyzing the customer spending pattern over time. In that case, the Taylor polynomial can approximate the trend in spending based on historical data, and the model can be used to predict future behavior. So, the Taylor polynomial is perfect for <strong>solving a business problem through mathematical modeling.</strong></p><p>Another example is using Markov chains to predict the future. Markov chains can be used to model system transitions, customer behavior, inventory management, and financial modeling.</p><h3>Why Use Mathematical Modeling in Data Science or Machine Learning?</h3><p>Mathematical modeling is one of the practical techniques that AI and data science practitioners can use to extract valuable insights, optimize complex systems, and predict future trends. Here’s how <strong>mathematical modeling helps to solve business problems</strong> by converting them to data science problems:</p><p>● <strong>Helps in formulating machine learning and data science algorithms.</strong></p><p>The design and development of machine learning and data science algorithms rely upon mathematical principles. The algorithms are mathematical constructs that aim to resolve specific problems.</p><p>● <strong>Assists in establishing relationships between variables.</strong></p><p>Mathematical models represent and establish relationships between variables, and understanding the relationship can help build accurate models.</p><p>● <strong>Creates a systematic approach to find insights from voluminous data</strong></p><p>It provides a systematic approach to capture patterns and relationships between data to assist the model in making accurate predictions on new, unseen data.</p><p>● <strong>Simplifies the way to optimize the objective function</strong></p><p>It can help optimize the machine learning and data science algorithms and find the optimal solution to minimize or maximize a specific objective function.</p><p>● <strong>Provides a framework to understand the scalability of algorithms</strong></p><p>Mathematical models provide a framework for understanding the scalability of algorithms and their performance if the dataset size or complexity of the<strong> </strong>data science problem increases.</p><h3>How do you convert a real business problem into a data science problem?</h3><p>Here are some simple steps to <strong>convert a business problem into a data science problem:</strong></p><h4>Understand and Define the Problem</h4><p>The first step for <strong>converting a business problem into a data science problem</strong> is to frame the vague<strong> </strong>real business problem into a specific issue. A data scientist is provided with vague business problems, like increasing revenue or reducing customer churn rate. However, it is essential to frame the problem and define it in a way so it can be solved using mathematical modeling.</p><p>Here are three ways to understand and <strong>convert the business problem into a specific data science problem:</strong></p><p>● Ask tangible questions to stakeholders.</p><p>● Prioritize the pain points.</p><p>● Get a balanced perspective from the stakeholders.</p><p><em>For example, a stakeholder might want to understand why users visit the website but do not purchase anything. The real problem lies in providing improper recommendations. If the recommendation does not align with the user’s interests, they will not interact with the brand, and if they do, the customer will purchase the products.</em></p><p>After defining the problem, it is fundamental to think about decisions to solve the situation like a data science problem. Which user will churn in 90 days, or what discounts should be provided to help them return and complete the purchase?</p><p>The best way to get an answer is by considering timing, like when should a specific ad should be shown to a user to get the maximum conversion.</p><p>If we apply it to our example, the defined business problem becomes:</p><p>Which user should be given a discount to avoid churning in 90 days?</p><h4>Make Analytics Goals and Scope Your Solution</h4><p>Now, we have <strong>converted the</strong> <strong>business problem into a data science problem</strong>, but it is essential to break it down further to run an actual analysis. Asking questions helps guide you toward the goal. Like,</p><ol><li>How can we identify potentially fraudulent transactions in real time?</li><li>How do we predict which employees are likely to leave the company within the next six months?</li><li>How do we group customers into segments for targeted marketing campaigns?</li></ol><p>After setting the milestones, designing a minimum viable product is essential. A minimum viable product will provide value to stakeholders in smaller increments. Any data science project<strong> </strong>should be planned to give incremental value to the client within the project timeline. The minimum viable product can be in the form of an analysis report, an interactive web app, or an analytical dashboard.</p><p>Identifying target metrics is necessary to solve a data science problem, as it is the stakeholder’s desired outcome. While identifying the target metric, ensure the metric is measurable. Also, as an analysis, a subset of all the metrics shouldn’t only have one set of metrics. Make the metric non-technical so all the stakeholders can easily understand and comprehend it.</p><h4>Plan the Dataset and Analysis</h4><p>The final step to <strong>convert the business problem into a data science problem</strong> is to plan your dataset, as data is essential to solving any data science problem. Identify the relevant data sources that can be utilized to solve the problem, like financial records, customer feedback, and others. Preprocess the data and convert it into a format that is perfect for mathematical modeling. Now, find a suitable method for your analysis by eliminating the unsuitable techniques first, and then select the process, keeping the constraints in mind.</p><h3>Where Does Mathematical Modeling Come into Play?</h3><p><strong>Converting a business problem into a data science problem</strong> involves identifying the key aspects of the problem that are addressed using data and analytics. This is where mathematical modeling comes into play. It is a critical component of the conversion process as it provides a formal framework to represent relationships, make predictions, and optimize solutions.</p><p>Let’s understand the steps to implement <strong>mathematical modeling to convert a business problem into a data science problem:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*EaH_dK9T0xIqd44-KlcG5g.png" /><figcaption>Fig: Steps in Implementation of Mathematical Modelling</figcaption></figure><ol><li><strong>Define the problem — </strong>The first step is clearly defining the business problem statement you aim to solve. For example, <em>consider a manufacturing company facing the challenge of optimizing the allocation of its production resources to maximize profits while minimizing costs.</em></li><li><strong>Make an assumption — </strong>Now, the mathematical model often requires simplification and assumptions to make the problem more manageable. So, gather quality data and estimate the uncertain parameters using historical data or machine learning techniques. In our case, <em>the professional from the manufacturing company will assume that the production happens at a constant rate, there is a steady demand in the market, and resource costs remain fixed for the course of time.</em></li><li><strong>Define the variables you want to use in the model. </strong>The next step is identifying the key variables influencing the real business problem. In our case, <em>the variables affecting our problem would be production rate, raw material costs, labor costs, and production time.</em></li><li><strong>Calculate the solution — </strong>The next step is developing a mathematical equation representing the relationship between variables. Then, utilize mathematical techniques, like optimization algorithms, to minimize or maximize the objective function. In our example, t<em>he mathematical equation would represent the total cost as a function of production rate and resource costs. The total cost will be the objective function.</em></li><li><strong>Assess and analyze the model and its result to validate its accuracy. </strong>This step is essential to evaluate the model’s validity and reliability by comparing it to historical data or running simulation.</li></ol><h3>What Parameters Should Be Considered While Solving Business Problems Through Mathematical Modeling?</h3><p>While<strong> converting business problems to data science</strong> <strong>problems</strong> and solving them through mathematical modeling, two components are to be considered, viz., variables and coefficients.</p><p>Variables are quantities that can be manipulated in the mathematical model. It is of two types: independent or input and dependent or output.</p><ol><li><strong>Input or Independent Variable — </strong>Input variables are the quantities that influence the system being modeled. These are the variables that get manipulated to get the desired outcome.</li><li><strong>Output or Dependent Variable — </strong>Output variables are quantities of interest. They depend upon the independent variables. It is usually the outcome or objective function that needs to be determined.</li></ol><p>Let’s understand the concept with a simple example:</p><p><em>In a manufacturing optimization model, the dependent variable or objective function would be lowering total production cost, maximizing production output, or sometimes even both. The independent variables would be production rates, raw material costs, labor costs, and production time. All the independent variables will affect the dependent variables.</em></p><p><strong>Coefficients</strong> are the constants that represent fixed values and define the relationship between variables. So, the values of coefficients will not change within the model. Coefficients influence the behavior of the model or system you are working on.</p><p>The aim is to find the combination of parameter values that maximizes the overall objective function while considering the various constraints and objectives.</p><h3>How do you identify the parameters in real business problems?</h3><p>Here are some ways to identify the factors while <strong>solving a</strong> <strong>business problem through mathematical modeling:</strong></p><p>● <strong>Identify the critical elements of the problem.</strong></p><p>Understand the problem thoroughly and identify the key elements and variables that play crucial roles in the system. <em>For example, if you optimize the supply chain, potential parameters would be production rates, transportation costs, and inventory levels.</em></p><p>● <strong>Analyze the parameters from past data.</strong></p><p>Utilize the historical data to analyze the patterns and trends. <em>For example, in the case of financial modeling, parameters like revenue, expenses, interest rates, and market conditions are some variables that could significantly impact a system.</em></p><p>● <strong>Perform sensitivity analysis.</strong></p><p>Perform sensitivity analysis where changes in specific parameters can help assess the overall model’s impact.</p><p>● <strong>Consult business stakeholders.</strong></p><p>You can consult the stakeholders or research to identify standard parameters in the real business problem that can influence your system.</p><h3>How do you establish the relationship between the parameters?</h3><p>The hardest part is to find the relationship between parameters when <strong>converting the business problem to a data science problem</strong> and solving it through mathematical modeling. After finding the objective function (dependent variable) and independent variables, you will require mathematical functions to see how the independent variables lead to maximizing the output. It requires a brainstorming session to develop the best solution to achieve the desired output.</p><p>Here are some mathematical tools that can help to establish a relationship between the parameters when it comes to <strong>converting a business problem into a data science</strong> or machine learning problem:</p><p>● <strong>Linear Algebra — </strong>Predict sales based on advertising trends using linear regression.</p><p>● <strong>Calculus</strong> — To maximize the profits by finding the optimal price using calculus-based optimization.</p><p>● <strong>Differential Equations </strong>— To predict future stock prices by modeling market dynamics using differential equations.</p><p>● <strong>Probability and Statistics</strong> — To analyze the customer satisfaction survey results to infer the entire base.</p><p>● <strong>Graph Theory</strong> — To analyze the social network to identify the most influential individuals and groups.</p><h3>Wrapping Up</h3><p>Data science is an effective tool that helps businesses understand their problems and analyze precisely what needs to be done to reach the objective functions. Mathematical modeling is fundamental to translating a business problem into a data science problem. It provides a framework to represent relationships, make predictions, and optimize solutions.</p><p>Transparent communication and the definition of the problem and objectives should be clear to ensure that the mathematical model represents the business dynamics properly. Also, iteration and refining are essential parts of the process because the mathematical model might not provide appropriate performance if the business needs to evolve.</p><p>If you liked my story and want to support me,</p><p>Clap my article; that will help me out.👏<br>Follow me on Medium and subscribe to get my latest article🫶<br>Follow me on my <a href="https://www.linkedin.com/in/drkirankumarc/">LinkedIn</a> to get other information about data 🔭</p><p><strong><em>References</em></strong></p><p>Salau, A. (2020, August 7). “Translate Business Problems to Data Science Problems” [Blog Post]. Retrieved from <a href="https://ayotomiwasalau.medium.com/translate-business-problems-to-data-science-problems-b1693d8f313a">https://ayotomiwasalau.medium.com/translate-business-problems-to-data-science-problems-b1693d8f313a</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0a495dd0d268" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAG Fusion Revolution — A Paradigm Shift in Generative AI]]></title>
            <link>https://medium.com/@kiran.phd.0102/rag-fusion-revolution-a-paradigm-shift-in-generative-ai-2349b9f81c66?source=rss-89abc90e6218------2</link>
            <guid isPermaLink="false">https://medium.com/p/2349b9f81c66</guid>
            <category><![CDATA[genai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[rag-fusion]]></category>
            <category><![CDATA[vector-search]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Dr. Kiran Kumar]]></dc:creator>
            <pubDate>Fri, 08 Dec 2023 06:43:10 GMT</pubDate>
            <atom:updated>2023-12-10T08:00:51.285Z</atom:updated>
            <content:encoded><![CDATA[<h3>RAG Fusion Revolution — A Paradigm Shift in Generative AI</h3><p>With the latest advancements in the field of NLP and Generative AI, the introduction of RAG (Retrieval Augmented Generation) promises an advancement to the existing technologies, like BERT Chat GPT, by combining the power of retrieval-based models and sequence-to-sequence architectures. RAG is an AI framework that aims to improve the quality of LLM-generated responses by grounding the model of external sources of knowledge to provide the LLM’s internal representation of information.</p><p>However, due to several shortcomings of RAG, it needs an upgrade for its potential enhancements, and that’s where RAG Fusion comes in. Let’s understand RAG and RAG Fusion, which all revolve around revolutionizing search and information retrieval using vector search with generative AI to provide direct answers based on genuine data.</p><p><strong>Understanding Retrieval Augmented Generation</strong></p><p>Retrieval Augmented Generation is a method that combines the power of super large pre-trained language models with external retrieval or search mechanisms. The idea behind the RAG was to enhance the capability of generative AI models by allowing them to extract information from a vast corpus of documents during the generation process.</p><p>To understand how RAG enhances LLMs prompt-response generation credibility, here’s how it works:</p><p>1. <strong>Retrieval Step</strong> — When the user enters a prompt or asks a question to the generative AI model, the RAG model retrieves a set of relevant documents or passages from a large corpus. It is achieved through a retrieval mechanism often based on dense vector representations of the documents and the queries.</p><p>2. <strong>Generation Step </strong>— Once the relevant passages are retrieved, they are provided to the generative AI model and the original prompt or query. The model generates a response, leveraging its pre-trained knowledge and information retrieved from the passages.</p><p><strong>Training </strong>— In this phase, both retrieval and generational components are fine-tuned end-to-end on a downstream task, and the model can learn to improve and enhance its retrieval choices based on the generated response quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*eGn2-t13xawtbfEKahSCtw.jpeg" /><figcaption>Image Source: <a href="https://docs.aws.amazon.com/images/sagemaker/latest/dg/images/jumpstart/jumpstart-fm-rag.jpg">AWS</a></figcaption></figure><p>The above image clarifies the mechanism of the RAG model, and it is essential to notice that the external data that will augment the prompt can come from multiple data sources, like document repositories, databases, or APIs. However, the critical step is to convert the documents into a compatible format to perform a relevancy search.</p><p>The document collection or knowledge library and user-submitted queries are converted to numerical representation using embedding language models to make the format compatible. Embedding is the process through which a text is given a numerical representation in vector space. The RAG model architecture compares the embedding of user queries within the vector of the knowledge library and fetches out the documents with similar contexts. The image below represents the most primitive retrieval augmented generation model architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*b8QJcs-Pa7k_z4Wh5Lf_pA.png" /><figcaption>Image: RAG Architecture</figcaption></figure><p><strong>Advantages of RAG</strong></p><p>RAG offers significant advantages over large language models working in isolation to generate the best prompt response. Here are some benefits of retrieval augmented generation:</p><p>● Quality response with the latest and up-to-date information.</p><p>● Less computing and storage</p><p>● Reduced Hallucinations</p><p><strong>Limitations of RAG</strong></p><p>Despite several advantages, there are some challenges associated with RAG that need to be addressed to ensure ethically factual and correct answers:</p><p>● RAG relies on external knowledge and can produce inaccurate results due to incorrect information.</p><p>● Fetching data from external resources can raise privacy and safety concerns about sensitive data; however, using document-level access, where access to particular documents can be restricted.</p><p>● The current search technologies, like retrieval-based lexical and vector search technologies, constrain the RAG model.</p><p>● No doubt, humans are not efficient in writing what they require into search engines, and typos, vague queries, and limited vocabulary lead to missing the vast reservoir of information that lies beyond the top results.</p><p>● The linear paradigm lacks the efficiency to crawl into the depth to understand the nature of human queries. The linear method cannot capture complex user queries, leading to inefficient search results.</p><p><strong>Presenting RAG Fusion</strong></p><p><a href="https://towardsdatascience.com/forget-rag-the-future-is-rag-fusion-1147298d8ad1">RAG Fusion</a> (Raudaschl, 2023) has the optimum solution to address the limitations of the RAG model. Different limitations, like inefficiencies in human search and oversimplification of search, lead to less relevant results; however, with RAG Fusion, one can easily overcome the limitations. It overcomes the challenges by generating multiple user queries and ranking the results using strategies like Reciprocal Rank Fusion. The improvised technique bridges the gap between user queries and their intended meaning.</p><p>The RAG Fusion technique uses a programming language, vector search database, LLM with query generation, and results re-ranking steps. Reciprocal Rank Fusion(RRF), is a data re-ranking technique deployed to combine the results from different queries seamlessly. It aims to organize the search results in a unified ranking, improving the accuracy of relevant information.</p><p><strong>Why RAG Fusion?</strong></p><p>The central concept behind working on an updated model of RAG, which is RAG Fusion, is to understand the nuances of complicated human queries without the need for more advanced LLMs. RAG Fusion easily tackles the constraints inherent in RAG by generating multiple queries and re-ranking the results. Also, it utilizes RRF and custom vector score weighting for comprehensive and accurate search results.</p><p>It aspires to bridge the gap between what users explicitly ask and what they intend to do, stepping one step closer to unveiling the hidden transformative knowledge.</p><p><strong>Methodology of RAG Fusion</strong></p><p>RAG Fusions uses the same technologies as RAG: Python language, vector search databases like Elasticsearch or Pinecone, and a large LLM like ChatGPT. The working methodology of RAG Fusion is the same as RAG; however, there are some additional steps, like query generation and re-ranking of results, that reform the response quality.</p><p>Here’s how it works:</p><p>● Performs query duplication by translating the user’s queries into similar yet distinct through LLM</p><p>● Initialize the vector searches for the original query and its generated similar queries, multiple query generation.</p><p>● Combine and refine all the query results using RRF.</p><p>● Pick all the top results with new queries, providing sufficient material to the LLM to create an output response considering all the queries and a re-ranked list of results.</p><p><strong>Understanding the Intricacies Behind RAG Fusion — RRF</strong></p><p>RRF, or reciprocal rank fusion, is a technique that revolves around combining multiple search results to produce a single, unified ranking. A single query cannot cover all the aspects of user queries, and it might be too narrow to provide comprehensive results; that’s why multiple query generation must consider all the different elements and provide a well-curated answer.</p><p>RRF works by combining the ranks of different search queries and increases the chances for all the relevant documents to appear in the final results. Besides, it doesn’t rely on absolute scores assigned by search engines but rather on relative ranks, so combining results with different scales or distributions of scores becomes practical.</p><p><strong>How Does It Work?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*acPUjXj6kIeJHxV5Fgjf9g.png" /><figcaption>Image Source: <a href="https://towardsdatascience.com/forget-rag-the-future-is-rag-fusion-1147298d8ad1">Adrian H. Raudaschl</a></figcaption></figure><p>The above image by Raudaschl, 2023, represents the reciprocal ranking fusion positional reranking system algorithm. As per the image, the function reciprocal_rank_fusion takes a dictionary of search results, where each key is a query. The corresponding value to the key is a list of document IDs ranked by their similarity to the query. The RRF algorithm calculates a new score for each document based on its ranks in different lists and sorts them to create a final reranked result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*_STUbVCRfxUsMcWGa7dGXA.png" /><figcaption>Image Source: <a href="https://plg.uwaterloo.ca/~gvcormac/cormacksigir09-rrf.pdf">Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods</a></figcaption></figure><p>The RRF sorts the documents as per a naive scoring formula. In the above formula, set D represents the given documents to be ranked and a set of rankings R, each a permutation on 1..|D|, and the k is set to 60.</p><p>After calculating the fused scores, the function sorts the document into descending order as per the scores and returns the final re-ranked lists.</p><p>To ensure that the multiple queries do not move away from the user’s intent, the model is directed to give more weightage to the original query in the prompt engineering than subsequent multiple queries. The re-ranked documents and queries are provided to the LLM, and it works similarly to RAG, producing a generative output by asking for a response or summary.</p><p><strong>Advantages of RAG Fusion</strong></p><p>Here’s how RAG Fusion provides more benefits as compared to the RAG model:</p><p>● The source material quality is enhanced as the depth of the search is amplified.</p><p>● It provides a holistic output that resonates with the user’s input queries in response to multi-faceted representations of their informational needs.</p><p>● It creates a well-organized and insightful answer by drawing information from diverse documents.</p><p>● It performs implicit spelling and grammar checks and refines the search queries to provide an accurate search result.</p><p>● The system acts as a linguistic catalyst that breaks down the complex query into small chunks manageable for vector search.</p><p>● It increases the likelihood of discovering information the user didn’t intend to, but it is helpful.</p><p><strong>Probable Limitations</strong></p><p>Every powerful thing or algorithm comes with a set of limitations, and RAG Fusion is no exception. There are only two shortcomings:</p><p>● The ability of the RAG Fusion model to reach the depth of query by multiple query generation can provide a detailed answer, more like an overly-explained one.</p><p>● The multi-query input and diversified document set can stress the language model’s context window, leading to a less coherent output.</p><p><strong>Wrapping up,</strong></p><p>Integrating the RAG Fusion model with an LLM (large language model) is an innovative approach to improvise prompt responses with credible citations. RAG Fusion easily overcomes the limitations of the RAG model and boosts its performance. The idea of RAG Fusion, by Adrian H. Raudaschl, is still in the <a href="https://github.com/Raudaschl/rag-fusion">experimental stage</a>, aiming to make search more intelligent and context-aware, assisting in fetching more affluent, deeper strata of information that cannot be found manually or using traditional LLMs. Also, some ethical concerns are associated with RAG Fusion, as manipulating the user’s original queries to improve the results can be like stepping into a morally grey zone. That’s why it is essential to keep the AI models transparent and control how much one is ceding into AI and at what cost.</p><p><strong>References</strong></p><p>Raudaschl, A. (2023, October 6). “Forget RAG, the Future is RAG-Fusion” [Blog Post]. Retrieved from <a href="https://towardsdatascience.com/forget-rag-the-future-is-rag-fusion-1147298d8ad1#:~:text=The%20RRF%20algorithm%20then%20calculates,list%2C%20which%20is%20then%20returned">https://towardsdatascience.com/forget-rag-the-future-is-rag-fusion-1147298d8ad1#:~:text=The%20RRF%20algorithm%20then%20calculates,list%2C%20which%20is%20then%20returned</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2349b9f81c66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI’s Ascend: Concerns Among People and Senior IT Leaders — Insights from Pew, BCG, and Salesforce]]></title>
            <link>https://medium.com/@kiran.phd.0102/pew-research-challenges-the-perception-of-generative-ai-popularity-5af9882fb805?source=rss-89abc90e6218------2</link>
            <guid isPermaLink="false">https://medium.com/p/5af9882fb805</guid>
            <dc:creator><![CDATA[Dr. Kiran Kumar]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 11:40:25 GMT</pubDate>
            <atom:updated>2023-11-09T11:39:40.539Z</atom:updated>
            <content:encoded><![CDATA[<p>With exciting twists of turns and technology evolutions, we have entered an era where Generative AI and <strong>artificial intelligence</strong> are revolutionizing the world and every industry operations. However, unlike everyone else, not everybody is excited to welcome this new change in the world. It might sound unbelievable, but as per the Pew Research Center Survey, a <a href="https://www.pewresearch.org/short-reads/2023/08/28/growing-public-concern-about-the-role-of-artificial-intelligence-in-daily-life/">new study related to <strong>AI</strong></a> indicates that a growing share of Americans are concerned about the role of Artificial Intelligence affecting their routine life.</p><p>The study reveals that AI’s surprisingly quick rise in popularity has garnered concerns in people’s minds, and the concerns outweigh the excitement related to the increasing and potential <strong>use of AI</strong> in every industry. One of the most common concerns among the working class is, “What if they lose their job because of AI?” This fear and concern limits the employees from embracing the most prominent technological shift, making them inclined to destroy or damage it.</p><p><strong>What Does Pew Research Showcase the Growing Concerns of People About Generative AI Affecting Daily Life?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*esF7hAWHHv7ZYi3W38UgQQ.png" /><figcaption>Source: <a href="https://www.pewresearch.org/wp-content/uploads/2023/08/SR_23.08.28_views-of-ai_1.png">Pew Research Center Survey</a></figcaption></figure><p>The above image shows that the number of people more concerned than excited has significantly increased from 37% in 2021 to 52% in 2023. On the other hand, the number of more excited than concerned has dramatically fallen from 18% in 2021 to 10% in 2023. Then, there are people (36%) who have neutral thoughts or a mix of emotions about AI affecting their daily lives.</p><p>Moreover, as per the research, the concern is perceived among all ages, like around 61% of senior citizens (more than 65 years of age) are concerned about AI rather than welcoming and embracing the change, and only 4% are excited about the transformative change. Similarly, around 42% of youngsters and adults (aged between 18 to 29) are concerned, and only a handful, like 17% of this age group, are excited about using<strong> artificial intelligence</strong> in every industry.</p><p>This data is highly concerning as young people are the backbone of the economy, and if they do not feel comfortable and safe working alongside AI, it can have drastic consequences on the evolution of <strong>artificial intelligence</strong>. Moreover, with the evolution of AI and the introduction of Generative AI, organizations need to find an ethical and transparent way of adopting these new technologies instead of forcing them into operations. The Gen AI tools require training, and the training data can be easily corrupted and compromised, directly impacting the Gen AI’s learning pattern. If people or employees don’t trust the Gen AI, instead of supporting the AI tool, they’ll act against it, which will only underscore the troubling behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*VA1oUdBvMbdP1jvC0O5EnQ.png" /><figcaption>Source: <a href="https://www.pewresearch.org/wp-content/uploads/2023/08/SR_23.08.28_views-of-ai_2.png">Pew Research Center Survey</a></figcaption></figure><p>It represents another aspect of the study, which reflects the awareness of <strong>artificial intelligence</strong> and its evolution among the public. As the image clearly shows, as of 2023, 47% have heard a lot about artificial intelligence, and around 58% of people have heard a little about revolutionary technology.</p><p>However, the interesting thing to notice is that those who have heard more about AI and its impact are now more concerned about it rather than being excited about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*6yvC0gp0yAadbS7pNHzd5g.png" /><figcaption>Source: <a href="https://www.pewresearch.org/wp-content/uploads/2023/08/SR_23.08.28_views-of-ai_3.png">Pew Research Center Survey</a></figcaption></figure><p>The above image represents people’s opinions on whether <strong>artificial intelligence</strong> helps or hurts in specific settings. Even though people are more concerned about AI taking over their daily lives, opinions about the impact on particular areas are mixed. It reflects that people are more positive about AI improving different sectors, like healthcare, security, and others, rather than being negative about it. Out of all the aspects, one of the aspects where people’s opinions tend to fall towards the negative side is when it comes to AI keeping their personal information private; only 10% are sure that it helps, 37% of them aren’t sure, and 53% of them are sure that it’ll hurt more than helping it.</p><p>So overall, if we tend to summarize Pew Research’s latest study, people are interested and likely to support <strong>artificial intelligence</strong> in improving healthcare, security, and education aspects of society; however, it becomes a problem when it comes to their jobs. However, people are interested in witnessing life made easier by AI, but not at the expense of their livelihood.</p><p><strong>Does it Imply the Same to Generative AI?</strong></p><p>Generative AI marks the next evolutionary leap in artificial intelligence, which provides quick, efficient, and reliable answers to users’ queries and prompts. Tools like Chat GPT, one of the Gen AI-powered chatbots, are competent tools for generating accurate answers, responding quickly, and producing insightful information about a wide spectrum of topics. Before we delve into how it is unique, it is essential to understand how Chat GPT works:</p><p>● <strong>Pre-training — </strong>During the pre-training, the model learns to predict the next word in the sentence based on the training data comprising websites, books, and articles.</p><p>● <strong>Transformer architecture — </strong>Chat GPT is built on the transformer architecture, which is a neural network architecture comprising multiple layers of self-attention and a feed-forward neural network designed for processing sequential data like text.</p><p>● <strong>Fine-tuning — </strong>Fine-tuning is the next step after pre-training, where the Gen AI model is fine-tuned on more specific datasets, which human reviewers develop.</p><p>● <strong>Input processing — </strong>When the user provides a prompt, the model breaks it into smaller parts called tokens.</p><p>● <strong>Contextual understanding — </strong>The Chat GPT model processes the input text and captures the relationship between the tokens.</p><p>● <strong>Response generation — </strong>Based on the input and learned knowledge, the Gen AI model generates a response by predicting the most suitable word or token.</p><p>● <strong>Post-processing — </strong>After the response is generated, it is further processed by additional algorithms to improve the readability or coherence.</p><p>So, <strong>Gen AI tools</strong>, like Chat GPT, can provide quick and reliable answers depending upon their training. However, besides training, it learns from users. It makes<strong> Generative AI </strong>unique. Its capability to learn from human interaction and optimize communication accordingly. It makes it like a child who learns from their parents and elders and shares the information with their peers.</p><p><strong>Is There A Reason To Be Concerned?</strong></p><p>However, the thing that makes it unique is the thing that is concerning. Just like a child, if Chat GPT or other<strong> Generative AI </strong>tools are fed with improper and biased information, it can lead to the generation of unreliable and wrong answers or hallucinations. As per an experiment conducted by <a href="https://www.bcg.com/publications/2023/how-people-create-and-destroy-value-with-gen-ai"><strong>BCG</strong> (Boston Consulting Group)</a>, people mistrust Gen AI in areas where it contributes tremendous value and trust too much where it isn’t competent. The study finds that when implementing Gen AI in solving business problems, the group’s performance was 23% lower than that of the control group (who completed the task without GPT-4).</p><p>Besides, as per <a href="https://www.salesforce.com/news/stories/generative-ai-research/"><strong>Salesforce</strong></a>, 79% of senior IT leaders reported their concerns that Gen AI brings the potential for security risks, and another 73% shared their concerns regarding biased outcomes.</p><p>Security risks, integration, and siloed data are the top barriers to implementing Gen AI successfully within organizations. Besides, here are some other ethical concerns regarding the rise of Generative AI tools:</p><p>● <strong>Nothing new content, only plagiarized content</strong> — For all their shine, the Gen AI tools cannot produce anything new because it is beyond their capabilities. They are just making new patterns from the million examples available in their training set, and when we humans do, it is called plagiarism.</p><p>● <strong>Copyright matters </strong>— When plagiarism is a massive issue when one person copies from another, leading to a court case with millions imposed as a fine, does it exclude <strong>Generative AI</strong>? Copyright law is a complicated subject, and it will take time to settle the legal status of Gen AI.</p><p>● <strong>Privacy concerns — </strong>The training data for Gen AI has to come from somewhere, and the main concern arises: what if <strong>Gen AI</strong> leaks private and confidential information? It is tough to lock down certain information because they are meant to be flexible. Even if we limit access to particular information, there are myriad ways to take out the information. Like, the latitude and longitude of a specific asset are locked down; however, the attackers might ask the sun rising time for over several weeks, and a dutiful AI tool will answer. It is hard to teach an <strong>AI tool</strong> how to protect private information.</p><p><strong>Creating a Balanced World With Humans and Artificial Intelligence</strong></p><p><strong>Generative AI</strong> technology is riddled with vulnerabilities, reliability issues, inaccuracies, and security issues. However, this does not mean we should instill fear against it. Reflecting on past experiences, technologies once met with fear and skepticism, such as cloud computing and open-source software, are now integral components of our daily lives. Business leaders were concerned about data security, privacy, and reliability, and many organizations hesitated to adopt cloud computing due to the fear of unauthorized access, data breaches, and potential service outages.</p><p>However, the cloud providers boosted the security measures over time and implemented robust security measures, which made all the organizations embrace the technology change.</p><p>Similarly, there were concerns about the open-source software, which would need more quality, security, and support than other alternatives. There was skepticism surrounding the open-source software due to the fear of unregulated code modifications and lack of accountability. However, things didn’t turn out as it was perceived to have because the open-source software led to the development of highly reliable projects, like Linux, Apache, and My SQL.</p><p>So, in these changing times, enterprises need to implement AI and Gen AI with caution, just like we’ve done with other emerging technologies which has become a significant part of the world. Approximately, businesses aim to integrate Gen AI into their operations within the next 18 months, with 33% identifying it as a top priority. However, organizations should take measures to equip their team to use it responsibly and successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKe_oscaCNyoDpnpPkqALw.png" /><figcaption>Source: <a href="https://www.salesforce.com/news/wp-content/uploads/sites/3/2023/03/SocialCard_donutStats.jpg">Salesforce Insights</a></figcaption></figure><p>According to research, the successful integration of Gen AI into business operations can be facilitated by comprehensive, unified, and accurate data, coupled with enhanced security measures to guard against emerging cyber threats.</p><p>Also, enterprises and employers should work on eliminating the fear in employees’ minds that it is not being adopted to replace their jobs. Instead, it is designed to assist them with their job responsibilities. By eliminating the need for mundane work, they can contribute their time to other important activities that can help improve decisions for the greater good.</p><p><strong>Wrapping up,</strong></p><p>Even though the prospect of <strong>Generative AI </strong>sounds interesting, ensuring that everyone trusts it is essential. Trust is one of the crucial pillars to make anything work and effective.<a href="https://www.salesforce.com/news/stories/generative-ai-research/"> Around 83%</a> of senior IT leaders believe that measures should be taken to utilize the game-changing technology ethically.</p><p>AI and Generative AI is the next stepping stone that will change the way organizations analyze data, automate processes, and empower sales, marketing, and commerce professionals to grow customer relationships. However, the rising technology comes with its unique set of challenges and setbacks for both organizations and employees. Organizations are concerned about security issues, meanwhile employees are worried about their jobs.</p><p>If the employees feel that AI will cost them their jobs, forcing this new technology will be risky. That’s why positioning the AI tools as employee aids, not replacements, will help companies benefit from their investments. Moreover, companies should foster new thoughts in their employees’ minds, like how using this new technology in the right way will help them get ahead; it will assure you that your employees are on board with the technology and support to mature it.</p><p>An ethic-first approach grounded in trusted data and human-in-the-loop workflows is essential to safely and responsibly use Gen AI to meet the expectations of the growing customer base.</p><p>If you liked my story and want to support me,</p><p>Clap my article, that will help me out.👏<br>Follow me on Medium and subscribe to get my latest article🫶<br>Follow me on my <a href="https://www.linkedin.com/in/drkirankumarc/">LinkedIn</a> to get other information about data 🔭</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5af9882fb805" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Llama 2: Revolutionizing Generative AI]]></title>
            <link>https://medium.com/@kiran.phd.0102/introducing-llama-2-revolutionizing-generative-ai-22bf4bc4fe8c?source=rss-89abc90e6218------2</link>
            <guid isPermaLink="false">https://medium.com/p/22bf4bc4fe8c</guid>
            <dc:creator><![CDATA[Dr. Kiran Kumar]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 11:54:50 GMT</pubDate>
            <atom:updated>2023-10-07T10:42:09.319Z</atom:updated>
            <content:encoded><![CDATA[<p>With the launch of Llama 2, an AI-powered virtual assistant that transforms how to engage with technology, Meta, formerly Facebook, has made a notable advancement in <strong>generative AI</strong>. Meta released Llama 2 with an open license for commercial and research purposes, but a closer look at its terms suggests that it is more like open innovation than open source.</p><p>By introducing Llama 2, Meta revolutionized the traditional LLM models by utilizing grouper query attention, ghost attention, in-context temperature re-scaling, and temporal perception. Moreover, Llama 2 improved the Open AI architecture as the safety vs. helpfulness model&#39;s performance did not degrade but proved safer. It makes LLM adoption at the enterprise level to be more easier.</p><p><strong>Large Language Model Meta AI, or Llama 2,</strong> represents a watershed point in AI, where intelligence meets ingenuity, and its unrivaled powers have piqued the interest of researchers, developers, and tech enthusiasts worldwide. Let’s delve into Llama 2 and explore more about it!</p><h3>Exploring Llama 2</h3><p>Llama 2 is one of the most complex and comprehensive <strong>Generative AI </strong>models built by Meta (which was once known as Facebook). Llama 2, released in 2022, improves upon its predecessor, Llama 1, by having an architecture that has been enhanced for faster inference and by having been pre-trained on additional data. It is readily available on HuggingFace, Watson X, and Azure without straining much on pockets.</p><p><strong>Meta’s Llama 2</strong> employs a modified transformer architecture comparable to Llama 1 but with some significant differences. The key differences that make Llama 2 way more efficient than Llama 1 are its license terms, the pre-training corpus size was increased by 40%, the model’s context length was doubled to 4K, and group-query attention for its 70B parameter version.</p><h3>Understanding the Architecture of Llama 2</h3><p>Meta has released different versions of Llama 2 with 7B, 13B, and 70B parameters. Llama 2 is heavily tuned to align the model with human preference, leading to the development of Code Llama and Llama Chat.</p><p>Code Llama is an LLM-based Llama2 family focused on coding tasks. It already includes several enhancements and differences from earlier coding LLMs. It is built on Llama 2 and trained on 500B code tokens. It can support common programming languages, including Python, C++, Java, PHP, Typescript (Javascript), C#, and Bash. Code Llama is intended to assist software developers across many sectors, including research, industry, open-source initiatives, non-governmental organizations (NGOs), and enterprises.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*GNQMzuap8UBezTEjJ6O2Jg.png" /><figcaption>Source: <a href="https://arxiv.org/abs/2307.09288">Llama2:Open Foundation and Fine-Tuned Chat Models</a></figcaption></figure><p>The above image is an extract from the research paper <a href="https://arxiv.org/abs/2307.09288">Llama2:Open Foundation and Fine-Tuned Chat Models</a> from the authors of Gen AI, Meta. It describes the training process of Llama Chat, which comprises three stages: pretraining, supervised fine-tuning, and Reinforcement Learning with Human Feedback (RLHF).</p><p>Llama Chat, on the other hand, is specialized for dialogue-based use cases. Moreover, it plans to release the instruction-tuned version of Llama-Chat in the same three varieties, 7B, 13B, and 70B parameters. When comparing Llama-Chat to other open-source models, like Chat GPT, Llama-Chat performs better, with a massive margin of 60–75% based on several benchmarks. Let’s understand the architecture of Llama 2.</p><h3>Pre-Training Details</h3><p>Llama 2 uses a pre-normalization variant of the standard transformer block. Most transformer architectures use layer normalization; however, Meta’s Llama replaces this with a variant, Root Mean Square Layer Normalization, a simplified version of layer normalization to improve training stability and generalization.</p><p><strong>Meta’s Llama 2</strong> is trained on two trillion tokens, and the tokenizer uses the byte pair encoding (BPE) algorithm. The model uses the standard transformer architecture, applies RMSNorm pre-normalization, utilizes the SwiGLU activation function, and rotary positional embedding. Regarding the hyperparameters, the AdamW optimizer uses a cosine learning rate schedule with a warm-up of 2,000 steps. It decays the final learning rate to 10% of the peak learning rate. It utilized a weight decay of 0.1 and gradient clipping and performed well on various aspects, like coding, knowledge benchmarks, and common-sense reasoning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*BzyJW_LVvMb_C0LAGlDjhA.png" /><figcaption>Source: <a href="https://arxiv.org/abs/2307.09288">Llama2:Open Foundation and Fine-Tuned Chat Models</a></figcaption></figure><p>The above table compares the performance of Llama-2 on different parameters with other models, and Llama 2 outperforms in all aspects.</p><h3>Fine-Tuning</h3><p>Supervised Fine-Tuning (SFT) and Reinforcement Learning with Human Feedback (RLHF) approaches were used for fine-tuning the <strong>Llama 2 model</strong>. Let’s discuss the two methods individually:</p><p><strong>Supervised Fine-Tuning</strong></p><p>Meta used a novel approach by segmenting the lines of helpfulness and safety prompts as part of the set. Meta utilized publicly available instructions for tuning data and annotated approximately 27,540 instances, mainly focusing on data quality.</p><p>For the SFT phase, the developers employed a cosine learning rate schedule with an initial learning rate of 2*10–5, a weight decay of 0.1, a batch size of 64, and a sequence length of 4096 tokens. The hyperparameters were fine-tuned throughout two epochs. The training objective followed an autoregressive approach, where the loss of tokens from users was zeroed out, and backpropagation was performed only on answered tokens.</p><p><strong>RLHF Human Data Collection</strong></p><p>The annotators followed a specific process to collect the human data. Firstly, they had to create a prompt, and two model-generated responses had to be evaluated based on given criteria. The responses were sampled from two distinct model variants using temperature hyper-parameters to ensure diversity. The collected data was categorized based on helpfulness and safety, and this data served as the basis for the reward model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHzN5ygSzEbtUZryibUU3Q.png" /><figcaption>Courtesy: <a href="https://cameronrwolfe.substack.com/p/llama-2-from-the-ground-up#:~:text=For%20LLaMA%2C%20a%20pre%2Dnormalization,%2D50%25%20improvement%20in%20efficiency.">cameronrwolfe.substack.com</a></figcaption></figure><p>The image compares the standard LLM structure for next-token prediction with the structure of the LLM-based reward model.</p><p>Meta trained two distinct reward models; one (Helpfulness RM) was optimized for helpfulness, and the other (Safety RM) for safety. Human preference data was structured into a binary ranking label format, where the responses were distinguished as chosen or rejected to train the reward model. It was ensured that the selected response always received a more excellent score than its counterpart.</p><p>Moreover, Meta created various versions of RLHF (Reinforcement Learning with Human Feedback) from V1 to V5 using IFT with two algorithms, Proximal Policy Optimization and Rejection Sampling Fine-Tuning.</p><p>Meta implemented the GAtt (Ghost Attention) method to combat the loss of context in multi-turn conversations. The GAtt method focuses on artificially concatenating the instructions with all user messages within the conversation. The augmented dataset was sampled from the latest RLHF model, and as a result, they obtained a context-rich dialogue.</p><h3>Difference Between Llama and Llama 2</h3><p><strong>Meta’s Llama </strong>and Llama 2 differ primarily in training data, context length, and performance. Here are some of the significant distinctions between Llama 1 and Llama 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*FAjKE4PVzOeL6D5io857kw.png" /><figcaption>Comparison between Llama and Llama 2</figcaption></figure><h3>Which one is better: Llama 2 or Chat GPT?</h3><p>Llama 2 and Chat GPT are large language models trained with transformer architectures. <strong>Meta’s Llama 2</strong> was developed by Anthropic and is based on their Constitutional AI technique, which leverages self-supervised learning and model alignment to promote helpful, harmless, and honest behavior. Chat GPT, on the other hand, was created by OpenAI and uses its standard GPT-3 architecture without additional safety features. Let’s compare the two models in different aspects and analyze which one is better.</p><p><strong>Performance</strong></p><p>Although the GPT-3.5 model is less powerful than the GPT-4, it can handle most daily chores. Because the GPT-3.5 model is trained on internet data until June 2021, it lacks information on current issues. As a result, it is unable to create output on contemporary themes. The <strong>Llama 2 </strong>language model performs marginally better than the GPT-3.5 language model. Because the Llama 2 language model is trained using up-to-date Google information, it can be utilized to generate output on current themes.</p><p><strong>Safety Features</strong></p><p>When comparing Llama 2 with Chat GPT on safety levels,<strong> Llama 2</strong> wins the round. The developers run around 2000 evil prompts to extract sensitive information to assess the safety of Llama 2, and it outperformed its competitor, Chat GPT. The lower the percentage of security levels, the better the model. It scored 4%, indicating its ability to provide secure and limited information. The credit goes to heavy fine-tuning by humans, making Llama a perfect choice to develop chatbots.</p><p><strong>Usability and Accessibility</strong></p><p>Again, <strong>Meta’s Llama 2</strong> showcases better functionality than Chat GPT on the grounds of usability and accessibility. Llama 2 is an open-source model, and users can easily download and customize it according to their preferences. All they need to do is fill out a form, and they will receive a link to the GitHub repository when the request is accepted.</p><p>Regarding usability, Llama 2 has been optimized and extensively fine-tuned by humans to ensure the model aligns with human preferences. The optimization improves the user experience and makes it perfect for business applications.</p><p><strong>Take away</strong></p><p><strong>Meta’s Llama 2 </strong>offers significant advantages and benefits compared to Chat GPT because of its extensive fine-tuning, improved performance, family-friendly nature, and easy accessibility.</p><h3>The Bottom Line,</h3><p>Llama 2 is trained on a gigantic dataset that contains 6144 TB of text and code. It is over ten times the size of the dataset used to train Llama, which was trained on a dataset with 144 TB of text and code. Because of this, Llama 2 can provide more detailed and insightful responses and do a greater variety of jobs.</p><p>In the realm of <strong>generative artificial intelligence </strong>and natural language processing, the astounding accomplishment of Llama 2 stands out. Because of its remarkable performance capabilities, artificial intelligence research and applications have advanced to new heights.</p><p>While working with Llama 2 and other AI models with similar functionality, researchers, developers, and users must be aware of and comfortable with these limitations. We can harness the true potential of Llama 2 for the benefit of society if we address difficulties relating to computing requirements, bias mitigation, interpretability, and ethical considerations. Ultimately, taking a responsible and careful approach to utilizing AI models like <strong>Llama 2</strong> will pave the way for a future in which <strong>Generative AI</strong> contributes positively to numerous fields, enhancing human potential and building a high-tech, advanced world.</p><p>If you liked my story and want to support me,</p><p>Clap my article, that will help me out.👏<br>Follow me on Medium and subscribe to get my latest article🫶<br>Follow me on my <a href="https://www.linkedin.com/in/drkirankumarc/">LinkedIn</a> to get other information about data 🔭</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22bf4bc4fe8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Maximizing Language Model Training Efficiency: The Chinchilla way]]></title>
            <link>https://medium.com/@kiran.phd.0102/maximizing-language-model-training-efficiency-insights-from-chinchilla-paper-training-ccbbb173940?source=rss-89abc90e6218------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccbbb173940</guid>
            <dc:creator><![CDATA[Dr. Kiran Kumar]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 15:59:06 GMT</pubDate>
            <atom:updated>2023-09-20T17:25:50.335Z</atom:updated>
            <content:encoded><![CDATA[<p>In the ever-evolving landscape of artificial intelligence and natural language processing, one name consistently stands out as a beacon of innovation and excellence — DeepMind. The contributions made by this research powerhouse have not only reshaped the way we perceive AI but have also pushed the boundaries of what’s possible in the field.</p><p>Today, we have the privilege of delving into one of DeepMind’s recent endeavors, a paper titled “<a href="https://arxiv.org/abs/2203.15556">Training Compute-Optimal Large Language Models</a>,” authored by a team of experts whose brilliance continues to captivate the AI community. The realm of natural language processing has witnessed the ascent of Large Language Models (LLMs) in diverse linguistic tasks. Yet, training these giants requires massive computer power, which can incur massive costs.</p><p>While most think making models bigger is the key, a recent study by DeepMind argues that making them a bit smaller and training them more can work wonders. It can be associated with solving a puzzle with a set number of pieces. This study figures out how to arrange those pieces for the best result. By making models smaller and training them longer, we can save a lot of resources. This approach not only works better but also saves energy and money.</p><h3><strong>Understanding the Research Paper</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*wGIYt2sGpYVquRSBqvGoPw.jpeg" /><figcaption><strong><em>Figure 1: Overlaid predictions of the three approaches of the researchers compared with the Kaplan et al (2020) projections.</em></strong></figcaption></figure><p>This study introduces a paradigm shift based on Kaplan et al.’s power law hypothesis. Unlike the old belief that models can be super smart without getting the lowest possible errors, this study looks at things differently. It uses several methods and shows that making models smaller is important, but training them longer is also essential.</p><p>This study digs deep into the balance between model size, training examples, and computer power. By figuring out how much the model can learn with a certain amount of computer power, the research finds an ideal way to get the best results. Interestingly, when we compare models with the same computer power, the better ones are about four times smaller but learn from about four times more examples.</p><p>The research paper aims to uncover the most efficient strategies for training LLMs. The methodology involves analyzing various language models, ranging from those with 70 million to over 16 billion parameters. Their training spans a range of token counts, stretching from 5 billion to an impressive 500 billion tokens.</p><p>The importance of proportional scaling cannot be underestimated as the model size increases; the number of training tokens should also increase, a departure from conventional practices.</p><h3><strong>Importance of Compute-Optimal Training</strong></h3><p>Compute-optimal training is at the heart of this research. The idea revolves around training LLMs to maximize their performance while using a set amount of computational resources. Achieving this balance is crucial for efficiency and affordability. The approach involves optimizing the model size and training token count, considering how these factors interact with the available compute resources.</p><h3>Equal Scaling: Model Size and Training Tokens</h3><p>The paper’s core revelation is the necessity for equal scaling. Traditionally, when increasing the model size, training data remains constant. However, both factors must grow proportionally for optimal results. Equal scaling acknowledges that a larger model benefits from more extensive training, enabling it to reach its full potential. This approach signifies a paradigm shift in model development, leading to more effective language models.</p><h3>The Approaches</h3><p>It is essential to find the best balance between the size of language models and the amount of training data they use, all within a set amount of computer resources. There are three approaches to address this question: <em>How should we adjust model size and training data when we have a fixed computer resource limit?</em></p><p><strong>Approach 1: Change the number of training tokens and fix the model size</strong></p><p>Initially, the team explored various training sequences for models with different parameters (70M to over 10B). Each model underwent four training sequences. It gauged the lowest loss for specific training FLOPs. Fine-tuning involved distinct learning rate reduction for models with the same parameter counts across diverse training token horizons.</p><p>Loss curve smoothing and interpolation post-training enabled mapping FLOP count to training loss. The optimal model size and training tokens for any FLOP count were derived. Logarithmically spaced FLOP values identified the lowest-loss model size and needed training tokens.</p><p>The crux was fitting power laws to compute relationships between optimal model size, tokens, and computation. Findings revealed that both followed a power law with exponents of 0.50. This effective approach was validated against prior analyses, emphasizing its potential.</p><p><strong>Approach 2: Exploring IsoFLOP Profiles</strong></p><p>The second approach involves refining the model size within a set of fixed training FLOP counts (ranging from 6 × 10¹⁸ to 3 × 10²¹ FLOPs). Unlike the first approach, which considered various points along training runs, this strategy focuses on the final training loss at each point. This approach addresses a key question: <em>What is the optimal model size given a specific FLOP budget?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*pVOknls5mdVmNpYaUHmXWA.jpeg" /><figcaption><strong>Figure 2: IsoFLOP Curves</strong></figcaption></figure><p>By adjusting the number of training tokens to maintain a consistent final FLOP count, the research team identifies clear loss valleys for various model sizes (left side of Figure). It indicates that within a given FLOP budget, an optimal model for training exists. By pinpointing these valleys, optimal model size and tokens for larger models are extrapolated (center and right sides of Figure).</p><p>For each FLOP budget, the final loss is plotted against the parameter count (Figure, left). A diverse set of model sizes is trained to ensure clear loss minima. Fitting a parabola to each IsoFLOPs curve directly estimates the model size for minimal loss (Figure, left). A power law is fit between FLOPs, loss-optimal model size, and training tokens similar to the prior approach (Figures, center and right).</p><p><strong>Approach 3: Fitting a parametric loss function</strong></p><p>The final strategy involves modeling all final losses from the previous two approaches as a parametric function based on model parameters and the number of seen tokens. They considered different factors, like how well the model should perform ideally and how it should perform after training. They also thought that models are trained for a limited time, which affects their performance too.</p><p>To estimate the parameters (A, B, E, 𝛼, 𝛽), the research team minimizes the Huber loss between predicted and observed log losses using the L-BFGS algorithm. (an optimization algorithm to find the best combination of the variables to reach the lowest value of the function). The Huber loss robustly handles outliers, ensuring reliable predictive performance. The resulting power-law relationships are derived for 𝑁𝑜𝑝𝑡 and 𝐷𝑜𝑝𝑡, revealing the optimal model size and training tokens concerning computational capacity. The power-law exponents are 𝑎 = 0.46 and 𝑏 = 0.54.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*h3JnM5XgOMtSMNPFSPuIjg.jpeg" /></figure><p>The above table summarizes the estimated parameter and data scaling with increased training compute. The analysis suggests a near-equal scaling in parameters and data with increasing compute, which contrasts previous work (You may notice Kaplan et al.’s findings have a large parameter difference) on the scaling of large models.</p><h3><strong>Chinchilla: A Compute-Optimal Model</strong></h3><p>Chinchilla is a leaner 70-billion-parameter model. Trained on an expansive 1.4 trillion tokens, Chinchilla is a prime example of a compute-optimal model. This model is designed with careful consideration of the equal scaling principle. Comparing Chinchilla to other models like Gopher, GPT-3, Jurassic-1, and Megatron-Turing NLG reveals Chinchilla’s optimized specifications. Chinchilla’s superiority becomes apparent as its smaller size and more extensive training result in improved performance across various tasks.</p><h3>Downstream Evaluation Results</h3><p>Chinchilla’s prowess is evident in downstream evaluation tasks. Outperforming other models in areas such as Gopher, GPT-3, Jurassic-1, and Megatron-Turing NLG, Chinchilla’s accuracy and effectiveness stand out. Graphs and data illustrate Chinchilla’s superiority, solidifying its role as a top-tier LLM.</p><p><strong>Resource Efficiency: Chinchilla vs. Other Models</strong></p><p>Resource efficiency is a significant advantage of Chinchilla’s compute-optimal approach. When compared to other models, Chinchilla shines. Reduced compute requirements for fine-tuning and inference indicate cost savings and reduced environmental impact. Chinchilla’s streamlined approach highlights the potential to advance AI technology while being mindful of resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*G9jiss1zUWPIxS6tr0mpEA.jpeg" /><figcaption><em>Figure 3: Pile Evaluation graph which emphasizes the bits-per-byte emphasis improvement (decrease) of Chinchilla compared to Gopher.</em></figcaption></figure><p><strong>Application in Benchmarking: MMLU Accuracy</strong></p><p>Chinchilla’s remarkable performance on the MMLU benchmark showcases its capabilities. Benchmarks like MMLU hold significant sway in evaluating the linguistic proficiency of models. Chinchilla’s demonstrably heightened precision compared to counterparts such as Gopher accentuates its potential for real-world deployment, ushering in a paradigm shift in benchmarking metrics.</p><h3>Limitations</h3><p>Despite its groundbreaking insights, the research has limitations that merit consideration. The predictions are founded on a limited set of comparable training runs, primarily featuring Chinchilla and Gopher. The absence of intermediating scalar assessments, alongside the presumption of a power-law correlation interlinking computational resources, model dimensions, and training tokens, may be susceptible to slight overestimation, notably within higher computational scenarios.</p><h3><strong>Future Directions</strong></h3><p>Further research should prioritize the scaling of datasets. As model sizes continue to expand, data quality becomes increasingly crucial. Responsible collection of larger datasets, focusing on data quality and addressing train-test set overlap, is paramount. With the escalation of ethical and privacy concerns in trillion-token training scenarios, comprehensive introspection of scraped datasets containing toxicity, biases, and private information becomes even more imperative. Notably, the intriguing observation that Chinchilla is less affected by bias and toxicity than Gopher beckons for a more in-depth exploration in future research.</p><h3><strong>Reflections</strong></h3><p>The research by DeepMind serves as a pivotal turning point. By directing focus toward compute-optimal training and proportional scaling of model size and training tokens, untapped potential within existing resources is revealed. The significance of these findings reaches beyond language models, as the trade-off between model size and data holds across diverse domains. Applying this methodology to other modalities holds promise for a more efficient allocation of resources.</p><p>This approach lays the foundation for efficient model development as AI technology progresses. Emphasizing data quality and responsible dataset collection emerges as a critical component. By aligning compute resources with the optimal combination of model size and training tokens, performance and ethical considerations are also addressed. This study propels us toward a future where efficient AI innovation takes centre stage, guided by principles of resource allocation, effectiveness, and ethical mindfulness.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccbbb173940" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generative AI: Is it mere Hype or a portal to a new Future?]]></title>
            <link>https://medium.com/@kiran.phd.0102/generative-ai-is-it-mere-hype-or-a-portal-to-a-new-future-39701b24f5ae?source=rss-89abc90e6218------2</link>
            <guid isPermaLink="false">https://medium.com/p/39701b24f5ae</guid>
            <dc:creator><![CDATA[Dr. Kiran Kumar]]></dc:creator>
            <pubDate>Sun, 02 Jul 2023 17:13:16 GMT</pubDate>
            <atom:updated>2023-07-19T08:27:25.770Z</atom:updated>
            <content:encoded><![CDATA[<p>Just three decades ago, the meaning of AI was only limited to a person with a potential technical and scientific education. We never witnessed a large population of common people like a doctor, a lawyer, any form of civil servant, teachers, accountants, and many more ever hear of this name apart from some sci-fi Hollywood flicks. But today, the scene is entirely different. A student in 7th grade looks for a smartphone with an AI camera; a housewife looks for a refrigerator that works on AI principles; or an average user buys smart home appliances with AI controls. However, very few of us know the exact context of AI and it’s newly evolving form, i.e., Generative AI replacing the older version of AI.</p><figure><img alt="Figure 1 Overall Aspects of Generative AI" src="https://cdn-images-1.medium.com/max/934/1*PTaZoI3Gf9so2NuU3Ggo5Q.jpeg" /><figcaption><strong>Figure 1 Overall Aspects of Generative AI</strong></figcaption></figure><p>A generative AI, also known as a generative adversarial network, is used for data generation, creative output, simulation, and training. In Fig. 1, its importance is realized in various applications, e.g., Image and video synthesis, text generation, medical imaging, gaming, and virtual reality. From the perspective of a futuristic application, generative AI has proven its beneficial features towards transfer learning, creative potential, realistic output, and data augmentation. However, it is hard to say that it is one of the ultimate solutions for every futuristic application, as it is also shrouded with various challenges associated with ethical concerns, lack of control, mode collapse, and training complexity. The positive aspect is that this intelligence field is slowly but steadily penetrating the commercial market while various parallel investigations are consistently progressing among the research communities. To understand the application of generative AI, let us talk about ChatGPT, which is currently competing with the giant player in search engines, i.e., Google.</p><p>Well, many of us who have used ChatGPT will know its advantages over the regular search engine of Google, where the query response is generated precisely per the user’s needs with an explanatory description. At the same time, Google shows all the hit lists that must be manually visited one by one. As per recent news, Google Cloud is also advancing towards generative AI usage in their AI-based projects, i.e., Codey, Imagen, and Chirp. The Chirp can generate a foundation model to convert text and speech to code, images, and text. Well, that’s only what a few people or users have experienced, and now they are more aware of ChatGPT, which is making news. Well, ChatGPT is designed over GPT architecture and is a form of generative AI that is capable of generating the content of the text, images, video, programming codes, etc. It is specifically developed to generate a response to new content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FcuNgxZVTLncHgvMd6O-kg.jpeg" /><figcaption><strong>Fig. 2 Highlevel Workflow of Generative AI</strong></figcaption></figure><p>From an application viewpoint, ChatGPT can be potentially used in interactive storytelling, content generation, language learning, personal assistants, and customer support. It eventually feels like taking away most of the tasks humans perform. Well, it’s a long way to go, but this is still a small beginning towards the future. Many rumors claim that ChatGPT is just the beginning, that it cannot replace humans, and that it needs extensive training to build itself up to acquire such human-based intelligence capability. It feels like ChatGPT, a variant of generative AI, is just hype. We cannot conclude anything right now for this because, in reality, we can see various potential features in ChatGPT in the form of learning adaptation, knowledge and rich vocabulary, contextual dialogues, and language understanding by redefining NLPs. All these are just the beginning of a new era not witnessed by common people three decades ago.</p><p>But as I said, we cannot conclude anything because, after a more profound study of the usage of ChatGPT, I find that it has some issues, e.g., ethical concerns, inaccuracies, overconfidence, biased outputs, and a lack of common sense. However, given the reasonable attempt at amendments, all these issues will be overcome in due course of time, as ChatGPT is a potential variant of the Large Language Model (LLM) whose significance is realized by the good scope, and opportunities towards personalization, text generation, knowledge retrieval, and NLP using Machine translation, chatbots, and sentiment analysis. There is a reason to justify that LLM is not a hype, and it is a potential architecture capable of summarization and data analysis, customer support, language translation, content creation, and virtual assistants or chatbots. All these can be used for rapid prototyping, which is essential for every enterprise.</p><p>Hence, the future of generative AI is no longer a future, as the first step towards such a future has already been formulated in the form of LLM and ChatGPT. Slowly, with the increasing extent of researcher participation and collaborative investigation, the time is very close when we will all witness a potential population of various applications using generative AI. Hence, the hype factor is that there is close competition between OpenAI and Google. Still, in reality, the things evolving are generative AI and LLM to make evolutionary applications with different variants of upcoming applications.</p><p>We can say that Google and OpenAI are just masks, while behind the mask is the most potent face of generative AI.</p><p>Thank you for reading my first blog! I am excited to continue exploring and sharing insights in this space, and I look forward to writing more in the future. Stay tuned for more engaging content!</p><p>Please read my second article on the <a href="https://codecraft.medium.com/bloom-ai-model-the-stepping-stone-for-next-level-intelligence-911d51676bf7">BLOOM AI Model — The Stepping Stone For Next-Level Intelligence</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39701b24f5ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>