<?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 Mohamed SAIFI on Medium]]></title>
        <description><![CDATA[Stories by Mohamed SAIFI on Medium]]></description>
        <link>https://medium.com/@saifimsc?source=rss-b32c33d181eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ckfASowMW7n13f10pA0STA.png</url>
            <title>Stories by Mohamed SAIFI on Medium</title>
            <link>https://medium.com/@saifimsc?source=rss-b32c33d181eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 11:55:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@saifimsc/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[Les paramètres d’un LLM expliqués simplement : Temperature, Top-P, Top-K, Seed, Max Tokens…]]></title>
            <link>https://medium.com/@saifimsc/les-param%C3%A8tres-dun-llm-expliqu%C3%A9s-simplement-temperature-top-p-top-k-seed-max-tokens-7a3f868f7048?source=rss-b32c33d181eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a3f868f7048</guid>
            <dc:creator><![CDATA[Mohamed SAIFI]]></dc:creator>
            <pubDate>Thu, 23 Jul 2026 15:50:40 GMT</pubDate>
            <atom:updated>2026-07-23T15:50:40.550Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Lorsque nous utilisons un modèle de langage comme ChatGPT, Llama ou Gemma, nous obtenons parfois des réponses très créatives, parfois très précises, parfois totalement différentes alors que nous avons posé exactement la même question.</blockquote><blockquote><strong>Pourquoi ?</strong></blockquote><blockquote>La réponse se trouve dans <strong>les paramètres d’inférence du modèle</strong>.</blockquote><blockquote>Ces paramètres permettent de contrôler le comportement du LLM : son niveau de créativité, sa précision, sa longueur de réponse ou encore sa reproductibilité.</blockquote><blockquote>Dans cet article, nous allons découvrir les paramètres les plus importants utilisés dans la plupart des modèles modernes.</blockquote><h3>1. Les probabilités : le cœur d’un LLM</h3><p>Lorsque nous discutons avec ChatGPT, Gemini ou Llama, nous avons souvent l’impression que le modèle « réfléchit » avant de répondre.</p><p>En réalité, ce n’est pas exactement ce qu’il fait.</p><p>Un LLM génère <strong>un token à la fois</strong>, en prédisant quel sera le token le plus pertinent à ajouter à la suite du texte.</p><h3>Qu’est-ce qu’un token ?</h3><p>Un <strong>token</strong> est la plus petite unité de texte manipulée par un LLM.</p><p>Un token n’est pas forcément un mot entier.</p><p>Selon le modèle utilisé, un token peut représenter :</p><ul><li>un mot ;</li><li>une partie d’un mot ;</li><li>un signe de ponctuation ;</li><li>un nombre ;</li><li>ou même un espace.</li></ul><p>C’est pourquoi les modèles parlent souvent en <strong>nombre de tokens</strong> plutôt qu’en nombre de mots.</p><h3>Comment le modèle choisit le prochain token ?</h3><p>Imaginons que le modèle doive compléter cette phrase :</p><p><em>Je vais à la …</em></p><p>À cet instant, il calcule une probabilité pour <strong>des milliers de tokens</strong>.</p><p>Par exemple :</p><p>maison 42 %</p><p>plage 25 %</p><p>gare 18 %</p><p>bibliothèque 8 %</p><p>montagne 4 %</p><p>pharmacie 3 %</p><p>Ces probabilités représentent ce que le modèle considère comme les suites les plus plausibles.</p><p>Le modèle <strong>ne choisit pas automatiquement “maison”</strong>, même si c’est le mot le plus probable.</p><p>Il effectue ensuite un <strong>échantillonnage (sampling)</strong> parmi ces probabilités.</p><p>C’est précisément à ce moment que les paramètres comme <strong>Temperature</strong>, <strong>Top-P</strong> ou <strong>Top-K</strong> influencent la décision finale.</p><p>Sans ces paramètres, les réponses seraient presque toujours identiques.</p><h3>2. Temperature</h3><p>La <strong>Temperature</strong> contrôle le niveau d’aléatoire dans le choix du prochain token.</p><p>On peut la considérer comme un <strong>curseur de créativité</strong>.</p><ul><li>Température faible → réponses très prévisibles.</li><li>Température élevée → réponses plus variées.</li></ul><p>Attention : la Temperature <strong>ne modifie pas les probabilités calculées par le modèle</strong>. Elle modifie uniquement la façon dont elles sont utilisées pour effectuer le tirage du prochain token.</p><h3>Formule intuitive</h3><p>Mathématiquement, la Temperature agit avant la fonction Softmax.</p><p>L’idée est :</p><ul><li><strong>Temperature &lt; 1</strong> → accentue les différences entre les probabilités.</li><li><strong>Temperature = 1</strong> → aucune modification.</li><li><strong>Temperature &gt; 1</strong> → réduit les différences entre les probabilités.</li></ul><h3>3. Top-P (Nucleus Sampling)</h3><p>Même avec la Temperature, le modèle peut encore choisir parmi des milliers de tokens.</p><p>Le <strong>Top-P</strong> limite ce choix aux tokens les plus probables.</p><p>Prenons cette distribution :</p><pre>A 40%<br>B 25%<br>C 15%<br>D 10%<br>E 5%<br>F 5%</pre><p>On additionne les probabilités :</p><pre>A → 40%</pre><pre>A+B → 65%</pre><pre>A+B+C → 80%</pre><pre>A+B+C+D → 90%</pre><pre>A+B+C+D+E →95%</pre><p>Si :</p><pre>Top-P = 80%</pre><p>On conserve uniquement :</p><pre>A<br>B<br>C</pre><p>Tous les autres tokens sont supprimés.</p><p>Le modèle choisira ensuite <strong>au hasard uniquement parmi A, B et C</strong>.</p><p>Le nombre de tokens retenus varie donc selon la distribution.</p><h3>4. Top-K</h3><p>Top-K adopte une logique différente.</p><p>Au lieu de fixer un seuil de probabilité, il fixe un <strong>nombre maximal de candidats</strong>.</p><p>Exemple :</p><pre>A 40%<br>B 25%<br>C 15%<br>D 10%<br>E 5%<br>F 5%</pre><p>Si :</p><pre>Top-K = 3</pre><p>Le modèle garde :</p><pre>A<br>B<br>C</pre><p>Avec :</p><pre>Top-K = 5</pre><p>Il garde :</p><pre>A<br>B<br>C<br>D<br>E</pre><p>La différence essentielle est que <strong>Top-K conserve toujours exactement K tokens</strong>, tandis que <strong>Top-P conserve autant de tokens que nécessaire pour atteindre le seuil de probabilité choisi</strong>.</p><h3>5. Temperature + Top-P</h3><p>Ces deux paramètres sont souvent utilisés ensemble.</p><p>Leur rôle est complémentaire :</p><ul><li><strong>Temperature</strong> modifie la répartition des probabilités.</li><li><strong>Top-P</strong> choisit ensuite quels tokens restent éligibles.</li></ul><h3>Conclusion</h3><p>Les paramètres d’un LLM ne modifient pas ses connaissances, son entraînement ou sa capacité de compréhension. Ils influencent uniquement <strong>la manière dont le modèle génère ses réponses</strong>.</p><p>À chaque token, le modèle calcule une distribution de probabilités, puis utilise différents mécanismes pour sélectionner le token suivant. C’est précisément à cette étape que des paramètres comme <strong>Temperature</strong>, <strong>Top-P</strong>, <strong>Top-K</strong>, <strong>Max Tokens</strong> ou <strong>Seed</strong> entrent en jeu.</p><p>Comprendre ces paramètres est essentiel pour concevoir des applications d’IA performantes. Par exemple, un chatbot d’assistance privilégiera des réponses stables et cohérentes grâce à une faible <em>Temperature</em>, tandis qu’un assistant de rédaction ou de brainstorming utilisera une <em>Temperature</em> plus élevée pour favoriser la créativité. De la même manière, les paramètres tels que <strong>Structured Output</strong>, <strong>Stop Sequences</strong> ou <strong>Streaming</strong> permettent d’adapter le comportement du modèle à des cas d’usage professionnels comme les agents IA, les systèmes RAG, les assistants de code ou les applications d’entreprise.</p><p>En définitive, utiliser un LLM ne consiste pas seulement à écrire un bon prompt. C’est aussi savoir configurer les bons paramètres pour obtenir des réponses adaptées à chaque contexte. Deux applications utilisant exactement le même modèle peuvent produire des résultats très différents uniquement grâce à ces réglages.</p><p>À mesure que les modèles de langage évoluent, la maîtrise de ces paramètres devient une compétence incontournable pour tout développeur, ingénieur IA ou Data Engineer souhaitant créer des applications fiables, performantes et réellement utiles.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a3f868f7048" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Sovereignty: Understanding Who Controls Your Data]]></title>
            <link>https://medium.com/@saifimsc/data-sovereignty-understanding-who-controls-your-data-ff2714924ba7?source=rss-b32c33d181eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff2714924ba7</guid>
            <dc:creator><![CDATA[Mohamed SAIFI]]></dc:creator>
            <pubDate>Sun, 31 May 2026 16:42:09 GMT</pubDate>
            <atom:updated>2026-05-31T16:42:09.562Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s digital world, data is one of the most valuable resources. Every click, transaction, and interaction generates data that is stored, processed, and analyzed across the globe. But a critical question arises: <strong>who controls this data, and under which laws?</strong></p><p>This is where the concept of <strong>data sovereignty</strong> becomes essential.</p><h3>What is Data Sovereignty?</h3><p><strong>Data sovereignty</strong> means that data is governed by the laws and regulations of the country where it is physically stored or processed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FvnW2d0vzBBzkG_EX0SBIA.jpeg" /></figure><p>For example, if data is stored in France, it is subject to French and European Union laws, such as the GDPR, regardless of where the company or users are located.</p><h3>Why Data Sovereignty Matters</h3><h4>1. Privacy and Legal Compliance</h4><p>Different countries have different privacy laws. Organizations must ensure they comply with local regulations to avoid legal penalties.</p><h4>2. National Security</h4><p>Governments want to ensure that sensitive data (defense, citizens, infrastructure) remains under national control.</p><h4>3. Business Risk Management</h4><p>Companies must understand where their data is stored to avoid exposure to foreign surveillance laws or data access requests.</p><h4>4. Trust and Transparency</h4><p>Users are more likely to trust services that clearly explain where and how their data is stored.</p><h3>Data Sovereignty in Cloud Computing</h3><p>Cloud providers like AWS, Microsoft Azure, and Google Cloud offer <strong>regional data centers</strong>.</p><p>This allows organizations to:</p><ul><li>Choose where their data is stored (Europe, US, Asia, etc.)</li><li>Ensure compliance with local laws</li><li>Reduce latency and improve performance</li></ul><p>However, even in the cloud, sovereignty is complex because:</p><ul><li>A company may be headquartered in one country</li><li>Data may be processed in another country</li><li>Support or backups may be located elsewhere</li></ul><h3>Conclusion</h3><p>Data sovereignty is becoming a key pillar of modern digital infrastructure. As data continues to grow globally, organizations must carefully choose where and how they store data to ensure compliance, security, and trust.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff2714924ba7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Kimball methodology]]></title>
            <link>https://medium.com/@saifimsc/the-kimball-methodology-689cce5cc374?source=rss-b32c33d181eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/689cce5cc374</guid>
            <dc:creator><![CDATA[Mohamed SAIFI]]></dc:creator>
            <pubDate>Tue, 21 Oct 2025 16:13:06 GMT</pubDate>
            <atom:updated>2025-10-21T16:13:06.397Z</atom:updated>
            <content:encoded><![CDATA[<p>The Kimball methodology is an approach to building a data warehouse by integrating data from different sources into data marts (focused on specific business areas, like sales or finance), which are later combined to form an enterprise data warehouse.</p><p>It focuses on user needs, fast access to data, and ease of analysis through dimensional modeling — a structure organized around facts (quantitative data) and dimensions (contextual data).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*EjEVLAWTJDjZ8Z47SI3NjQ.png" /><figcaption>Kimball methodology architecture</figcaption></figure><h3>Key Principles</h3><p>· Bottom-up approach<br> → Start with small data marts for specific business processes, then integrate them into a larger warehouse.</p><p>· Dimensional modeling<br> → Data is modeled using fact tables (measurements like revenue, quantity) and dimension tables (descriptive data like product, time, location).</p><p>· Bus architecture<br> → Shared conformed dimensions (like Date, Product, Customer) ensure consistency across all data marts.</p><p>· Focus on business requirements<br> → The design is guided by how end users will query and analyze the data.</p><p>· Iterative development<br> → The warehouse is built in small, manageable steps rather than one large project.</p><h3><strong>Build a Dimensional Model for a Retail Sales Data Warehouse</strong></h3><p><strong>Objective</strong></p><p>Design a data warehouse schema for a retail company using the Kimball methodology — focusing on facts, dimensions, and grain definition.</p><h3>Business Scenario</h3><p>You are hired as a data engineer by <strong>RetailMart</strong>, a company that sells electronics and household goods both <strong>online</strong> and <strong>in physical stores</strong>.<br> The company wants to analyze:</p><ul><li>Daily sales across stores and regions</li><li>Product performance by category and supplier</li><li>Customer buying behavior</li><li>Promotion effectiveness</li></ul><h3>Step 1: Identify the Business Process</h3><p>The company wants to <strong>analyze sales transactions</strong>.<br> So the business process is: <strong>Sales</strong></p><p><strong>Step 2: Declare the Grain</strong></p><p>Decide the <strong>level of detail</strong> (grain) for the fact table.<br> Example:<br> Each row in the fact table represents <strong>one sales transaction line item</strong> — one product sold to one customer at one point in time.</p><p><strong>Step 3: Identify the Dimensions</strong></p><p>List the dimensions that describe the sales facts.</p><p>Possible dimensions:</p><ul><li><strong>Date</strong> (Day, Month, Quarter, Year, Holiday flag, etc.)</li><li><strong>Store</strong> (Store ID, Store Name, City, Region)</li><li><strong>Customer</strong> (Customer ID, Name, Gender, Age group, Loyalty level)</li><li><strong>Product</strong> (Product ID, Name, Category, Brand, Supplier)</li><li><strong>Promotion</strong> (Promotion ID, Type, Discount percentage, Start/End dates)</li><li><strong>Salesperson</strong> (Salesperson ID, Name, Region)</li><li><strong>Channel</strong> (Online / In-store)</li></ul><p><strong>Step 4: Identify the Facts</strong></p><p><strong>Facts are the numerical measurements that can be aggregated.<br> For this scenario, facts might include:</strong></p><ul><li><strong>Sales Amount</strong></li><li><strong>Quantity Sold</strong></li><li><strong>Discount Amount</strong></li><li><strong>Profit Amount</strong></li><li><strong>Cost Amount</strong></li></ul><p><strong>Step 5: Build the Star Schema</strong></p><p>Now, design your Star Schema with:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*gf79JMCD0IhVP6ApwmN_OQ.png" /></figure><p><strong>Slowly Changing Dimensions (SCD)</strong></p><p>For example:</p><p>· DimCustomer → Type 2 SCD (keep history when customer changes city, region, or loyalty level)</p><p>· DimProduct → Type 1 (overwrite if product name or other product attributes change)</p><p>· DimStore → Type 2 (Keep histort when Store changes city and region with adding flags).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=689cce5cc374" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Story with Data Modeling]]></title>
            <link>https://medium.com/@saifimsc/my-story-with-data-modeling-4c3bd2f95ac0?source=rss-b32c33d181eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c3bd2f95ac0</guid>
            <category><![CDATA[modern-data-architecture]]></category>
            <category><![CDATA[data-modeling]]></category>
            <category><![CDATA[data-management]]></category>
            <category><![CDATA[data-architecture]]></category>
            <dc:creator><![CDATA[Mohamed SAIFI]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 19:50:21 GMT</pubDate>
            <atom:updated>2025-10-18T19:50:21.469Z</atom:updated>
            <content:encoded><![CDATA[<p>I started my professional journey as a <strong>Network and Security Administrator</strong>, and from the beginning, I believed that building <strong>solid, scalable, and well-structured architectures</strong> is the key to success in IT and data projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*any6hQiKBmdiIrlzhlG3OQ.png" /><figcaption>Illustration of My Work in Network and Security Administration</figcaption></figure><p>Initially, I created tables directly in databases without any modeling or preparation, which caused many problems: redundancies, inconsistencies, and wasted time.</p><p>Determined to find a better way, on <strong>February , 2024</strong>, while scrolling through LinkedIn, I discovered a document about <strong>data modeling</strong>. That moment felt like finding a magic key — it opened my eyes to the world of designing efficient databases and data warehouses.</p><p>I dove deep into learning, exploring concepts that transformed my understanding of data:</p><ul><li><strong>Operational vs Analytical Databases</strong> (OLTP and OLAP systems)</li><li><strong>Entity-Relationship modeling</strong>, including <strong>Conceptual, Logical, and Physical models</strong></li><li><strong>Normalization</strong>, <strong>3NF</strong>, and data integrity techniques</li><li>…</li></ul><p>On the data warehouse side, I discovered best practices for analytics:</p><ul><li><strong>Kimball methodology</strong></li><li><strong>Fact tables and Dimension tables</strong></li><li><strong>Star schema and Snowflake schema</strong></li><li>Aggregation tables and designing for performance</li><li>…</li></ul><p>Through this journey, I learned how to <strong>design scalable databases and data warehouses</strong> that save time, reduce costs, and empower data professionals to work efficiently. Today, I’m passionate about applying these principles to every project, ensuring that the architecture is not just functional but also <strong>robust, maintainable, and future-proof</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c3bd2f95ac0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>