<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[databites.tech]]></title><description><![CDATA[Weekly curated insights to make you a better data professional 🧩]]></description><link>https://reads.databites.tech</link><image><url>https://substackcdn.com/image/fetch/$s_!nYiM!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151064b1-1b76-4f6d-adaf-0efcacff80d1_281x281.png</url><title>databites.tech</title><link>https://reads.databites.tech</link></image><generator>Substack</generator><lastBuildDate>Sun, 28 Jun 2026 19:36:18 GMT</lastBuildDate><atom:link href="https://reads.databites.tech/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Josep Ferrer]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[databites.hi@gmail.com]]></webMaster><itunes:owner><itunes:email><![CDATA[databites.hi@gmail.com]]></itunes:email><itunes:name><![CDATA[Josep Ferrer]]></itunes:name></itunes:owner><itunes:author><![CDATA[Josep Ferrer]]></itunes:author><googleplay:owner><![CDATA[databites.hi@gmail.com]]></googleplay:owner><googleplay:email><![CDATA[databites.hi@gmail.com]]></googleplay:email><googleplay:author><![CDATA[Josep Ferrer]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[Understanding The Decoder (Part III) ]]></title><description><![CDATA[Decoding the Encoder: A Deep Dive into Transformer Architecture]]></description><link>https://reads.databites.tech/p/understanding-the-decoder-part-iii</link><guid isPermaLink="false">https://reads.databites.tech/p/understanding-the-decoder-part-iii</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 28 Jun 2026 10:02:36 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/2d7eac57-91dd-4df5-bf4a-5c9871da088c_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article is the third (and last!) part of a <strong>three-part deep dive</strong> into one of the most revolutionary AI architectures of our time:</p><blockquote><p><strong>Transformers.</strong></p></blockquote><p>Here&#8217;s what&#8217;s coming your way:</p><p>&#9989; <strong>Week 1:</strong> Understanding the Transformers architecture &#8594;<strong> <a href="https://reads.databites.tech/p/the-transformers-architecture-part">Link</a></strong><br>&#9989; <strong>Week 2: </strong>The Encoder &#8594; <strong><a href="https://reads.databites.tech/p/understanding-the-encoder-part-ii">Link</a></strong><br>&#9989; <strong>Week 3:</strong> The Decoder &#8594; <strong><a href="https://reads.databites.tech/p/understanding-the-decoder-part-iii">Link</a></strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2><strong>Understanding the Decoder - Part III</strong></h2><p>The <strong>decoder&#8217;s primary role</strong> is to <strong>generate text sequences</strong> step by step, transforming encoded information into meaningful output.</p><p>Structurally, the decoder <strong>mirrors the encoder</strong> in many ways&#8212;it consists of <strong>multiple layers</strong>, each containing:</p><ul><li><p><strong>Two multi-headed attention mechanisms</strong></p></li><li><p><strong>A pointwise feed-forward layer</strong></p></li><li><p><strong>Residual connections and layer normalization</strong> after each sub-layer</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!FRM5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!FRM5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 424w, https://substackcdn.com/image/fetch/$s_!FRM5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 848w, https://substackcdn.com/image/fetch/$s_!FRM5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 1272w, https://substackcdn.com/image/fetch/$s_!FRM5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!FRM5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png" width="1456" height="1577" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1577,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:804925,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159495118?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!FRM5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 424w, https://substackcdn.com/image/fetch/$s_!FRM5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 848w, https://substackcdn.com/image/fetch/$s_!FRM5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 1272w, https://substackcdn.com/image/fetch/$s_!FRM5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffd27c735-b79b-4f31-a25f-92f654d7fa3d_4182x4529.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s Architecture. </figcaption></figure></div><p>However, <strong>there&#8217;s a key difference</strong>: while the encoder&#8217;s attention focuses <strong>only on the input sequence</strong>, the decoder&#8217;s attention is <strong>split into two distinct tasks</strong>:</p><ol><li><p><strong>Masked Self-Attention</strong> &#8211; Ensures that the decoder can only attend to <strong>previous</strong> tokens, preventing it from &#8220;cheating&#8221; by looking ahead.</p></li><li><p><strong>Encoder-Decoder Attention</strong> &#8211; Allows the decoder to focus on <strong>relevant encoded information</strong>, guiding the text generation process.</p></li></ol><p>The <strong>final step</strong> in the decoder is a <strong>linear layer</strong>, which acts as a classifier, followed by a <strong>softmax function</strong> to assign probabilities to possible next words.</p><p>The Transformer decoder operates <strong>autoregressively</strong>&#8212;meaning it generates one token at a time, <strong>starting with a special start token</strong>.</p><ul><li><p>At each step, it takes into account <strong>previously generated tokens</strong> and <strong>encoder outputs</strong> to predict the next word.</p></li><li><p>This process repeats <strong>until it generates a special end token</strong>, signaling that the sequence is complete.</p></li></ul><p>Through this <strong>step-by-step decoding process</strong>, the model crafts <strong>coherent, context-aware text</strong>. </p><p>And this is precisely&#8230; <strong>the foundation of AI-powered language generation. </strong></p><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!r46j!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!r46j!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 424w, https://substackcdn.com/image/fetch/$s_!r46j!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 848w, https://substackcdn.com/image/fetch/$s_!r46j!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 1272w, https://substackcdn.com/image/fetch/$s_!r46j!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!r46j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png" width="1456" height="1943" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1943,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3007687,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201766131?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!r46j!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 424w, https://substackcdn.com/image/fetch/$s_!r46j!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 848w, https://substackcdn.com/image/fetch/$s_!r46j!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 1272w, https://substackcdn.com/image/fetch/$s_!r46j!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19a74c32-1b76-4ab5-aadf-7d8f249721f0_3737x4986.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And now&#8230; let&#8217;s break it down!</p><h2><strong>STEP 1 - Target Sequence Embedding</strong></h2><p>The decoder starts by embedding the <strong>target sequence</strong>&#8212;the sequence of tokens that have been generated so far. This process is similar to the <strong>input embeddings</strong> in the encoder but applies to the <strong>decoder&#8217;s inputs</strong> instead.</p><p>&#128161; <strong>Key Difference:</strong></p><ul><li><p>The <strong>encoder processes the full input sequence at once</strong>.</p></li><li><p>The <strong>decoder works autoregressively</strong>, meaning it <strong>processes tokens one by one</strong>, using previously generated tokens as inputs.</p></li></ul><p>(&#9888;&#65039; <strong>Missed Part 1 and Part II?</strong> Check them out to get the full picture &#128071;&#127995;)</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;d946ac36-26f8-423c-8f1a-cf13a5df7a63&quot;,&quot;caption&quot;:&quot;This article aims to kicking off a three-part deep dive into one of the most revolutionary AI architectures of our time:&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;CS8 - The Transformers Architecture &#129302; (Part I)&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:132707413,&quot;name&quot;:&quot;Josep Ferrer&quot;,&quot;bio&quot;:&quot;Outstand using data -- Data Science, Design and Tech Tech Writer @KDnuggets @DataCamp &#128073;&#127995;Inquiries in rfeers@gmail.com&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd196b5a6-59f2-46dd-99b3-e10ab1bbd27d_604x604.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-17T19:41:35.310Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f8e2dca1-4f84-497f-99a9-e808b983bae5_1465x1057.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.databites.tech/p/cs8-the-transformers-architecture&quot;,&quot;section_name&quot;:&quot;Cheatsheets &#129513;&quot;,&quot;video_upload_id&quot;:null,&quot;id&quot;:159282974,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:1,&quot;comment_count&quot;:1,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;DataBites&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe930fbab-b8df-40ef-9676-3d9ca5d49eae_714x714.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;8df45dae-00c6-4224-a2fa-9dc29f5da14a&quot;,&quot;caption&quot;:&quot;This article is the second part of a three-part deep dive into one of the most revolutionary AI architectures of our time:&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;CS9 - Understanding The Encoder &#129302; (Part II) &quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:132707413,&quot;name&quot;:&quot;Josep Ferrer&quot;,&quot;bio&quot;:&quot;Outstand using data -- Data Science, Design and Tech Tech Writer @KDnuggets @DataCamp &#128073;&#127995;Inquiries in rfeers@gmail.com&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd196b5a6-59f2-46dd-99b3-e10ab1bbd27d_604x604.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-23T11:00:39.119Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/faa3c49f-d92a-4b07-b3d8-caef3d2d3b30_1465x1057.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.databites.tech/p/cs9-the-transformers-architecture&quot;,&quot;section_name&quot;:&quot;Cheatsheets &#129513;&quot;,&quot;video_upload_id&quot;:null,&quot;id&quot;:159489412,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:7,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;DataBites&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe930fbab-b8df-40ef-9676-3d9ca5d49eae_714x714.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><h2><strong>STEP 2 - Positional Encoding</strong></h2><p>Since Transformers <strong>lack recurrence</strong>, they rely on <strong>positional encodings</strong> to retain word order information. Just like in the encoder, the decoder adds <strong>sine and cosine-based positional encodings</strong> to its embedded inputs.</p><p>These enriched vectors are then fed into the <strong>first multi-head attention layer</strong>, where the model <strong>computes attention scores specific to the decoder&#8217;s input</strong>.</p><h2><strong>STEP 3 - Stack of Decoder Layers</strong></h2><p>Like the encoder, the decoder consists of <strong>stacked identical layers</strong> (<strong>6 in the original Transformer</strong>). Each decoder layer contains <strong>three main sub-components</strong>:</p><h3><strong>3.1 Masked Self-Attention Mechanism</strong></h3><p>&#128269; <strong>What&#8217;s different from the encoder?</strong></p><ul><li><p>In the encoder, self-attention allows each word to attend to <strong>all words in the sequence</strong>.</p></li><li><p>In the decoder, <strong>self-attention is masked</strong>, meaning each word can <strong>only attend to previous words</strong>&#8212;not future ones.</p></li></ul><p>For example, when predicting the word <strong>&#8220;are&#8221;</strong>, the model <strong>must not see &#8220;you&#8221;</strong> before generating its output.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!oaKe!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!oaKe!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 424w, https://substackcdn.com/image/fetch/$s_!oaKe!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 848w, https://substackcdn.com/image/fetch/$s_!oaKe!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 1272w, https://substackcdn.com/image/fetch/$s_!oaKe!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!oaKe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png" width="1407" height="604" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:604,&quot;width&quot;:1407,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:155356,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201766131?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!oaKe!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 424w, https://substackcdn.com/image/fetch/$s_!oaKe!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 848w, https://substackcdn.com/image/fetch/$s_!oaKe!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 1272w, https://substackcdn.com/image/fetch/$s_!oaKe!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F79891535-fa2a-4e21-ac88-175e98e52406_1407x604.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>&#9989; <strong>How does masking work?</strong><br>A <strong>look-ahead mask</strong> is applied, setting attention scores for future words to <strong>negative infinity</strong>, effectively blocking them from being considered in the computation.</p><h3><strong>3.2 Encoder-Decoder Attention (Cross-Attention)</strong></h3><p>This is where the decoder <strong>interacts with the encoder&#8217;s output</strong>.</p><p>&#9989; <strong>How it works:</strong></p><ul><li><p>The <strong>queries</strong> come from the <strong>decoder&#8217;s previous layer</strong>.</p></li><li><p>The <strong>keys and values</strong> come from the <strong>encoder&#8217;s final output</strong>.</p></li></ul><p>This mechanism allows the decoder to <strong>focus on relevant parts of the encoded input</strong>, helping it generate more accurate and context-aware predictions.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PvfL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PvfL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 424w, https://substackcdn.com/image/fetch/$s_!PvfL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 848w, https://substackcdn.com/image/fetch/$s_!PvfL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 1272w, https://substackcdn.com/image/fetch/$s_!PvfL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PvfL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png" width="641" height="1009" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1009,&quot;width&quot;:641,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:108292,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201766131?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PvfL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 424w, https://substackcdn.com/image/fetch/$s_!PvfL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 848w, https://substackcdn.com/image/fetch/$s_!PvfL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 1272w, https://substackcdn.com/image/fetch/$s_!PvfL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e5280b2-a04d-4725-bdde-89307c75e36d_641x1009.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>Decoder&#8217;s workflow. Encoder-Decoder Attention.</em></p><p>&#128161; <strong>Why is this important?</strong><br>Cross-attention helps <strong>bridge the gap</strong> between encoded representations and the decoder&#8217;s <strong>partial sequence generation</strong>, ensuring that <strong>the generated output remains aligned with the original input</strong>.</p><h2><strong>3.3 Feed-Forward Neural Network</strong></h2><p>Each decoder layer includes a <strong>fully connected feed-forward network</strong>, applied independently to <strong>each position</strong> in the sequence.</p><p>It consists of:</p><ul><li><p>A <strong>first linear transformation</strong> (expanding features).</p></li><li><p>A <strong>ReLU activation function</strong> (introducing non-linearity).</p></li><li><p>A <strong>second linear transformation</strong> (projecting back to the embedding size).</p></li></ul><p>This <strong>enhances feature extraction</strong> before passing information to the next decoder layer.</p><h3><strong>3.4 Normalization and Residual Connections</strong></h3><p>Like in the encoder, each sub-layer (<strong>self-attention, cross-attention, and feed-forward network</strong>) is followed by:</p><p>&#9989; <strong>Residual connections</strong>, allowing gradients to flow efficiently.<br>&#9989; <strong>Layer normalization</strong>, stabilizing training and ensuring smoother learning.</p><h2><strong>STEP 4 - Linear Classifier and Softmax for Output Generation</strong></h2><p>At the final stage, the decoder&#8217;s processed output is passed through a <strong>linear layer</strong>, which acts as a classifier.</p><p>&#9989; <strong>How does it work?</strong></p><ul><li><p>The classifier&#8217;s size matches the <strong>total vocabulary size</strong> (e.g., <strong>50,000 words</strong> in GPT-3).</p></li><li><p>The output is a <strong>vector of probability scores</strong>, where <strong>higher scores indicate more likely words</strong>.</p></li></ul><p>These scores are then fed into a <strong>softmax function</strong>, which converts them into a probability distribution.</p><p>&#128161; <strong>Final word prediction:</strong><br>The word with the <strong>highest probability</strong> is selected as the next token in the sequence.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wILD!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wILD!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 424w, https://substackcdn.com/image/fetch/$s_!wILD!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 848w, https://substackcdn.com/image/fetch/$s_!wILD!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 1272w, https://substackcdn.com/image/fetch/$s_!wILD!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wILD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png" width="862" height="823" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:823,&quot;width&quot;:862,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:76352,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201766131?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wILD!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 424w, https://substackcdn.com/image/fetch/$s_!wILD!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 848w, https://substackcdn.com/image/fetch/$s_!wILD!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 1272w, https://substackcdn.com/image/fetch/$s_!wILD!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6cdf8640-27ba-4da2-9925-84ed68d6b4a6_862x823.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h2><strong>STEP 5 - Final Output and Autoregressive Decoding</strong></h2><p>The decoder <strong>reuses its own generated outputs</strong> as inputs for the next step, continuously predicting tokens <strong>until it generates a special end token</strong>.</p><p>&#9989; <strong>Key Takeaways:</strong></p><ul><li><p>The model <strong>processes one token at a time</strong>, making it <strong>autoregressive</strong>.</p></li><li><p>Each prediction is <strong>based on previous tokens</strong> and the <strong>encoder&#8217;s output</strong>.</p></li><li><p>The process <strong>continues iteratively</strong> until an <strong>end token</strong> signals the completion of the sequence.</p></li></ul><p>&#128161; <strong>More Layers = Better Context Understanding</strong><br>The Transformer <strong>stacks multiple decoder layers</strong>, extracting <strong>diverse attention patterns across multiple attention heads</strong>, leading to <strong>more accurate and coherent text generation</strong>.</p><h3><strong>Final Architecture</strong></h3><p>The complete <strong>Transformer architecture</strong>, as introduced in the original paper, consists of <strong>stacked encoder-decoder layers</strong> working in harmony to process inputs and generate outputs efficiently and it looks as follows &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-VaJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-VaJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 424w, https://substackcdn.com/image/fetch/$s_!-VaJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 848w, https://substackcdn.com/image/fetch/$s_!-VaJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 1272w, https://substackcdn.com/image/fetch/$s_!-VaJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-VaJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png" width="1335" height="1459" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1459,&quot;width&quot;:1335,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:235859,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201766131?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!-VaJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 424w, https://substackcdn.com/image/fetch/$s_!-VaJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 848w, https://substackcdn.com/image/fetch/$s_!-VaJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 1272w, https://substackcdn.com/image/fetch/$s_!-VaJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5dc65d8e-88fc-4cb3-acc8-bfa6d5bd820d_1335x1459.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>This powerful structure forms the <strong>foundation</strong> of modern AI models like<strong> GPT, Deepseek, and Gemini!</strong></p><p>&#8212;Josep</p><div><hr></div><h2>Are you still here? &#129488;</h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:575974}" data-component-name="PollToDOM"></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support, </strong><em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/iamjosepferrer/">LinkedIn</a> and</strong> <strong><a href="https://x.com/iamjosepferrer">X (Twitter)</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@iamjosepferrer">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul>]]></content:encoded></item><item><title><![CDATA[You don't have a time problem. You have an anchor problem.]]></title><description><![CDATA[When I first went freelance, I had three clients inside two months.]]></description><link>https://reads.databites.tech/p/have-time-problem-you-have-anchor-problem</link><guid isPermaLink="false">https://reads.databites.tech/p/have-time-problem-you-have-anchor-problem</guid><pubDate>Tue, 23 Jun 2026 10:00:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/37018116-2886-4965-a047-887f4153c528_1290x1251.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I first went freelance, I had three clients inside two months.</p><p>My instinct was to separate everything cleanly. One client on Monday and Tuesday. Another on Wednesday and Thursday. Fridays for admin, proposals, the business side of things.</p><p><em>Three clients. Five days. Neat boxes.</em></p><p>It worked for about a month.</p><p>Then a client needed something on a Thursday. Another pushed a deadline to the following Monday. The system I&#8217;d built assumed the work would respect the calendar. It didn&#8217;t.</p><p>Every time something shifted, the whole week collapsed.</p><p>I spent more energy rearranging the boxes than doing the actual work.</p><p>What I learned, slowly and through a lot of wasted Sundays, is that time blocking doesn&#8217;t work if everything is negotiable. The calendar fills up. Something always feels more urgent. The blocks move, and then they disappear.</p><p><strong>The only thing that actually holds is protecting the minimum non-negotiable for each thing that matters.</strong></p><p>Not a full day. Not a morning.</p><p>One moment. One slot. Immovable.</p><p>For the newsletter: Tuesday evening, diagram first. If the diagram exists by Tuesday night, the week has a centre.</p><p>For the data science work: the first two hours of the morning, before anything else loads in.</p><p>For consulting: one fixed client call day, everything else asynchronous.</p><p>For rest: Saturday morning, untouched. Non-negotiable in the same way the others are.</p><p><em>The rest of the week can flex around those anchors.</em></p><p>When a client pushes a deadline, I know what I&#8217;m protecting and what can move. When a week gets complicated, the minimum still happens. The newsletter still goes out. The deep work still gets its two hours.</p><p>The mistake most people make is treating their whole week as schedulable. They try to plan everything and protect nothing.</p><p><strong>The week you plan in full is the week that falls apart. The week built on protected minimums is the one that holds.</strong></p><p>It took me longer to learn this than it should have.</p><blockquote><p>One non-negotiable per thing. Everything else finds its place around them.</p></blockquote><p>&#8212; Josep</p><div><hr></div><h2><strong>Are you still here? &#129488;</strong></h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:556636}" data-component-name="PollToDOM"></div><p></p><p>Before you go,<strong> tap the &#128154; and the restack buttons at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><div><hr></div><p>What's the one thing in your week you'd never let slip? Hit&#128071;&#127995;</p>]]></content:encoded></item><item><title><![CDATA[Understanding The Encoder (Part II) ]]></title><description><![CDATA[Decoding the Encoder: A Deep Dive into Transformer Architecture]]></description><link>https://reads.databites.tech/p/understanding-the-encoder-part-ii</link><guid isPermaLink="false">https://reads.databites.tech/p/understanding-the-encoder-part-ii</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 21 Jun 2026 10:02:06 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0f995612-f190-4a22-91db-496ca1408798_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article is the second part of a <strong>three-part deep dive</strong> into one of the most revolutionary AI architectures of our time:</p><blockquote><p><strong>Transformers</strong></p></blockquote><p>Here&#8217;s what&#8217;s coming your way:</p><p>&#9989; <strong>Week 1:</strong> Understanding the Transformers architecture  &#8594; <strong><a href="https://reads.databites.tech/p/the-transformers-architecture-part">Link</a></strong><br>&#9989; <strong>Week 2:</strong> The Encoder &#8594; <strong><a href="https://reads.databites.tech/p/understanding-the-encoder-part-ii">Link</a></strong><br>&#128284; <strong>Week 3:</strong> The Decoder &#8594; Coming next 28th June 2026</p><h2><strong>Understanding the Encoder - Part II</strong></h2><p>The encoder is a<strong> fundamental component</strong> of the Transformer architecture. </p><p>The primary function of the encoder is: </p><div class="pullquote"><p>To transform the input tokens into contextualized representations. </p></div><p>Unlike earlier models that processed tokens <strong>independently</strong>, the Transformer encoder <strong>captures the context of each token in relation to the entire sequence</strong>.</p><p>Its structure consists of the following elements:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!L3b2!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!L3b2!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 424w, https://substackcdn.com/image/fetch/$s_!L3b2!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 848w, https://substackcdn.com/image/fetch/$s_!L3b2!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 1272w, https://substackcdn.com/image/fetch/$s_!L3b2!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!L3b2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png" width="1456" height="1223" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1223,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:469648,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!L3b2!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 424w, https://substackcdn.com/image/fetch/$s_!L3b2!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 848w, https://substackcdn.com/image/fetch/$s_!L3b2!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 1272w, https://substackcdn.com/image/fetch/$s_!L3b2!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9fd5aa6-3566-4517-977b-2ef130d6099f_3405x2860.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s architecture. </figcaption></figure></div><ul><li><p><strong>Multi-Head Self-Attention Layer</strong></p></li><li><p><strong>Layer Normalization (applied twice per layer)</strong></p></li><li><p><strong>Feed-Forward Neural Network</strong></p></li></ul><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TQQE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TQQE!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 424w, https://substackcdn.com/image/fetch/$s_!TQQE!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 848w, https://substackcdn.com/image/fetch/$s_!TQQE!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 1272w, https://substackcdn.com/image/fetch/$s_!TQQE!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TQQE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png" width="1456" height="1991" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1991,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3122897,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718744?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!TQQE!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 424w, https://substackcdn.com/image/fetch/$s_!TQQE!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 848w, https://substackcdn.com/image/fetch/$s_!TQQE!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 1272w, https://substackcdn.com/image/fetch/$s_!TQQE!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff5187ea7-28eb-41b5-b98e-353d31da91e2_3693x5050.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And now&#8230; let&#8217;s break it down!</p><h2>STEP 1 - Input Embeddings</h2><p>The <strong>embedding process</strong> occurs only in the <strong>bottom-most encoder</strong> layer. Remember that the<strong> encoder</strong> consists of <strong>multiple identical layers</strong> (<strong>six in the original model</strong>).</p><p>(&#128161; <strong>Missed Part 1?</strong> <a href="https://www.databites.tech/p/cs8-the-transformers-architecture">Check it out to get the full picture of how the Transformer works!</a>)</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;68444e01-6d9f-4931-8697-b5a65caae16b&quot;,&quot;caption&quot;:&quot;This article aims to kicking off a three-part deep dive into one of the most revolutionary AI architectures of our time:&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;CS8 - The Transformers Architecture &#129302;&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:132707413,&quot;name&quot;:&quot;Josep Ferrer&quot;,&quot;bio&quot;:&quot;Outstand using data -- Data Science, Design and Tech Tech Writer @KDnuggets @DataCamp &#128073;&#127995;Inquiries in rfeers@gmail.com&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd196b5a6-59f2-46dd-99b3-e10ab1bbd27d_604x604.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-03-17T19:41:35.310Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e0c65781-83bf-4cd7-ab52-bc42096e7666_1465x1057.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.databites.tech/p/cs8-the-transformers-architecture&quot;,&quot;section_name&quot;:&quot;Cheatsheets &#129513;&quot;,&quot;video_upload_id&quot;:null,&quot;id&quot;:159282974,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:1,&quot;comment_count&quot;:1,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;DataBites&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe930fbab-b8df-40ef-9676-3d9ca5d49eae_714x714.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>At this stage, the <strong>input tokens</strong>&#8212;whether words or subwords&#8212;are converted into dense <strong>numerical vectors</strong> using embedding layers. These <strong>embeddings capture the semantic meaning</strong> of the tokens, allowing the model to process them in a continuous space rather than as discrete symbols.</p><p>Each encoder <strong>receives a list of fixed-size vectors</strong> (typically <strong>512-dimensional</strong> in the original Transformer). In the <strong>first encoder</strong>, these are <strong>word embeddings</strong>, whereas in <strong>subsequent encoders</strong>, they are <strong>the transformed outputs from the previous encoder layer</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JsrW!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JsrW!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 424w, https://substackcdn.com/image/fetch/$s_!JsrW!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 848w, https://substackcdn.com/image/fetch/$s_!JsrW!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 1272w, https://substackcdn.com/image/fetch/$s_!JsrW!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JsrW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png" width="1456" height="497" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:497,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:524650,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!JsrW!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 424w, https://substackcdn.com/image/fetch/$s_!JsrW!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 848w, https://substackcdn.com/image/fetch/$s_!JsrW!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 1272w, https://substackcdn.com/image/fetch/$s_!JsrW!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8412f958-b23f-430c-b376-3e718813f0be_6120x2089.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Input embedding.</figcaption></figure></div><h2>STEP 2 - Positional Encoding</h2><p>Unlike RNNs, which inherently capture order due to their sequential nature, <strong>Transformers lack a built-in notion of token position</strong>. To overcome this, they use <strong>positional encodings</strong>, which are <strong>added to the input embeddings</strong> to provide information about token order.</p><p>These encodings are <strong>generated using sine and cosine functions</strong> at different frequencies, allowing them to represent positional information <strong>independent of sentence length</strong>. Each dimension in the positional encoding corresponds to a unique frequency, ensuring that every token position has a <strong>distinct representation</strong> with values ranging between <strong>-1 and 1</strong>.</p><p>By integrating these encodings, the model <strong>understands token positions</strong> without relying on recurrence, maintaining efficiency while capturing sequential dependencies.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3D0m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3D0m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 424w, https://substackcdn.com/image/fetch/$s_!3D0m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 848w, https://substackcdn.com/image/fetch/$s_!3D0m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 1272w, https://substackcdn.com/image/fetch/$s_!3D0m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3D0m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png" width="1456" height="1049" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1049,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:585107,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!3D0m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 424w, https://substackcdn.com/image/fetch/$s_!3D0m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 848w, https://substackcdn.com/image/fetch/$s_!3D0m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 1272w, https://substackcdn.com/image/fetch/$s_!3D0m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F58d0a916-7f96-43bd-995c-254d295c0c4b_4318x3112.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Positional encoding.</figcaption></figure></div><h2>STEP 3 - Stack of Encoder Layers</h2><p>Each <strong>encoder layer</strong> transforms the input sequence into a more abstract, context-aware representation.</p><p>Each encoder layer consists of two core submodules:</p><ul><li><p><strong>Multi-Head Self-Attention Mechanism</strong> (enabling the model to focus on relevant tokens)</p></li><li><p><strong>Feed-Forward Neural Network</strong> (enhancing learned features)</p></li></ul><p>Each submodule is <strong>wrapped in residual connections and followed by layer normalization</strong>, improving training stability and gradient flow.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LTKc!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LTKc!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 424w, https://substackcdn.com/image/fetch/$s_!LTKc!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 848w, https://substackcdn.com/image/fetch/$s_!LTKc!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 1272w, https://substackcdn.com/image/fetch/$s_!LTKc!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LTKc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png" width="1456" height="665" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:665,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:746945,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!LTKc!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 424w, https://substackcdn.com/image/fetch/$s_!LTKc!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 848w, https://substackcdn.com/image/fetch/$s_!LTKc!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 1272w, https://substackcdn.com/image/fetch/$s_!LTKc!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1a571d8f-b494-4d7f-a83c-7e8e80c87f50_5503x2513.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Stack of Encoder Layers.</figcaption></figure></div><h3>STEP 3.1 Multi-Headed Self-Attention Mechanism</h3><p>In the encoder, the <strong>multi-headed attention</strong> utilizes a specialized attention mechanism known as <strong>self-attention. </strong>It allows each token to <strong>attend to every other token in the sequence</strong>, enabling the model to capture contextual relationships effectively.</p><p>This approach enables the models to relate each word in the input with other words. For instance, in a given example, <strong>the model might learn to connect the word &#8220;are&#8221; with &#8220;you&#8221;.</strong></p><p>Each token is <strong>projected into three vectors</strong>:</p><ul><li><p><strong>Query (Q):</strong> Represents a specific word or token from the input sequence in the attention mechanism.</p></li><li><p><strong>Key (K):</strong> Represents another vector in the attention mechanism, corresponding to each word or token in the input sequence.</p></li></ul><ul><li><p><strong>Value (V):</strong> Each value is associated with a key and is used to construct the output of the attention layer. When <strong>a query and a key match well</strong> (<em>which means that they have a high attention score)</em> <strong>the corresponding value is emphasized in the output.</strong></p></li></ul><p><strong>Then the system computes Attention Scores.</strong></p><ul><li><p>The attention score between a query and a key is computed using a <strong>dot product</strong>.</p></li><li><p>Higher scores indicate a <strong>stronger relationship</strong> between tokens.</p></li></ul><p>The detailed architecture goes as follows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xpv4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xpv4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 424w, https://substackcdn.com/image/fetch/$s_!xpv4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 848w, https://substackcdn.com/image/fetch/$s_!xpv4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 1272w, https://substackcdn.com/image/fetch/$s_!xpv4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xpv4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png" width="355" height="452.7712912087912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1857,&quot;width&quot;:1456,&quot;resizeWidth&quot;:355,&quot;bytes&quot;:400494,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!xpv4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 424w, https://substackcdn.com/image/fetch/$s_!xpv4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 848w, https://substackcdn.com/image/fetch/$s_!xpv4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 1272w, https://substackcdn.com/image/fetch/$s_!xpv4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb6db674f-5071-45b1-83a8-fea38ab78789_2610x3328.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Multi-Headed Self-Attention Mechanism. </figcaption></figure></div><h4>3.1.1 Matrix Multiplication (MatMul) - Dot Product of Query and Key</h4><p>Once the query, key, and value vectors are passed through a linear layer, <strong>a dot product matrix multiplication is performed between the queries and keys</strong>, resulting in the creation of a score matrix.</p><p><strong>The score matrix establishes the degree of emphasis each word should place on other words. </strong>Therefore, each word is assigned a score in relation to other words within the same time step. <strong>A higher score indicates greater focus.</strong></p><p>This process effectively maps the queries to their corresponding keys.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sdrr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sdrr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 424w, https://substackcdn.com/image/fetch/$s_!sdrr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 848w, https://substackcdn.com/image/fetch/$s_!sdrr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 1272w, https://substackcdn.com/image/fetch/$s_!sdrr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sdrr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png" width="1456" height="414" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:414,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:392583,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!sdrr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 424w, https://substackcdn.com/image/fetch/$s_!sdrr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 848w, https://substackcdn.com/image/fetch/$s_!sdrr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 1272w, https://substackcdn.com/image/fetch/$s_!sdrr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb7f8670c-95b4-45e8-bb51-585c95ff78c4_4728x1343.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Attention mechanism - Matrix Multiplication.</figcaption></figure></div><h4>3.1.2 Reducing the Magnitude of attention scores</h4><p>The scores are then scaled down by dividing them by the square root of the dimension of the query and key vectors. This step is implemented to <strong>ensure more stable gradients</strong>, as the multiplication of values can lead to excessively large effects.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!tPOv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!tPOv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 424w, https://substackcdn.com/image/fetch/$s_!tPOv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 848w, https://substackcdn.com/image/fetch/$s_!tPOv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 1272w, https://substackcdn.com/image/fetch/$s_!tPOv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!tPOv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png" width="1456" height="876" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:876,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:147097,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!tPOv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 424w, https://substackcdn.com/image/fetch/$s_!tPOv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 848w, https://substackcdn.com/image/fetch/$s_!tPOv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 1272w, https://substackcdn.com/image/fetch/$s_!tPOv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcef2f1c1-a1a4-4cf0-b518-7a08d6575e5e_2324x1399.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Reducing the attention scores.</figcaption></figure></div><h4>3.1.3 Applying Softmax to the Adjusted Scores</h4><p>Subsequently, <strong>a softmax function is applied to the adjusted scores to obtain the attention weights.</strong> This results in probability values ranging from 0 to 1. </p><p>The softmax function emphasizes higher scores while diminishing lower scores, thereby enhancing the model&#8217;s ability to effectively <strong>determine which words should receive more attention.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dqJO!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dqJO!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 424w, https://substackcdn.com/image/fetch/$s_!dqJO!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 848w, https://substackcdn.com/image/fetch/$s_!dqJO!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 1272w, https://substackcdn.com/image/fetch/$s_!dqJO!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dqJO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif" width="1456" height="431" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/acc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:431,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Encoder&#8217;s workflow. Applying Softmax to the adjusted scores.&quot;,&quot;title&quot;:&quot;Encoder&#8217;s workflow. Applying Softmax to the adjusted scores.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Encoder&#8217;s workflow. Applying Softmax to the adjusted scores." title="Encoder&#8217;s workflow. Applying Softmax to the adjusted scores." srcset="https://substackcdn.com/image/fetch/$s_!dqJO!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 424w, https://substackcdn.com/image/fetch/$s_!dqJO!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 848w, https://substackcdn.com/image/fetch/$s_!dqJO!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 1272w, https://substackcdn.com/image/fetch/$s_!dqJO!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Facc392d5-5853-4cd5-9a20-352eddbcdbc3_1600x474.avif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Softmax adjusted scores.</figcaption></figure></div><h4>3.1.4 Combining Softmax Results with the Value Vector</h4><p>The following step of the attention mechanism is that weights derived from the softmax function are multiplied by the value vector, resulting in an output vector.</p><p>In this process, only the words that present high softmax scores are preserved. <strong>Finally, this output vector is fed into a linear layer for further processing.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9vM1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9vM1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 424w, https://substackcdn.com/image/fetch/$s_!9vM1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 848w, https://substackcdn.com/image/fetch/$s_!9vM1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 1272w, https://substackcdn.com/image/fetch/$s_!9vM1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9vM1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif" width="1456" height="541" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:541,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Encoder&#8217;s workflow. Combining Softmax Results with the value vector.&quot;,&quot;title&quot;:&quot;Encoder&#8217;s workflow. Combining Softmax Results with the value vector.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Encoder&#8217;s workflow. Combining Softmax Results with the value vector." title="Encoder&#8217;s workflow. Combining Softmax Results with the value vector." srcset="https://substackcdn.com/image/fetch/$s_!9vM1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 424w, https://substackcdn.com/image/fetch/$s_!9vM1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 848w, https://substackcdn.com/image/fetch/$s_!9vM1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 1272w, https://substackcdn.com/image/fetch/$s_!9vM1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F40d57203-e519-4492-aaca-6aa13ede4475_1600x595.avif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><em>Encoder&#8217;s workflow. Combining Softmax results with the value vector.</em></figcaption></figure></div><p>And we finally get the output of the Attention mechanism!</p><blockquote><p>So, you might be wondering why it&#8217;s called Multi-Head Attention?</p></blockquote><p>Remember that before the process starts, <strong>we break our queries, keys and values h times</strong>. </p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!n-8P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!n-8P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 424w, https://substackcdn.com/image/fetch/$s_!n-8P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 848w, https://substackcdn.com/image/fetch/$s_!n-8P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 1272w, https://substackcdn.com/image/fetch/$s_!n-8P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!n-8P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png" width="1456" height="800" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:800,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:964962,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/159489412?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!n-8P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 424w, https://substackcdn.com/image/fetch/$s_!n-8P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 848w, https://substackcdn.com/image/fetch/$s_!n-8P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 1272w, https://substackcdn.com/image/fetch/$s_!n-8P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09765bd7-49c9-4e11-a323-7a3f0c37ac6e_6147x3378.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Multi-Headed Self-Attention Mechanism. It is replicated h times. </figcaption></figure></div><p>This process, known as self-attention, <strong>happens separately in each of these smaller stages or &#8216;heads&#8217;.</strong> Each head works its magic independently, conjuring up an output vector.</p><p>This ensemble passes through a final linear layer, much like a filter that fine-tunes their collective performance.<strong> The beauty here lies in the diversity of learning across each head</strong>, enriching the encoder model with a robust and multifaceted understanding.</p><h4>STEP 3.2 Normalization and Residual Connections</h4><p>Each sublayer in the encoder (self-attention and feed-forward) is followed by:</p><ul><li><p><strong>Residual Connections:</strong> The input of each sublayer is <strong>added to its output</strong>, mitigating gradient vanishing issues and facilitating deeper networks.</p></li><li><p><strong>Layer Normalization:</strong> Helps stabilize training by standardizing activations, ensuring efficient learning.</p></li></ul><p>This <strong>same process</strong> is applied after both <strong>self-attention</strong> and <strong>feed-forward layers</strong>, improving model performance.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!LD_A!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!LD_A!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 424w, https://substackcdn.com/image/fetch/$s_!LD_A!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 848w, https://substackcdn.com/image/fetch/$s_!LD_A!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 1272w, https://substackcdn.com/image/fetch/$s_!LD_A!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!LD_A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif" width="1456" height="912" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:912,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Encoder&#8217;s workflow. Normalization and residual connection after Multi-Head Attention.&quot;,&quot;title&quot;:&quot;Encoder&#8217;s workflow. Normalization and residual connection after Multi-Head Attention.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Encoder&#8217;s workflow. Normalization and residual connection after Multi-Head Attention." title="Encoder&#8217;s workflow. Normalization and residual connection after Multi-Head Attention." srcset="https://substackcdn.com/image/fetch/$s_!LD_A!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 424w, https://substackcdn.com/image/fetch/$s_!LD_A!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 848w, https://substackcdn.com/image/fetch/$s_!LD_A!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 1272w, https://substackcdn.com/image/fetch/$s_!LD_A!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4c919288-9e32-460a-abc6-e33d19e7d933_1600x1002.avif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Normalization and residual connection after Multi-Head Attention.</figcaption></figure></div><h4>STEP 3.3 Feed-Forward Neural Network</h4><p>After attention processing, the sequence representation <strong>flows through a fully connected feed-forward network</strong>, refining the learned features.</p><p>This <strong>two-layer neural network</strong> consists of:</p><ol><li><p><strong>First Linear Layer:</strong> Expands the feature dimension.</p></li><li><p><strong>ReLU Activation:</strong> Introduces non-linearity.</p></li><li><p><strong>Second Linear Layer:</strong> Projects back to the original embedding size.</p></li></ol><p>The output of the feed-forward network is then <strong>normalized</strong> and <strong>added to the residual connection</strong>, completing the transformation cycle.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BET6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BET6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 424w, https://substackcdn.com/image/fetch/$s_!BET6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 848w, https://substackcdn.com/image/fetch/$s_!BET6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 1272w, https://substackcdn.com/image/fetch/$s_!BET6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BET6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif" width="1456" height="1224" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1224,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Encoder&#8217;s workflow. Feed-Forward Neural Network sub-layer.&quot;,&quot;title&quot;:&quot;Encoder&#8217;s workflow. Feed-Forward Neural Network sub-layer.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Encoder&#8217;s workflow. Feed-Forward Neural Network sub-layer." title="Encoder&#8217;s workflow. Feed-Forward Neural Network sub-layer." srcset="https://substackcdn.com/image/fetch/$s_!BET6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 424w, https://substackcdn.com/image/fetch/$s_!BET6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 848w, https://substackcdn.com/image/fetch/$s_!BET6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 1272w, https://substackcdn.com/image/fetch/$s_!BET6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F798895ac-dd64-4b6d-87b8-f32645d772d3_1600x1345.avif 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Encoder&#8217;s workflow. Feed-Forward Neural Network sub-layer.</figcaption></figure></div><h4>STEP 4 - Output of the Encoder</h4><p>After passing through multiple encoder layers, the final output is a <strong>set of contextualized vectors</strong>, each representing a token enriched with <strong>global sequence understanding</strong>.</p><p>This output serves as the <strong>input for the decoder</strong>, guiding it to generate relevant outputs by attending to specific encoder states.</p><p>Think of it as <strong>building a strong foundation</strong>, where each encoder layer contributes a new level of contextual refinement. The more layers, the <strong>richer and more abstract the representation</strong> becomes.</p><h2>Wrapping Up the Encoder, Teasing the Decoder</h2><p>Now that we&#8217;ve <strong>broken down the encoder</strong>, we&#8217;ve seen how it processes input sequences <strong>in parallel</strong>, capturing rich contextual representations that make Transformers so powerful.</p><blockquote><p>But what happens next?</p></blockquote><p><strong>That&#8217;s where the decoder comes in. </strong></p><p>Unlike the encoder, the decoder <strong>operates autoregressively</strong>, meaning it <strong>generates one token at a time</strong> while attending to both the encoded representations <strong>and its own past predictions</strong>. It also introduces a key difference&#8212;<strong>masked self-attention</strong>, which prevents the model from &#8220;peeking&#8221; at future tokens when generating text.</p><p>Next week, we&#8217;ll explore <strong>how the decoder builds on what the encoder has learned</strong> to generate coherent and meaningful sequences. </p><p>Stay tuned for our deep dive into the <strong>decoder!</strong></p><p>&#8212;Josep</p><div><hr></div><h2>Are you still here? &#129488;</h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:575941}" data-component-name="PollToDOM"></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support, </strong><em>it really helps and means a lot!</em></p><p>Loading...</p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/iamjosepferrer/">LinkedIn</a> and</strong> <strong><a href="https://x.com/iamjosepferrer">X (Twitter)</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@iamjosepferrer">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul>]]></content:encoded></item><item><title><![CDATA[You already have a personal brand. It's just not working for you.]]></title><description><![CDATA[Two years ago, I got a message from a university asking if I&#8217;d lead a subject in their master&#8217;s program.]]></description><link>https://reads.databites.tech/p/you-already-have-a-personal-brand</link><guid isPermaLink="false">https://reads.databites.tech/p/you-already-have-a-personal-brand</guid><pubDate>Tue, 16 Jun 2026 10:02:59 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f330c911-a0d5-4f42-b08d-67ff1abb0211_976x929.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Two years ago, I got a message from a university asking if I&#8217;d lead a subject in their master&#8217;s program.</p><p>I had never taught at a university before. </p><p>No formal teaching experience. No academic track record.</p><p><em>Just the diagrams.</em></p><p>They&#8217;d seen the work, decided I understood something worth teaching, and reached out.</p><p>I said yes. Went all in. And it became one of the most formative things I&#8217;ve done professionally.</p><blockquote><p>That&#8217;s the thing about a personal brand. It works when you&#8217;re not in the room.</p></blockquote><p>Most data professionals I know want nothing to do with the word. It sounds like something influencers do. Like you need a ring light and a content calendar and a strong opinion about your morning routine.</p><p><strong>That&#8217;s not what it is.</strong></p><p>A personal brand is just the answer to a question you&#8217;re not there to answer yourself: who is this person, and can I trust them with this problem?</p><p>Someone is always asking that question about you. </p><p><em>A hiring manager. </em></p><p><em>A potential client. </em></p><p><em>A colleague recommending you for a project.</em></p><p>Without a visible body of work, that question gets answered by whoever else is visible.</p><p>You don&#8217;t get to opt out of being evaluated. You only get to decide whether you&#8217;ve left anything behind that answers it fairly.</p><p>The objection I hear most:</p><blockquote><p><em>&#8220;I just want to do good work.&#8221;</em></p></blockquote><p>Good work that nobody can see is a private record of competence. It compounds inside one organisation, or it doesn&#8217;t compound at all.</p><p>The university didn&#8217;t find a CV. They found thinking made visible.</p><blockquote><p><strong>You don&#8217;t need to be famous. You need to be findable by the right people.</strong></p></blockquote><p>The bar is lower than most people think. The cost of staying invisible is higher than most people feel until it&#8217;s too late.</p><p>&#8212; Josep</p><div><hr></div><h2><strong>Are you still here? &#129488;</strong></h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:556578}" data-component-name="PollToDOM"></div><p></p><p>Before you go,<strong> tap the &#128154; and the restack buttons at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><div><hr></div><p>Has visible work ever opened a door you didn't knock on? Hit reply &#128071;&#127995;</p>]]></content:encoded></item><item><title><![CDATA[The Transformers Architecture (Part I)]]></title><description><![CDATA[Demystifying Transformers: A Three-Part Deep Dive into AI&#8217;s Most Powerful Architecture]]></description><link>https://reads.databites.tech/p/the-transformers-architecture-part</link><guid isPermaLink="false">https://reads.databites.tech/p/the-transformers-architecture-part</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 14 Jun 2026 10:02:12 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/7ebd9cbd-3944-4c3a-afd5-807f2ecb0f98_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This article aims to  kicking off a <strong>three-part deep dive</strong> into one of the most revolutionary AI architectures of our time:</p><blockquote><p><strong>Transformers.</strong></p></blockquote><p>Here&#8217;s what&#8217;s coming your way:</p><p>&#9989; <strong>Week 1:</strong> Understanding the Transformers architecture <br>&#128284; <strong>Week 2:</strong> The Encoder &#8594; Coming next 21st June 2026<br>&#128284; <strong>Week 3:</strong> The Decoder &#8594; Coming next 28th June 2026</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2><strong>The Transformers Architecture - Part I</strong></h2><p>With <strong>GPT-3.5</strong> gaining <strong>1 million users in a week</strong>, it&#8217;s clear AI is reshaping our world.</p><p>But <strong>how do these models actually work?</strong></p><blockquote><p><strong>The magic lies in the Transformer architecture</strong>, introduced in <strong>Google&#8217;s 2017 paper,</strong> <em><a href="https://arxiv.org/abs/1706.03762">&#8220;Attention is All You Need.&#8221;</a></em></p></blockquote><p>Before starting, here you have the full-resolution cheatsheet &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6yLM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6yLM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 424w, https://substackcdn.com/image/fetch/$s_!6yLM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 848w, https://substackcdn.com/image/fetch/$s_!6yLM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 1272w, https://substackcdn.com/image/fetch/$s_!6yLM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6yLM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png" width="1456" height="1944" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c784a13f-ca96-4db8-a577-95b180034373_3734x4986.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1944,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3079172,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!6yLM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 424w, https://substackcdn.com/image/fetch/$s_!6yLM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 848w, https://substackcdn.com/image/fetch/$s_!6yLM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 1272w, https://substackcdn.com/image/fetch/$s_!6yLM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc784a13f-ca96-4db8-a577-95b180034373_3734x4986.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>And now&#8230; let&#8217;s break it down!</p><h3>1 What is a Transformer?</h3><p>A transformer model is neural network that excels at understanding the context of sequential data and generating new data from it. Initially developed for <strong>machine translation</strong>, it has evolved to become the backbone of nearly all modern AI models.</p><p>The <strong>key innovation?</strong></p><p>Unlike traditional models that process words sequentially (like RNNs), <strong>Transformers process entire sequences at once</strong> using <strong>self-attention </strong>without using recurrence, allowing them to focus on relevant parts of the input sequence and understand the dependencies between them.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!esyg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!esyg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 424w, https://substackcdn.com/image/fetch/$s_!esyg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 848w, https://substackcdn.com/image/fetch/$s_!esyg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 1272w, https://substackcdn.com/image/fetch/$s_!esyg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!esyg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png" width="1456" height="263" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:263,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:170861,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!esyg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 424w, https://substackcdn.com/image/fetch/$s_!esyg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 848w, https://substackcdn.com/image/fetch/$s_!esyg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 1272w, https://substackcdn.com/image/fetch/$s_!esyg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F332eaccb-71e1-4cb3-b8cd-331c283f88f6_2838x512.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3>2 What is the Transformer Architecture?</h3><p>Transformers <strong>convert natural language input into natural language output</strong> without relying on RNNs or convolutions.</p><p>At a high level, a Transformer acts like a <strong>black box</strong> that deals with natural language. For instance, to translate a sentence we would have:</p><p>&#9989; <strong>Input:</strong> Spanish sentence &#8220;&#191;De qui&#233;n es?&#8221;<br>&#9989; <strong>Processing:</strong> The model encodes the meaning<br>&#9989; <strong>Output:</strong> English translation: &#8220;Whose is it?&#8221;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TJa1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TJa1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 424w, https://substackcdn.com/image/fetch/$s_!TJa1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 848w, https://substackcdn.com/image/fetch/$s_!TJa1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 1272w, https://substackcdn.com/image/fetch/$s_!TJa1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TJa1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png" width="1456" height="383" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:383,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:192415,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!TJa1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 424w, https://substackcdn.com/image/fetch/$s_!TJa1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 848w, https://substackcdn.com/image/fetch/$s_!TJa1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 1272w, https://substackcdn.com/image/fetch/$s_!TJa1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F61ba055a-a92a-4e2f-a930-80a66369722a_3327x876.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Inside this <strong>black box</strong>, we find two key components:</p><p>1&#65039;&#8419; <strong>The Encoder</strong> &#8211; Converts the input into a structured representation.<br>2&#65039;&#8419; <strong>The Decoder</strong> &#8211; Transforms this representation into the final output.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h4>2.1. The Encoder</h4><p>This part takes our input and converts it into a matrix representation. For example, it processes the Spanish sentence <em>&#8220;&#191;De qui&#233;n es?&#8221;</em> and transforms it into a structured format that captures the essence of the input.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UHus!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UHus!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 424w, https://substackcdn.com/image/fetch/$s_!UHus!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 848w, https://substackcdn.com/image/fetch/$s_!UHus!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 1272w, https://substackcdn.com/image/fetch/$s_!UHus!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UHus!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png" width="1456" height="996" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:996,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:320377,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!UHus!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 424w, https://substackcdn.com/image/fetch/$s_!UHus!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 848w, https://substackcdn.com/image/fetch/$s_!UHus!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 1272w, https://substackcdn.com/image/fetch/$s_!UHus!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8c223f4b-2276-4ebf-b02d-ec95cf78a49f_2547x1742.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>2.2. The Decoder</h4><p>This component receives the encoded representation and iteratively generates the output. In our case, it takes the encoded data and produces the translated sentence <em>&#8220;Whose is it?&#8221;</em> in English.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HV_K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HV_K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 424w, https://substackcdn.com/image/fetch/$s_!HV_K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 848w, https://substackcdn.com/image/fetch/$s_!HV_K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 1272w, https://substackcdn.com/image/fetch/$s_!HV_K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HV_K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png" width="1456" height="988" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:988,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:319874,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!HV_K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 424w, https://substackcdn.com/image/fetch/$s_!HV_K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 848w, https://substackcdn.com/image/fetch/$s_!HV_K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 1272w, https://substackcdn.com/image/fetch/$s_!HV_K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47d4429a-cdbf-49b4-acbc-d6c01f02233e_2568x1743.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2><strong>3. The Encoder-Decoder Structure &#128260;</strong></h2><p>Each Transformer consists of multiple <strong>encoder and decoder layers</strong> that refine and process the data step by step.</p><p>&#9989; <strong>Encoders</strong> process input sequentially through multiple layers.<br>&#9989; <strong>Decoders</strong> generate the output, using both the encoded data and previous decoder layers.</p><p>The original Transformer had <strong>6 Encoders &amp; 6 Decoders</strong>, but this structure is <strong>flexible.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SURK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SURK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 424w, https://substackcdn.com/image/fetch/$s_!SURK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 848w, https://substackcdn.com/image/fetch/$s_!SURK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 1272w, https://substackcdn.com/image/fetch/$s_!SURK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SURK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png" width="1456" height="982" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:982,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:363600,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!SURK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 424w, https://substackcdn.com/image/fetch/$s_!SURK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 848w, https://substackcdn.com/image/fetch/$s_!SURK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 1272w, https://substackcdn.com/image/fetch/$s_!SURK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffb965b56-b449-48a4-92ff-a08fc7e5272a_2496x1683.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h2><strong>4. Why Self-Attention Matters &#129327;</strong></h2><p>Instead of reading words in order, <strong>Transformers evaluate the entire sentence at once</strong>, focusing on the most relevant words.</p><p>&#128214; <strong>Example:</strong> <em>&#8220;The cat sat on the mat.&#8221;</em><br>&#128269; The Transformer immediately understands <strong>&#8220;cat&#8221;</strong> as the subject and <strong>&#8220;mat&#8221;</strong> as the object.</p><p>This makes <strong>translation, text generation, and AI-powered chatbots possible!</strong></p><p>The overall Transformers architecture looks something like follows &#128071;&#127995;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xLiz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xLiz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 424w, https://substackcdn.com/image/fetch/$s_!xLiz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 848w, https://substackcdn.com/image/fetch/$s_!xLiz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 1272w, https://substackcdn.com/image/fetch/$s_!xLiz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xLiz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png" width="1378" height="1563" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1563,&quot;width&quot;:1378,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:296680,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/201718708?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!xLiz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 424w, https://substackcdn.com/image/fetch/$s_!xLiz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 848w, https://substackcdn.com/image/fetch/$s_!xLiz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 1272w, https://substackcdn.com/image/fetch/$s_!xLiz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5db05740-4590-438e-8cf8-51599c2d0384_1378x1563.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>But no worries, we will focus on both the Encoder and the Decoder.</p><p><strong>Next Week: The Encoder Deep Dive, </strong>so stay tuned!</p><p>&#8212;Josep</p><div><hr></div><h2>Are you still here? &#129488;</h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:575914}" data-component-name="PollToDOM"></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support, </strong><em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/iamjosepferrer/">LinkedIn</a> and</strong> <strong><a href="https://x.com/iamjosepferrer">X (Twitter)</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@iamjosepferrer">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Your analysis was right. Nobody acted on it.]]></title><description><![CDATA[I once presented a model with 94% accuracy to a room of eight stakeholders.]]></description><link>https://reads.databites.tech/p/your-analysis-was-right-nobody-acted</link><guid isPermaLink="false">https://reads.databites.tech/p/your-analysis-was-right-nobody-acted</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 09 Jun 2026 10:02:49 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/19dcc5f3-e317-4936-a10d-585c8c02f88d_728x728.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I once presented a model with 94% accuracy to a room of eight stakeholders.</p><p>Nobody asked about the model.</p><p>They asked: <em>&#8220;What does this mean for us next quarter?&#8221;</em></p><p>I didn&#8217;t have that answer ready.</p><p>That&#8217;s not a modeling problem.</p><blockquote><p>That&#8217;s a communication problem.</p></blockquote><p>Most data education teaches you to build correctly.</p><p>Almost none of it teaches you to explain what you bui&#8230;</p>
      <p>
          <a href="https://reads.databites.tech/p/your-analysis-was-right-nobody-acted">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Mastering SQL Execution Order with JOINs]]></title><description><![CDATA[Mastering SQL Execution Order: How Queries Really Run Behind the Scenes]]></description><link>https://reads.databites.tech/p/mastering-sql-execution-order-with-fbd</link><guid isPermaLink="false">https://reads.databites.tech/p/mastering-sql-execution-order-with-fbd</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 07 Jun 2026 10:53:30 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/f4c250ac-d319-4962-a19b-ebd904699056_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Last week we broke down SQL&#8217;s execution order: your clauses don&#8217;t run in the order you write them. <code>FROM</code> first, <code>SELECT</code> fifth.</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;1999acf4-d3b4-4e61-9460-4424a272ec6d&quot;,&quot;caption&quot;:&quot;Every SQL query runs in two different orders.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;You write SELECT first. SQL runs it fifth.&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:132707413,&quot;name&quot;:&quot;Josep Ferrer&quot;,&quot;bio&quot;:&quot;Outstand using data -- Data Science, Design and Tech Tech Writer @KDnuggets @DataCamp &#128073;&#127995;Inquiries in rfeers@gmail.com&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd196b5a6-59f2-46dd-99b3-e10ab1bbd27d_604x604.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2026-05-31T09:30:56.677Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/900e252c-6d06-4959-a1c7-056a30f82ccb_1465x1057.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://reads.databites.tech/p/sql-execution-order-declarative-language-data&quot;,&quot;section_name&quot;:&quot;Visual Bites&quot;,&quot;video_upload_id&quot;:null,&quot;id&quot;:199918147,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:12,&quot;comment_count&quot;:0,&quot;publication_id&quot;:2143185,&quot;publication_name&quot;:&quot;databites.tech&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!nYiM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F151064b1-1b76-4f6d-adaf-0efcacff80d1_281x281.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><p>With one table, that&#8217;s easy to hold in your head. Add a <code>JOIN</code>, and one question trips up almost everyone: when you combine two tables and then filter them, what runs first?</p><p>The <code>JOIN</code>. It builds the combined table before any filter tou&#8230;</p>
      <p>
          <a href="https://reads.databites.tech/p/mastering-sql-execution-order-with-fbd">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[You're learning data science. You're not becoming one.]]></title><description><![CDATA[I once spent three weeks learning gradient descent.]]></description><link>https://reads.databites.tech/p/youre-learning-data-science-youre</link><guid isPermaLink="false">https://reads.databites.tech/p/youre-learning-data-science-youre</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 02 Jun 2026 10:01:45 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c0d30fdc-0d1c-4cc6-9b39-d34473f68252_1852x1862.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I once spent three weeks learning gradient descent.</p><p>Watched the videos. Did the math. Understood the intuition behind every update step.</p><p>Then I sat in front of a real dataset. Messy, incomplete, and half-documented. </p><blockquote><p>I had no idea what to do first.</p></blockquote><p>That&#8217;s the gap nobody talks about.</p><p><strong>Learning data science is something you can measure.</strong></p><p>Courses completed. Concep&#8230;</p>
      <p>
          <a href="https://reads.databites.tech/p/youre-learning-data-science-youre">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[You write SELECT first. SQL runs it fifth.]]></title><description><![CDATA[The hidden order your database uses to run every query, and why it explains your most confusing errors.]]></description><link>https://reads.databites.tech/p/sql-execution-order-declarative-language-data</link><guid isPermaLink="false">https://reads.databites.tech/p/sql-execution-order-declarative-language-data</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 31 May 2026 09:30:56 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/900e252c-6d06-4959-a1c7-056a30f82ccb_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every SQL query runs in two different orders.</p><p><strong>The one you wrote. And the one your database actually uses to run it.</strong></p><p>That&#8217;s it. Strip away the syntax, and that&#8217;s what&#8217;s happening underneath: the clauses you typed top to bottom get quietly reshuffled into a completely different sequence before a single row is touched.</p><p>Most people learn to <em>write</em> SQL. Almost n&#8230;</p>
      <p>
          <a href="https://reads.databites.tech/p/sql-execution-order-declarative-language-data">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[You don't have a consistency problem]]></title><description><![CDATA[When I moved to Rotterdam last year, I started three new things in four months.]]></description><link>https://reads.databites.tech/p/you-dont-have-a-consistency-problem</link><guid isPermaLink="false">https://reads.databites.tech/p/you-dont-have-a-consistency-problem</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 26 May 2026 10:03:21 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/0d43b5f1-08e7-4d4c-961b-be37fc9155e0_1518x1518.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I moved to Rotterdam last year, I started three new things in four months.</p><p><em>A new research project. </em></p><p><em>A new side concept I never shipped. </em></p><p><em>A new approach to content I mapped out in a notebook and never opened again.</em></p><blockquote><p><em>Each one felt like momentum. Each one was actually a reset.</em></p></blockquote><p>This is what happens without a system: you don&#8217;t stop working. </p><blockquote><p><strong>You just keep star&#8230;</strong></p></blockquote>
      <p>
          <a href="https://reads.databites.tech/p/you-dont-have-a-consistency-problem">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[The Art and Science of Data Visualization]]></title><description><![CDATA[Transforming raw data into compelling visual stories.]]></description><link>https://reads.databites.tech/p/the-art-and-science-of-data-visualization-92d</link><guid isPermaLink="false">https://reads.databites.tech/p/the-art-and-science-of-data-visualization-92d</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Sun, 24 May 2026 16:23:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ca2b89c0-3d80-4746-b132-a27afda59aab_1465x1057.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Every chart you&#8217;ve ever seen is built from exactly two things.</p><p><strong>Data. And a design decision.</strong></p><p>That&#8217;s it. Strip away the complexity and that&#8217;s what you&#8217;re left with, what information you&#8217;re showing, and how you&#8217;re choosing to show it.</p><p>Most people focus on the &#8220;what.&#8221; The best data communicators obsess over the &#8220;how.&#8221;</p><p>Today&#8217;s issue breaks down the foundation of Data Visualization: what a chart actually is, what types of data exist, and how visual encodings work. </p><p><em>Three cheatsheets. One complete picture.</em></p><p>As Alberto Cairo defines in his book The Functional Art:</p><blockquote><p>Data visualization is a collection of methods that use visual representations to explore, make sense of, and communicate quantitative data.</p></blockquote><p>Think of Data Visualization as our compass, guiding us through this numeric ocean, translating vast datasets into meaningful and understandable insights.</p><div class="pullquote"><p>3 DataViz Cheatsheets in the end &#8252;&#65039;</p></div><p><em>So, what constitutes an effective visualization?</em></p><p><em>What differentiates a visualization that illuminates from one that only adds to the confusion?</em></p><p>In our journey today, we delve into the core principles of Data Visualization.</p><p>This article aims to unravel the mysteries of this crucial skill, uncovering how it illuminates the path through the data-driven landscape we navigate daily.</p><p>So let&#8217;s try to understand together the theory behind Data Visualization &#128071;&#127995;</p><h2>The Basics Behind Data Visualization</h2><p>In the Data Science field, <strong>one of the most vital yet challenging skills is the art of storytelling through data.</strong> And this is precisely the field of Data Visualization. A glance at the dictionary definition gives us a clear starting point:</p><blockquote><p><em>&#8220;The act of representing information as a picture, diagram or chart, or a picture that represents information in this way&#8221;</em></p></blockquote><p>At its core, Data Visualization is about shaping a narrative from a dataset. </p><p><strong>It transforms data into a form that is not only digestible and visually appealing but also delivers a powerful impact.</strong></p><p>While it may not have the same reputation (or appeal) as other fields like Machine Learning, Data Visualization is a fundamental aspect of a data scientist&#8217;s toolkit.</p><p>In our modern, data-centric world, think of Data Visualization as a pair of glasses that brings clarity to a blurry scene.</p><p><em>So&#8230; a natural question that arises is, why do we need Data Visualization?</em></p><h2>A Brief Overview of the Data Visualization Field</h2><p>During the XX century, data was predominantly displayed in stark tables, with little consideration for ease of interpretation.</p><p>Not long ago,<strong> the types of charts and graphs we instantly recognize today would have been foreign to people.</strong></p><p>Modern concepts like Pie Charts, Bar Charts, and trend lines are quite modern developments. William Playfair is heralded as one of the pioneers of modern Data Visualization, credited with creating many of the graphical formats we use today.</p><p>And the big question is&#8230; <em>why did he do so?</em></p><p>When trying to identify Scotland&#8217;s most significant economic ties, Playfair realised that crafting a visualization with bars representing the number of importations and exportations for each partner smoothed the process.</p><p>And this is how the Bar Chart was born.</p><h3>Bar Chart&#8202;&#8212;&#8202;1781</h3><p>Bar Chart Playfair&#8217;s bar chart depicted Scotland&#8217;s trade balance with various European territories and the New World.</p><p>A glance at this chart revealed Scotland&#8217;s major trading partners and their respective trade volumes and balances.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fO0k!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fO0k!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 424w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 848w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1272w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fO0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png" width="500" height="336" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:336,&quot;width&quot;:500,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;William Playfair&#8217;s bar chart representing the most important scottish economic partners.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="William Playfair&#8217;s bar chart representing the most important scottish economic partners." title="William Playfair&#8217;s bar chart representing the most important scottish economic partners." srcset="https://substackcdn.com/image/fetch/$s_!fO0k!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 424w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 848w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1272w, https://substackcdn.com/image/fetch/$s_!fO0k!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fef07b77f-6ca9-4f93-ac79-f9c6dfffb146_500x336.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Playfair&#8217;s bar chart represents the most important Scottish economic partners.</figcaption></figure></div><h3>Line Chart&#8202;&#8212;&#8202;1786</h3><p>For England, with more data at his disposal, Playfair was able to produce time-series graphs.</p><p>At a glance, it highlights that until 1755, England had an unfavorable trade balance, which shifted to a favorable one from that year onwards.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iad0!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iad0!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 424w, https://substackcdn.com/image/fetch/$s_!iad0!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 848w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1272w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iad0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png" width="1280" height="946" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:946,&quot;width&quot;:1280,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;William Playfair&#8217;s line chart representing the trade balance between England and Norway and Denmark.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="William Playfair&#8217;s line chart representing the trade balance between England and Norway and Denmark." title="William Playfair&#8217;s line chart representing the trade balance between England and Norway and Denmark." srcset="https://substackcdn.com/image/fetch/$s_!iad0!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 424w, https://substackcdn.com/image/fetch/$s_!iad0!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 848w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1272w, https://substackcdn.com/image/fetch/$s_!iad0!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F77564ccb-1d29-4f97-ba34-468a97f22b27_1280x946.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Playfair&#8217;s line chart represents the trade balance between England, Norway and Denmark.</figcaption></figure></div><h3>Pie Chart&#8202;&#8212;&#8202;1801</h3><p>Fifteen years later, in 1801, Playfair designed the first known pie chart. This chart illustrates the proportions of England&#8217;s total trade volume with various regions of the world.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-WGb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-WGb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 424w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 848w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1272w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-WGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png" width="400" height="462" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c67633fa-c07c-401d-992e-451425163a06_400x462.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:462,&quot;width&quot;:400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;William Playfair&#8217;s pie chart representing Englan&#8217;d total trade volume with different regions.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="William Playfair&#8217;s pie chart representing Englan&#8217;d total trade volume with different regions." title="William Playfair&#8217;s pie chart representing Englan&#8217;d total trade volume with different regions." srcset="https://substackcdn.com/image/fetch/$s_!-WGb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 424w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 848w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1272w, https://substackcdn.com/image/fetch/$s_!-WGb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc67633fa-c07c-401d-992e-451425163a06_400x462.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">William Playfair&#8217;s pie chart represents England's total trade volume with different regions.</figcaption></figure></div><p>So basically, Data Visualization was born as a way to smooth the process of interpreting data.</p><p>It serves as a vital bridge, particularly for those who aren&#8217;t fluent in the complex languages of numbers and algorithms, allowing them to navigate and comprehend intricate data stories with ease.</p><h2>Data Visualization Basics</h2><p>One of the foundational concepts of the field of Data Visualization is that every chart or graphical representation we encounter is fundamentally constructed from two primary elements:</p><ul><li><p>Data</p></li><li><p>Visual elements</p></li></ul><p>It is quite difficult to attribute this specific statement to a single individual, as this is a basic idea held and expressed by many experts in the field.</p><p>However, one notable figure in Data Visualization who has emphasized the importance of combining data and visual elements effectively is Edward Tufte.</p><p>He has extensively written regarding the principles of good graphical representation, highlighting the interplay between data and visuals in creating meaningful and clear presentations of information.</p><h3>1. The key element: Data</h3><p>When contemplating Data Visualization, it&#8217;s common to first think of numerical data. However, this represents just a fraction of the wide variety of data types at our disposal. For effective visualization, it&#8217;s crucial to recognize and utilize the full spectrum of data types available.</p><p>This spectrum includes both continuous and discrete numerical values. According to Clause O. Wilke, beyond these, data can also manifest as discrete categories, temporal elements (like dates and times), and even textual information.</p><p>Each of these data types brings its own nuances and requires different visualization approaches. To categorize these data types further, we can consider:</p><ul><li><p>Numerical data as <strong>Quantitative,</strong> offering measurable and countable characteristics.</p></li><li><p>Categorical data as <strong>Qualitative</strong>, which includes dates, times, and text. It emphasizes non-numeric aspects and qualities.</p></li></ul><p>Recognizing these categories is fundamental in data visualization as it guides us in choosing the most appropriate and effective methods to represent our data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!q-IB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!q-IB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 424w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 848w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1272w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!q-IB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png" width="1200" height="685" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:685,&quot;width&quot;:1200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!q-IB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 424w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 848w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1272w, https://substackcdn.com/image/fetch/$s_!q-IB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7279366d-d45b-46ea-ae48-07e4e50e1862_1200x685.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by Author. Classification extracted from Fundamentals of Data Visualization, O&#8217;Reilly.</figcaption></figure></div><h3>2. The Art of Encoding Data&#8202;&#8212;&#8202;Visual Encodings&#127912;</h3><p>At the heart of Data Visualization lies the skill of visual encoding, where abstract numerical data is transformed into easily understandable graphical forms. This is akin to speaking a universal visual language, where everyone, regardless of their background in data analysis, can interpret the information at a glance.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G3vp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G3vp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 424w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 848w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1272w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G3vp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png" width="1456" height="987" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:987,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Visual Encoding of data. Image by the author.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Visual Encoding of data. Image by the author." title="Visual Encoding of data. Image by the author." srcset="https://substackcdn.com/image/fetch/$s_!G3vp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 424w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 848w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1272w, https://substackcdn.com/image/fetch/$s_!G3vp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8e9b291f-a9d0-49b0-8adf-863dd3edd8b4_1597x1083.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Interestingly, diverse visualization types, such as scatterplots, pie charts, and heatmaps, share a common visual dialect.</p><p>This shared language is all about converting data values into visual elements&#8202;&#8212;&#8202;think of it as turning cold numbers into vivid, colorful representations on your screen or paper.</p><p>Yet, here&#8217;s a fascinating aspect: <em>There&#8217;s an almost endless array of methods to visually represent data!</em></p><p>To simplify these methods, and according to <a href="https://www.cs.ubc.ca/~tmm/">T.Munzner</a>, there is a primary encoding type called Retinal Encoding.</p><ul><li><p><strong>Retinal Encodings: </strong>This category includes visual characteristics like shape, size, color, and intensity. These are the attributes that immediately grab our attention, acting as the visual &#8216;hook&#8217; of the data story. Each element&#8217;s distinct appearance plays a crucial role in how we perceive and interpret the data.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!BN5m!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!BN5m!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 424w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 848w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1272w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!BN5m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png" width="1456" height="961" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:961,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Retinal Encodings. Image by the author.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Retinal Encodings. Image by the author." title="Retinal Encodings. Image by the author." srcset="https://substackcdn.com/image/fetch/$s_!BN5m!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 424w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 848w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1272w, https://substackcdn.com/image/fetch/$s_!BN5m!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9b9539a-e31d-444d-b593-5ec1ea99cdd5_1795x1185.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>Retinal Encodings. Image by the author.</strong></figcaption></figure></div><p>On the other hand, and commonly associated with our brain&#8217;s spatial skills, there is a second group that some people call &#8220;spatial encodings&#8221;.</p><ul><li><p><strong>Spatial Encodings: </strong>These leverage the spatial awareness capabilities of our brain&#8217;s cortex to represent information. This encoding approach can be realized by utilizing a position on a scale, establishing a specific sequence, or employing relative sizes for representation.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!VcbM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!VcbM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 424w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 848w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1272w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!VcbM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png" width="1456" height="477" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:477,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Spatial Encodings. Image by the author.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Spatial Encodings. Image by the author." title="Spatial Encodings. Image by the author." srcset="https://substackcdn.com/image/fetch/$s_!VcbM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 424w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 848w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1272w, https://substackcdn.com/image/fetch/$s_!VcbM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e247315-e857-4324-a5e4-7ac00f5db176_1884x617.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><strong>Spatial Encodings. Image by the author.</strong></figcaption></figure></div><p>Incorporating various encodings into a single chart is technically feasible, yet it risks overwhelming the viewer. Simplicity in data visualization is key, too many encodings can muddle the message.</p><p>Ideally, limiting to one or two retinal encodings per chart enhances clarity and comprehension.</p><p>Remember, in Data Visualization, embracing minimalism often yields the most impactful results.</p><p><em>It&#8217;s akin to seasoning a meal&#8202;&#8212;&#8202;a judicious sprinkle of salt and pepper can elevate the dish, whereas an excessive amount can spoil it.</em></p><p>The choice of encoding should align with the narrative you aim to convey with your data. Therefore, a more pertinent question to ponder is not just which encoding to use, but how it serves the story your data tells.</p><h2>Choosing the Right Visualization</h2><p>In the wide landscape of Data Visualization, it&#8217;s essential to select the most effective visual encodings that match the nature of your data.</p><p>Not all visualization methods suit every kind of data, so it&#8217;s crucial to pair the right type of visualization with the specific characteristics of the data you&#8217;re working with.</p><p>For instance, when dealing with continuous variables like weight and height, their best representation often comes from positioning them on a scatter plot. This approach effectively communicates variations and relationships within the data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MNoN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MNoN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 424w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 848w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MNoN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png" width="1456" height="1156" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1156,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image by the author. Scatter plot of numerical variables.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image by the author. Scatter plot of numerical variables." title="Image by the author. Scatter plot of numerical variables." srcset="https://substackcdn.com/image/fetch/$s_!MNoN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 424w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 848w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1272w, https://substackcdn.com/image/fetch/$s_!MNoN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F477621d4-f24d-46a9-8ed7-edab7893d359_1600x1270.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by the author. Scatter plot of numerical variables.</figcaption></figure></div><p>On the other hand, categorical variables, which include categories like gender or nationality, are more effectively represented through distinct visual elements such as color coding or shape. This distinction allows these variables to stand out clearly and be easily interpreted in the context of the visualization.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ZDwA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ZDwA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 424w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 848w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png" width="1456" height="1194" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1194,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Image by the author. Scatter plot of numerical variables with a categorical variable legend.&quot;,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Image by the author. Scatter plot of numerical variables with a categorical variable legend." title="Image by the author. Scatter plot of numerical variables with a categorical variable legend." srcset="https://substackcdn.com/image/fetch/$s_!ZDwA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 424w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 848w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1272w, https://substackcdn.com/image/fetch/$s_!ZDwA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3fe47a09-4487-464b-bf99-a08e82b75fe8_1600x1312.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Image by the author. Scatter plot of numerical variables with a categorical variable legend.</figcaption></figure></div><p>Underpinning the effectiveness of these choices are fundamental theories that explain why certain visual encodings resonate more intuitively with us.</p><p>Understanding these underlying principles can guide us in creating more impactful and comprehensible visualizations.</p><h2>The Core of Effective Data Visualization</h2><p>In Data Visualization, striking a harmonious balance between aesthetic appeal and practical functionality is essential. Sometimes, choosing certain visual encodings, even if they appear less efficient, is intentional to convey a specific message or evoke emotions.</p><p>In our contemporary world, where data streams are ever-expanding, the significance of crafting visual stories that resonate is paramount, particularly when our audience comprises individuals not well-versed in data.</p><p>Effective data visualization transcends mere number presentation, it involves weaving a compelling narrative with our data.</p><p>It&#8217;s about animating our data, interweaving stories that establish a link between abstract figures and tangible, real-world consequences and insights.</p><p>For those of us passionate about technology and data, Data Visualization is more than a skill&#8202;&#8212;<em>&#8202;it&#8217;s an art form, a unique language, and a bridge connecting us to the wider world.</em></p><p>Now&#8230; what you have been waiting all along&#8230; Here goes our weekly cheatsheet(s)&#128071;&#127995;</p><h4><strong>1. The Concept of Chart</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CFG-!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CFG-!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 424w, https://substackcdn.com/image/fetch/$s_!CFG-!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 848w, https://substackcdn.com/image/fetch/$s_!CFG-!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 1272w, https://substackcdn.com/image/fetch/$s_!CFG-!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CFG-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png" width="1456" height="1629" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1629,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:2068920,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/161218886?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CFG-!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 424w, https://substackcdn.com/image/fetch/$s_!CFG-!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 848w, https://substackcdn.com/image/fetch/$s_!CFG-!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 1272w, https://substackcdn.com/image/fetch/$s_!CFG-!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb9965506-c0d2-4134-b7e3-4c9b0630d6dd_3693x4133.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>2. Visual Encodings</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GWcA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GWcA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 424w, https://substackcdn.com/image/fetch/$s_!GWcA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 848w, https://substackcdn.com/image/fetch/$s_!GWcA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 1272w, https://substackcdn.com/image/fetch/$s_!GWcA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GWcA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png" width="1456" height="1663" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1663,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1931340,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/161218886?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GWcA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 424w, https://substackcdn.com/image/fetch/$s_!GWcA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 848w, https://substackcdn.com/image/fetch/$s_!GWcA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 1272w, https://substackcdn.com/image/fetch/$s_!GWcA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F04d5d6b2-a15b-4048-9a06-7457e1ae77f9_3693x4217.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h4>3. The Data</h4><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Fdkk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Fdkk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 424w, https://substackcdn.com/image/fetch/$s_!Fdkk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 848w, https://substackcdn.com/image/fetch/$s_!Fdkk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 1272w, https://substackcdn.com/image/fetch/$s_!Fdkk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Fdkk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png" width="1456" height="1583" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1583,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:3192809,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://reads.databites.tech/i/161218886?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Fdkk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 424w, https://substackcdn.com/image/fetch/$s_!Fdkk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 848w, https://substackcdn.com/image/fetch/$s_!Fdkk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 1272w, https://substackcdn.com/image/fetch/$s_!Fdkk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F36c7e75a-22a2-418d-9245-afb391af9d59_3693x4016.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h2>Are you still here? &#129488;</h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:517801}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; button at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.databites.tech/p/the-transformers-architecture/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.databites.tech/p/the-transformers-architecture/comments"><span>Leave a comment</span></a></p><div><hr></div><h2>Want to get more of my content? &#128587;&#127995;&#8205;&#9794;&#65039;</h2><p>Reach me on:</p><ul><li><p><strong><a href="https://www.linkedin.com/in/iamjosepferrer/">LinkedIn</a> and</strong> <strong><a href="https://x.com/iamjosepferrer">X (Twitter)</a> to get daily posts about Data Science.</strong></p></li><li><p>My <strong><a href="https://medium.com/@iamjosepferrer">Medium</a></strong><a href="https://medium.com/@rfeers"> </a><strong><a href="https://medium.com/@rfeers">Blog</a></strong> to learn more about Data Science, Machine Learning, and AI.</p></li><li><p>Just email me at rfeers@gmail.com for any inquiries or to ask for help! &#129299;</p></li></ul>]]></content:encoded></item><item><title><![CDATA[I went quiet for several months (the diagrams didn't)]]></title><description><![CDATA[I stopped posting in June 2025.]]></description><link>https://reads.databites.tech/p/i-went-quiet-for-several-months-the</link><guid isPermaLink="false">https://reads.databites.tech/p/i-went-quiet-for-several-months-the</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 19 May 2026 10:52:38 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/75ad78bc-7238-47b5-8dc0-0a176e7f9e91_752x752.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I stopped posting in June 2025.</p><p>Not a planned break. </p><p>Not a strategic pause. </p><p>I just stopped.</p><p>I had just moved from Barcelona to Rotterdam. Took on a full-time European research project. And somewhere between the relocation boxes and the new job, databites.tech became one more thing on a list that was already too long. </p><p><strong>So it fell off the list.</strong></p><p>Here&#8217;s what I &#8230;</p>
      <p>
          <a href="https://reads.databites.tech/p/i-went-quiet-for-several-months-the">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[Europe's tourist nights hit a record in 2024. The map tells the real story.]]></title><description><![CDATA[The COVID crash, the unequal recovery, and the 20 regions that absorb one in five European tourist nights.]]></description><link>https://reads.databites.tech/p/europes-tourist-nights-hit-a-record</link><guid isPermaLink="false">https://reads.databites.tech/p/europes-tourist-nights-hit-a-record</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Wed, 13 May 2026 22:53:10 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/44a1c797-804e-4c47-b328-7cc0f9310b3c_1056x882.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>3.1 billion tourist nights were spent at accommodation across the EU in 2024. That is a new all-time record, up 7% from 2019, and nearly double what Europe managed at the depths of the COVID crash in 2020.</p><p>The recovery arc looks almost too clean.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/2xFDz/3/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9b3daea4-d2c7-4dee-98ed-3d11e632d696_1220x738.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7beb9377-c11a-401f-a561-f1fb86e583e4_1220x862.png&quot;,&quot;height&quot;:422,&quot;title&quot;:&quot;Europe's tourist nights hit a record in 2024&quot;,&quot;description&quot;:&quot;Total nights (in billions) spent at tourist accommodation across EU, 2019 to 2024.&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/2xFDz/3/" width="730" height="422" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>But the aggregate number hides something. European tourism is not evenly distributed. It never was.</p><p>Of the 1,204 NUTS3 sub-regions tracked in this dataset, the top 20 alone account for 644 million nights, one in five of every tourist night spent in the EU. Mallorca received 55 million. That is more than the entire country of the Netherlands.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/EdxXZ/5/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f213b20c-eba5-43ef-82fa-08591f20aa2c_1220x1186.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4ecd9345-1467-4746-a856-34bddf2348df_1220x1310.png&quot;,&quot;height&quot;:645,&quot;title&quot;:&quot;Where Europe's tourist nights go?&quot;,&quot;description&quot;:&quot;Nights spent at tourist accommodation by NUTS3 region, 2024, in millions.&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/EdxXZ/5/" width="730" height="645" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>Spain dominates. Nine of the top 20 regions are Spanish: Mallorca, Barcelona, Tenerife, Alicante, Madrid, Malaga, Gran Canaria, Girona, Tarragona. The second biggest national presence is Italy with four: Rome, Venice, Bolzano-Bozen, and a Greek island cluster rounding out the list.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/4xLBz/2/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c4ebf105-84b5-4164-816d-dda12bb0816f_1220x1038.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a2bac7cc-0955-480f-904b-ef49659e6ba7_1220x1162.png&quot;,&quot;height&quot;:572,&quot;title&quot;:&quot;Europe's most visited regions, 2024&quot;,&quot;description&quot;:&quot;Nights spent at tourist accommodation, top 20 NUTS3 regions, in millions.&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/4xLBz/2/" width="730" height="572" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>The recovery was not equal either. La Palma in the Canary Islands is still 78% below its 2019 numbers, a direct consequence of the 2021 volcanic eruption. Gozo in Malta is down 73%. Meanwhile dozens of inland and rural regions across Belgium, Romania, and Germany more than doubled their tourist nights from a very low base.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/yPtzf/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/29f62c46-2c10-420b-b967-e52796da24de_1220x1186.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a1132b3e-ca5e-4747-8cdb-307ae4138c4e_1220x1310.png&quot;,&quot;height&quot;:645,&quot;title&quot;:&quot;Not every region recovered equally&quot;,&quot;description&quot;:&quot;Change in tourist nights 2019 to 2024 by NUTS3 region.  Red = below 2019 levels. Green = above.&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/yPtzf/1/" width="730" height="645" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>The story of European tourism in 2024 is not just a record broken. It is the same places absorbing more of a growing total, while a handful of regions are still waiting to come back.</p><div><hr></div><p><em>Data: EU Tourism Dashboard, TOUR_NIGHT_SPENT, 2019 to 2024. </em></p><p><em>Josep Ferrer &#183; databites.tech</em></p>]]></content:encoded></item><item><title><![CDATA[Europe's renewable energy divide is getting wider, not narrower.]]></title><description><![CDATA[Twenty years of EU climate policy. One inconvenient pattern in the data.]]></description><link>https://reads.databites.tech/p/europes-renewable-energy-divide-is</link><guid isPermaLink="false">https://reads.databites.tech/p/europes-renewable-energy-divide-is</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Wed, 13 May 2026 13:27:20 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/29b2d2eb-d7f1-4267-b3d4-a8f989881cfc_962x896.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Sweden generates almost two-thirds of its energy from renewables. Belgium manages barely one in seven. Both are founding members of the European Union. Both have been bound by the same climate targets for two decades.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/szaL9/4/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9a492ac0-11eb-4062-b92f-3594a83122a4_1220x1358.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9471a1c4-42f1-4712-9ec6-b95920062c63_1220x1516.png&quot;,&quot;height&quot;:748,&quot;title&quot;:&quot;Europe's green divide: who is leading the renewable race?&quot;,&quot;description&quot;:&quot;Share of energy from renewable sources by EU member state, 2024 (% of gross final energy consumption)&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/szaL9/4/" width="730" height="748" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>The geographic pattern is immediate. Nordic and Baltic states have largely met or exceeded EU targets. Much of western and southern Europe has not.</p><p>But the more troubling story is not where countries stand today. It is the direction they are moving.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/ySbXN/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d7d2b602-53a4-4340-b825-d539fce0a52b_1220x720.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/773d7edd-3c4d-4f94-a380-4fb3f3ae4508_1220x878.png&quot;,&quot;height&quot;:430,&quot;title&quot;:&quot;The green divide has widened over 20 years&quot;,&quot;description&quot;:&quot;Share of energy from renewable sources, selected EU countries, 2004&#8211;2024 (% of gross final energy consumption)&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/ySbXN/1/" width="730" height="430" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>Denmark has made remarkable progress, gaining 31 percentage points over 20 years. Belgium, Luxembourg and Ireland have barely moved. These are not struggling economies. They are among the wealthiest countries in Europe, with full access to the same funding, directives and policy tools as everyone else.</p><div id="datawrapper-iframe" class="datawrapper-wrap outer" data-attrs="{&quot;url&quot;:&quot;https://datawrapper.dwcdn.net/5bWjK/1/&quot;,&quot;thumbnail_url&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/43126b05-82d4-4c66-98f6-61cfd3f71a3a_1220x738.png&quot;,&quot;thumbnail_url_full&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/adb74541-52d4-46c1-bb28-8a169433be89_1220x896.png&quot;,&quot;height&quot;:439,&quot;title&quot;:&quot;Europe's renewable gap has never been wider&quot;,&quot;description&quot;:&quot;Spread between the highest and lowest share of renewable energy among EU member states, 2004&#8211;2024 (% of gross final energy consumption)&quot;}" data-component-name="DatawrapperToDOM"><iframe id="iframe-datawrapper" class="datawrapper-iframe" src="https://datawrapper.dwcdn.net/5bWjK/1/" width="730" height="439" frameborder="0" scrolling="no"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();</script></div><p>The gap between the EU&#8217;s greenest and least green member state peaked at 53 percentage points in 2022. With six years left until the 2030 deadline, 21 of 27 countries are still below the 42.5% target.</p><p>The data has been there all along. </p><p>It just needed a map.</p><div><hr></div><p><em><strong>Data:</strong> Eurostat nrg_ind_ren, Share of energy from renewable sources, 2004 to 2024.</em></p><p><em>Analysis and visualisations: Josep Ferrer &#183; databites.tech</em></p>]]></content:encoded></item><item><title><![CDATA[How to Actually Get Started with HuggingFace 🤗]]></title><description><![CDATA[A clear (and human) guide to get started without drowning]]></description><link>https://reads.databites.tech/p/how-to-actually-get-started-with-b80</link><guid isPermaLink="false">https://reads.databites.tech/p/how-to-actually-get-started-with-b80</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 28 Oct 2025 13:15:02 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c711045e-5919-47eb-9c31-5b43631fe9b0_976x864.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you still think &#129303; is just a WhatsApp emoji, <strong>you&#8217;ve missed a lot. </strong></p><p>AI isn&#8217;t stuck in research labs anymore, it&#8217;s in products, back-office flows, and tiny scripts that save hours each week. </p><p><strong>Hugging Face is the community backbone behind much of that shift.</strong></p><p>One of the leading agents of this revolution is Hugging Face, an open-source platform that has become essential for anyone working in Machine Learning (ML) and Natural Language Processing (NLP).</p><p>Whether you&#8217;re an experienced data scientist or just starting, Hugging Face offers a wide variety of tools and resources to help you bring your AI projects to life.</p><p><strong>Trust me when I say, you&#8217;ll want to be a part of it!</strong></p><p>Before we dive in, I strongly recommend checking out my previous issue on <em>How to Get Started with LLMs</em> (if you haven&#8217;t already). Trust me, it&#8217;s a great primer!</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;2fc20ea9-1d63-4d47-8925-b0957add7c47&quot;,&quot;caption&quot;:&quot;LLMs are moving faster than your backlog.&quot;,&quot;cta&quot;:&quot;Read full story&quot;,&quot;showBylines&quot;:true,&quot;showDescription&quot;:true,&quot;showImage&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;How to Actually Get Started with LLMs&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:132707413,&quot;name&quot;:&quot;Josep Ferrer&quot;,&quot;bio&quot;:&quot;Outstand using data -- Data Science, Design and Tech Tech Writer @KDnuggets @DataCamp &#128073;&#127995;Inquiries in rfeers@gmail.com&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd196b5a6-59f2-46dd-99b3-e10ab1bbd27d_604x604.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2025-10-08T13:33:57.035Z&quot;,&quot;cover_image&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aa672bbc-1acb-447c-b2a4-5259717b2089_976x864.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.databites.tech/p/how-to-actually-get-started-with&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:175617350,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:10,&quot;comment_count&quot;:0,&quot;publication_id&quot;:2143185,&quot;publication_name&quot;:&quot;DataBites&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/$s_!kyJ6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe930fbab-b8df-40ef-9676-3d9ca5d49eae_714x714.png&quot;,&quot;belowTheFold&quot;:false,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div><h1><strong>Hugging Face, or The GitHub of ML</strong></h1><p>Hugging Face is often described as the &#8220;GitHub of the ML world&#8221;, a collaborative platform with lots of pre-trained models and datasets (ready to be loaded and used!!).</p><p>But it actually further pushes this definition. Think of it as <strong>GitHub + model hosting + serving for AI</strong>: a massive <strong>Hub</strong> of models/datasets, the <strong>Transformers</strong> library (not just NLP anymore), easy <strong>Datasets</strong>, and simple ways to <strong>demo</strong> (Spaces) and <strong>serve</strong> (Inference Endpoints, TGI) models.</p><h4>Why you should care</h4><ul><li><p><strong>Speed:</strong> pre-trained models + one-line pipelines get you to a baseline in minutes.</p></li><li><p><strong>Breadth:</strong> text, vision, audio, multimodal, diffusion&#8212;you name it.</p></li><li><p><strong>Community:</strong> model cards, evals, PRs, and fast iteration on SOTA ideas.</p></li></ul><p><em>So&#8230; where does this company come from?</em></p><h3><strong>From Chatbot to Open-Source Powerhouse</strong></h3><p>Founded in 2016, Hugging Face originally aimed to create a chatbot targeted at teenagers. However, <strong>the company quickly pivoted after open-sourcing its underlying model, leading to the creation of the Transformers library in 2018.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!NXS4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!NXS4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 424w, https://substackcdn.com/image/fetch/$s_!NXS4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 848w, https://substackcdn.com/image/fetch/$s_!NXS4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 1272w, https://substackcdn.com/image/fetch/$s_!NXS4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!NXS4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png" width="1456" height="512" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:512,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:416168,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/177365648?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!NXS4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 424w, https://substackcdn.com/image/fetch/$s_!NXS4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 848w, https://substackcdn.com/image/fetch/$s_!NXS4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 1272w, https://substackcdn.com/image/fetch/$s_!NXS4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9f3f6056-83e3-4045-9b33-0a125a7db122_1472x518.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Today, Hugging Face is a central hub for AI professionals and enthusiasts, fostering a community that continually pushes the boundaries of what&#8217;s possible with machine learning.</p><p><em>Isn&#8217;t it crazy how things change up so fast?</em></p><h2>Core pieces you&#8217;ll actually use</h2><p>One of the biggest advantages of Hugging Face is how easy it is to get started. </p><h3><strong>#1. Transformers Library</strong></h3><p>The Transformers library is a comprehensive suite of state-of-the-art ML models specially designed for NLP that contains an extensive collection of pre-trained models optimized for tasks such as text classification, language generation, translation, and summarization, among others</p><p>It abstracts common NLP tasks into a simple-to-use pipeline() method, an easy-to-use API for performing a wide variety of tasks. The Transformers library simplifies the implementation of NLP models in several key ways:</p><ol><li><p><strong>Abstraction of complexity:</strong> It abstracts away the complexity involved in initializing models, managing pipelines, and handling tokenization.</p></li><li><p><strong>Pre-trained models:</strong> Providing the biggest collection of pre-trained models, they reduce the time and resources required to develop NLP applications from scratch.</p></li><li><p><strong>Flexibility and modularity:</strong> The library is designed with modularity in mind, allowing users to plug in different components as required.</p></li><li><p><strong>Community and support: </strong>Hugging Face has fostered a strong community around its tools, with extensive documentation, tutorials, and forums.</p></li><li><p><strong>Continuous updates and expansion: </strong>The library is constantly updated with the latest breakthroughs in NLP, incorporating new models and methodologies.</p></li></ol><h3><strong>#2. Model Hub</strong></h3><p>The Model Hub stands as the community&#8217;s face, a platform where thousands of models and datasets are at your fingertips. It is an innovative feature that allows users to share and discover models contributed by the community, promoting a collaborative approach to NLP development.</p><p>You can go check it out <a href="https://substack.com/redirect/8e3b6836-14e0-46bf-aa01-9914cb11ee26?j=eyJ1IjoiMjcwZHAxIn0.hGTR9CXb_nmPcUKqllDE9vqggNRtE3-4-yLAzGi9eWs">on their official website</a>. There you can easily select the Model Hub by clicking on the Models button in the navigator, and a view like the following should appear to you:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!qnEg!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!qnEg!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 424w, https://substackcdn.com/image/fetch/$s_!qnEg!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 848w, https://substackcdn.com/image/fetch/$s_!qnEg!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 1272w, https://substackcdn.com/image/fetch/$s_!qnEg!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!qnEg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png" width="1456" height="822" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:822,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot of Hugging Face Model Hub main view.&quot;,&quot;title&quot;:&quot;Screenshot of Hugging Face Model Hub main view.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot of Hugging Face Model Hub main view." title="Screenshot of Hugging Face Model Hub main view." srcset="https://substackcdn.com/image/fetch/$s_!qnEg!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 424w, https://substackcdn.com/image/fetch/$s_!qnEg!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 848w, https://substackcdn.com/image/fetch/$s_!qnEg!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 1272w, https://substackcdn.com/image/fetch/$s_!qnEg!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2db3dcec-7e63-4980-bc77-a75b686fec79_1999x1129.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Screenshot of Hugging Face Model Hub main view.</figcaption></figure></div><p>As you can see, in the left-sidebar, there are multiple filters regarding the main task to be performed.</p><p>Contributing to the Model Hub is made straightforward by Hugging Face&#8217;s tools, which guide users through the process of uploading their models. Once contributed, these models are available for the entire community to use, either directly through the hub or via integration with the Hugging Face Transformers library.</p><p><em>Isn&#8217;t it exciting?</em></p><p><strong>This ease of access and contribution fosters a dynamic ecosystem where state-of-the-art models are constantly refined and expanded upon</strong>, providing a rich, collaborative foundation for NLP advancement.</p><h3><strong>#3. Tokenizers</strong></h3><p>Tokenizers are crucial in NLP, as they are responsible for converting text into a format that machine learning models can understand, which is essential for processing different languages and text structures.</p><p>They are responsible for breaking down text into tokens&#8212;basic units like words, subwords, or characters&#8212;thus preparing data for machine learning models to process. These tokens are the building blocks that enable models to understand and generate human language.</p><p>They also facilitate the transformation of tokens into vector representations for model input and handle padding and truncation for uniform sequence lengths.</p><p>Hugging Face provides a range of user-friendly tokenizers, optimized for their Transformers library, which are key to the seamless preprocessing of text. </p><h3><strong>#4. Datasets Library</strong></h3><p>Another key component is the Hugging Face Datasets library, a vast repository of NLP datasets that support the training and benchmarking of ML models.</p><p>This library is a crucial tool for developers in the field, as it offers a diverse collection of datasets that can be used to train, test, and benchmark any NLP models across a wide variety of tasks.</p><p>One of the main benefits it presents is the simple and user-friendly interface. While you can browse and explore all datasets in the Hugging Face Hub, to use it in your code, they have tailored the dataset library that allows you to download any dataset effortlessly.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!fa5y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!fa5y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 424w, https://substackcdn.com/image/fetch/$s_!fa5y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 848w, https://substackcdn.com/image/fetch/$s_!fa5y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 1272w, https://substackcdn.com/image/fetch/$s_!fa5y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!fa5y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png" width="1456" height="886" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/ff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:886,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot of Hugging Face Datasets main view.&quot;,&quot;title&quot;:&quot;Screenshot of Hugging Face Datasets main view.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot of Hugging Face Datasets main view." title="Screenshot of Hugging Face Datasets main view." srcset="https://substackcdn.com/image/fetch/$s_!fa5y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 424w, https://substackcdn.com/image/fetch/$s_!fa5y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 848w, https://substackcdn.com/image/fetch/$s_!fa5y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 1272w, https://substackcdn.com/image/fetch/$s_!fa5y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff5383f6-2189-44fd-92d6-5ac85cabd592_1999x1217.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Screenshot of Hugging Face Datasets main view.</figcaption></figure></div><p>It includes datasets for common tasks such as text classification, translation, and question-answering, as well as more specialized datasets for unique challenges in the field.</p><p>So now that we know what it is, let&#8217;s get our hands dirty &#128165;</p><h2><strong>Getting Started with Hugging Face</strong></h2><p>Before you can start exploring Hugging Face, you&#8217;ll need to install it on your local machine.</p><h3>Installation</h3><p>First, you should combine the<code> transformers</code> library with your favorite deep learning library, either <code>TensorFlow</code> or <code>PyTorch</code>.</p><p>The transformers library can be easily installed using <code>pip</code>, Python&#8217;s package installer.</p><pre><code><code>pip install transformers</code></code></pre><p>To have the full capability, you should also install the <code>datasets</code> and the <code>tokenizers</code> library.</p><pre><code><code>pip install tokenizers, datasets</code></code></pre><p>Hugging Face&#8217;s model hub offers a huge collection of pre-trained models that you can use for a wide range of NLP tasks. There are a bunch of things we can do with LLMs. </p><p><strong>The first task we can do is directly using a Pre-trained Model. </strong></p><h3>1. Using Pre-trained Models</h3><h4><strong>#1 Select a Pre-trained Model</strong></h4><p>First, you need to select a pre-trained model. To do so, we go to the <strong><a href="https://huggingface.co/models">Model Hub</a></strong>.</p><p>Imagine we want to infer the sentiment corresponding to a string of text. So we can easily browse only the models that perform `Text Classification` tasks by selecting the Text Classification button on the left-sidebar.</p><p>Hugging Face models always appeared ordered by Trending. Usually, the higher results are the most used ones. </p><p><em>So, we select the second result, which is the most used sentiment analysis model.</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Ev9g!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Ev9g!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 424w, https://substackcdn.com/image/fetch/$s_!Ev9g!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 848w, https://substackcdn.com/image/fetch/$s_!Ev9g!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 1272w, https://substackcdn.com/image/fetch/$s_!Ev9g!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Ev9g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png" width="1456" height="902" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/aec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:902,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot of Hugging Face Model Hub main view. Selecting Text Classification models.&quot;,&quot;title&quot;:&quot;Screenshot of Hugging Face Model Hub main view. Selecting Text Classification models.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot of Hugging Face Model Hub main view. Selecting Text Classification models." title="Screenshot of Hugging Face Model Hub main view. Selecting Text Classification models." srcset="https://substackcdn.com/image/fetch/$s_!Ev9g!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 424w, https://substackcdn.com/image/fetch/$s_!Ev9g!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 848w, https://substackcdn.com/image/fetch/$s_!Ev9g!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 1272w, https://substackcdn.com/image/fetch/$s_!Ev9g!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faec83d08-0bfd-4a38-a633-22a6bdd7dc8c_1999x1239.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Model Hub. Selecting our model. </figcaption></figure></div><p>To use it, we need to copy the corresponding name of the model. It can be found within the top section of its specific view.</p><h4><strong>#2 Load a pre-trained model</strong></h4><p>Now that we already know what model to use, let&#8217;s use it in Python. First we need to import the <code>AutoTokenizer</code> and the <code>AutoModelForSequenceClassification</code> classes from <code>transformers</code>.</p><p>Using these AutoModel classes will automatically infer the model architecture from the model name.</p><pre><code><code>from transformers import AutoTokenizer, AutoModelForSequenceClassification

model_name = &#8220;lxyuan/distilbert-base-multilingual-cased-sentiments-student&#8221;

# We call define a model object
model = AutoModelForSequenceClassification.from_pretrained(model_name)</code></code></pre><h4><strong>#3 Prepare your input</strong></h4><p>Load a tokenizer for our model, in this case, the transformers library facilitates the process as it inferes the tokenizer to be used from the name of the model that we have chosen.</p><pre><code><code>#We call the tokenizer class
tokenizer = AutoTokenizer.from_pretrained(model_name)
</code></code></pre><h4><strong>#4 Run the model</strong></h4><p>Generate a pipeline object with the chosen model, the tokenizer, and the task to be performed. In our case, a sentiment analysis. If you initialize the classifier object with the task, the pipeline class will populate it with the default values, even though it is not recommended in production.</p><pre><code><code># Initializing a classifier with a model and a tokenizer
classifier = pipeline(&#8221;sentiment-analysis&#8221;, model = model, tokenizer = tokenizer)
# When passing only the task, the pipeline command inferes both the model and tokenizer.
classifier = pipeline(&#8221;sentiment-analysis&#8221;)
</code></code></pre><p>We can execute this model by introducing some input.</p><pre><code><code>output = classifier(&#8221;I&#8217;ve been waiting for this tutorial all my life!&#8221;)</code></code></pre><p>And we will obtain the results right away!</p><p><em>Which leads to the following (and final) step&#8230;</em></p><h4><strong>#5 Interpret the outputs</strong></h4><p>The model will return an object containing various elements depending on the model&#8217;s class. For example, for this sentiment analysis example, we will get:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!j97a!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!j97a!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 424w, https://substackcdn.com/image/fetch/$s_!j97a!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 848w, https://substackcdn.com/image/fetch/$s_!j97a!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 1272w, https://substackcdn.com/image/fetch/$s_!j97a!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!j97a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png" width="1062" height="60" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:60,&quot;width&quot;:1062,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Obtained output.&quot;,&quot;title&quot;:&quot;Obtained output.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Obtained output." title="Obtained output." srcset="https://substackcdn.com/image/fetch/$s_!j97a!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 424w, https://substackcdn.com/image/fetch/$s_!j97a!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 848w, https://substackcdn.com/image/fetch/$s_!j97a!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 1272w, https://substackcdn.com/image/fetch/$s_!j97a!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7c045ace-ae69-445e-aa72-b0e984c15ac3_1062x60.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>In this instance, the input string has been classified with the &#8220;Positive&#8221; label (using a sentiment analysis model), achieving a confidence score of 0.579. This score reflects the model&#8217;s certainty in its classification.</p><p><strong>A second task we can do using HF is fine-tuning a model. </strong></p><h3>2. Fine-tuning models</h3><p>Fine-tuning is the process of taking a pre-trained model and updating its parameters by training on a dataset specific to your task. This allows you to leverage the model&#8217;s learned representations and adapt them to your use case.</p><p>Imagine we need to use a text-classifier model to infer sentiments from a list of tweets. One natural question that comes to mind is: </p><p><em>Will this pre-trained model work properly?</em></p><p>To make sure it does, we can take advantage of fine-tuning by training a pre-trained Hugging Face model with a dataset containing tweets and their corresponding sentiments so the performance improves.</p><p><strong>Here&#8217;s a basic example of fine-tuning a model for sequence classification:</strong></p><h4><strong>#1. Choose a pre-trained model and a dataset</strong></h4><p>Select a model architecture suitable for your task. In this case, we want to keep using the same sentiment analysis model. </p><p><strong>However, now we need some data to train our model. </strong>And this is precisely where the <code>datasets</code> library kicks in. We can go check all datasets in the Model Hub, and find the one that fits us the best.</p><p><strong>In my case, I&#8217;ll be using the twitter-sentiment-analysis dataset. </strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ovdM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ovdM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 424w, https://substackcdn.com/image/fetch/$s_!ovdM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 848w, https://substackcdn.com/image/fetch/$s_!ovdM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 1272w, https://substackcdn.com/image/fetch/$s_!ovdM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ovdM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png" width="1456" height="878" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:878,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Screenshot of Hugging Face Datasets Hub main view. Selecting Sentiment analysis datasets.&quot;,&quot;title&quot;:&quot;Screenshot of Hugging Face Datasets Hub main view. Selecting Sentiment analysis datasets.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Screenshot of Hugging Face Datasets Hub main view. Selecting Sentiment analysis datasets." title="Screenshot of Hugging Face Datasets Hub main view. Selecting Sentiment analysis datasets." srcset="https://substackcdn.com/image/fetch/$s_!ovdM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 424w, https://substackcdn.com/image/fetch/$s_!ovdM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 848w, https://substackcdn.com/image/fetch/$s_!ovdM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 1272w, https://substackcdn.com/image/fetch/$s_!ovdM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe88a8a37-c53c-4e0f-8603-a0efd5446606_1999x1206.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Datasets section. </figcaption></figure></div><p>Now that I already know what dataset to choose, we can simply initialize both the model and dataset.</p><pre><code><code>model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Loading the dataset to train our model
dataset = load_dataset(&#8221;mteb/tweet_sentiment_extraction&#8221;)
</code></code></pre><p>If we check the dataset we just downloaded, it is a dictionary containing a subset for training and a subset for testing. If we convert the training subset to a dataframe, it looks like follows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!0YAl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!0YAl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 424w, https://substackcdn.com/image/fetch/$s_!0YAl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 848w, https://substackcdn.com/image/fetch/$s_!0YAl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 1272w, https://substackcdn.com/image/fetch/$s_!0YAl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!0YAl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png" width="1246" height="874" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:874,&quot;width&quot;:1246,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;The data set to be used.&quot;,&quot;title&quot;:&quot;The data set to be used.&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="The data set to be used." title="The data set to be used." srcset="https://substackcdn.com/image/fetch/$s_!0YAl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 424w, https://substackcdn.com/image/fetch/$s_!0YAl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 848w, https://substackcdn.com/image/fetch/$s_!0YAl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 1272w, https://substackcdn.com/image/fetch/$s_!0YAl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7359fe2f-137a-4fed-b24e-b60401e03c1d_1246x874.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">The dataset we are using.</figcaption></figure></div><h4><strong>#2. Prepare Your dataset</strong></h4><p>Now that we already have our dataset, we need a tokenizer to prepare it to be parsed by our model. The text variable of our dataset needs to be tokenized so we can use it to fine-tune our model.</p><p>This is why the second step is to load a pre-trained Tokenizer and tokenize our dataset so it can be used for the fine-tuning.</p><pre><code><code>tokenizer = AutoTokenizer.from_pretrained(model_name)

def tokenize_function(examples):
    return tokenizer(examples[&#8221;text&#8221;], padding=&#8221;max_length&#8221;, truncation=True)

tokenized_datasets = dataset.map(tokenize_function, batched=True)</code></code></pre><h4><strong>#3. Build a PyTorch dataset with encodings</strong></h4><p>The third step is to generate a train and testing dataset. The training set will be used to fine-tune our model, while the testing set will be used to evaluate it.</p><p>Usually, the fine-tuning process takes a lot of time. </p><p><em>(To facilitate the tutorial, we randomly sample both datasets so your computation time is lower)</em></p><pre><code><code>from datasets import load_dataset

model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Loading the dataset to train our model
dataset = load_dataset(&#8221;mteb/tweet_sentiment_extraction&#8221;)

small_train_dataset = tokenized_datasets[&#8221;train&#8221;].shuffle(seed=42).select(range(1000))
small_eval_dataset = tokenized_datasets[&#8221;test&#8221;].shuffle(seed=42).select(range(1000))
</code></code></pre><h4><strong>#4. Fine-tune the model</strong></h4><p>Our final step is to set up the training arguments and start the training process. The transformers library contains the <code>trainer()</code> class, which takes care of everything.</p><p>We first define the training arguments together with the evaluation strategy. Once everything is defined, we can easily train the model with the <code>train()</code> command.</p><pre><code><code>from transformers import Trainer, TrainingArguments
import numpy as np

training_args = TrainingArguments(output_dir=&#8221;trainer_output&#8221;, evaluation_strategy=&#8221;epoch&#8221;)

metric = evaluate.load(&#8221;accuracy&#8221;)

def compute_metrics(eval_pred):
    logits, labels = eval_pred
    predictions = np.argmax(logits, axis=-1)
    return metric.compute(predictions=predictions, references=labels)


trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=small_train_dataset,
    eval_dataset=small_eval_dataset,
    compute_metrics=compute_metrics,
)
trainer.train()
</code></code></pre><h4><strong>#5. Evaluate the model</strong></h4><p>After training, evaluate the model&#8217;s performance on a validation or test set. Again, the trainer class already contains an evaluate method that takes care of this.</p><pre><code><code>import evaluate

trainer.evaluate()
</code></code></pre><p>Our fine-tuned model presents an accuracy of 70%.</p><p>Now that we have already improved our model, how can we share it with the community? </p><p><em>This brings us to our final step&#8230;</em></p><h4>#6. Sharing Models</h4><p>Once we&#8217;ve fine-tuned our new model, the best idea is to share it with the community.</p><p>Hugging Face makes this process straightforward. First, we need to install the <code>huggingface_hub</code> library.</p><p>A requirement for this final step is to have an active token to be able to connect to your Hugging Face account. <strong><a href="https://huggingface.co/docs/hub/security-tokens">You can easily get one following this guideline.</a></strong> When working in a Jupyter Notebook, we can easily import the <code>notebook_login</code> library.</p><pre><code><code>from huggingface_hub import notebook_login

notebook_login()
</code></code></pre><p>This will generate a login within our Jupyter Notebook. We just need to submit our token, and our notebook will be connected to our hugging face account.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SKD6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SKD6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 424w, https://substackcdn.com/image/fetch/$s_!SKD6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 848w, https://substackcdn.com/image/fetch/$s_!SKD6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 1272w, https://substackcdn.com/image/fetch/$s_!SKD6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SKD6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png" width="855" height="501" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:501,&quot;width&quot;:855,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;Hugging Face login dialogue&quot;,&quot;title&quot;:&quot;Hugging Face login dialogue&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="Hugging Face login dialogue" title="Hugging Face login dialogue" srcset="https://substackcdn.com/image/fetch/$s_!SKD6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 424w, https://substackcdn.com/image/fetch/$s_!SKD6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 848w, https://substackcdn.com/image/fetch/$s_!SKD6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 1272w, https://substackcdn.com/image/fetch/$s_!SKD6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5ef073e1-e2fa-4ee0-b5f9-e3534d98cb7b_855x501.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>After this, the model will be available for everyone in our Hugging Face profile.</strong></p><h3><strong>4 use-cases you can start doing today</strong></h3><p>If we want to standardize any NLP process, Hugging Face makes it incredibly simple, allowing us to build any pipeline in just three steps:</p>
      <p>
          <a href="https://reads.databites.tech/p/how-to-actually-get-started-with-b80">
              Read more
          </a>
      </p>
   ]]></content:encoded></item><item><title><![CDATA[How to Actually Get Started with SQL]]></title><description><![CDATA[A clear (and human) guide to get started without drowning]]></description><link>https://reads.databites.tech/p/how-to-actually-get-started-with-228</link><guid isPermaLink="false">https://reads.databites.tech/p/how-to-actually-get-started-with-228</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Wed, 22 Oct 2025 10:02:42 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/e79bace7-d73f-409e-9830-c05b7103c75a_976x704.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Many of you have been asking how to get started in the data world. I know it can seem <strong>complex</strong> and <strong>intimidating</strong>, <em>but fear often clouds our vision. </em></p><p>That&#8217;s why I want to remind you all that SQL is still the number one data language and the easiest one to learn. </p><p>If you&#8217;re looking to break into this field, there&#8217;s not better advice than&#8230;</p><blockquote><p>START</p><p>LEARNING</p><p>SQL</p><p>RIGHT</p><p>NOW!!</p></blockquote><p>Still not sure? Let&#8217;s give some reasons why &#128071;&#127995;</p><p>Humankind has always been strongly shaped by its ability to store and share information. Studies indicate that a key distinction between humans and other animals lies in our ability to create, preserve, and inherit knowledge and culture across generations.</p><p><em>And guess what&#8230; all of this is just DATA!</em></p><p>Today we are amid a significant shift in how our world works: Data has become the fuel of the XXI century. All fields and sectors rely on it to make decisions. </p><p>One thing is certain: <strong>The need for data-related skills will only keep surging. </strong></p><p>Organisations today gather raw data from both internal and external sources at an unprecedented rate. By analysing this data, they can use reporting applications, dashboards, and other tools to answer questions and gain valuable insights.</p><p><em>So the right question to be done is how to manage all this data? </em></p><p>And the answer is quite simple: <strong>SQL remains the best option to do so.  </strong></p><p>You can go check the latest <a href="https://survey.stackoverflow.co/2025/technology#most-popular-technologies-language-prof">StackOverflow Developer Survey</a> 2025, where SQL stands as the 3rd most used programming language of all developers! </p><p><em>(The first one if we only consider those used in the data science field </em>&#129351;<em>)</em></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UHDl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UHDl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 424w, https://substackcdn.com/image/fetch/$s_!UHDl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 848w, https://substackcdn.com/image/fetch/$s_!UHDl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 1272w, https://substackcdn.com/image/fetch/$s_!UHDl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UHDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png" width="940" height="226" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:226,&quot;width&quot;:940,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28513,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/176811266?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UHDl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 424w, https://substackcdn.com/image/fetch/$s_!UHDl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 848w, https://substackcdn.com/image/fetch/$s_!UHDl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 1272w, https://substackcdn.com/image/fetch/$s_!UHDl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6242fddc-58b7-47cf-b213-37f85180ee38_940x226.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>So let&#8217;s try to understand better SQL&#8217;s advantages &#128165;</p><h2>SQL&#8217;s main advantages</h2><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!15us!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!15us!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 424w, https://substackcdn.com/image/fetch/$s_!15us!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 848w, https://substackcdn.com/image/fetch/$s_!15us!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 1272w, https://substackcdn.com/image/fetch/$s_!15us!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!15us!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png" width="1456" height="332" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9aabf713-2434-466d-959e-4116543c06bd_3700x843.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:332,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:390380,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!15us!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 424w, https://substackcdn.com/image/fetch/$s_!15us!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 848w, https://substackcdn.com/image/fetch/$s_!15us!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 1272w, https://substackcdn.com/image/fetch/$s_!15us!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9aabf713-2434-466d-959e-4116543c06bd_3700x843.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h3><strong>#1. It can deal with big amounts of Data</strong></h3><p>SQL is designed to work with big data and can handle complex queries on large datasets much faster than other tools like spreadsheets or even some programming languages like Python. </p><p>Learning SQL helps you <strong>manage and analyze big data effectively.</strong></p><p>In many organizations, the core of the data environment is typically a data warehouse, where SQL is the primary language for interaction. </p><h3><strong>#2. It can be easily integrated with other tools</strong></h3><p>SQL integrates seamlessly with other data science tools and programming languages, such as Python and R. Libraries like pandas (Python) and dplyr (R) allow you to run SQL queries directly within your code. </p><p>This interoperability makes it easier to combine SQL&#8217;s data handling capabilities with the advanced analytics, visualization and ML features of these languages.</p><h3><strong>#3. It is standardized</strong></h3><p>To query or manipulate data with SQL, you use statements with keywords such as <code>SELECT</code> and <code>FROM</code>. This SQL syntax is standardized by ANSI and ISO-certified, ensuring consistency across the hundreds of databases and data tools that support SQL today.</p><p>While some databases and tools may extend the syntax with specialized operators, commands, or functions, the fundamental principles of SQL remain consistent. </p><p>Once you master the basics of SQL, you can apply this knowledge universally across different platforms.</p><h3><strong>#4. It is easy to understand</strong></h3><p><strong>Basic SQL syntax is highly readable, resembling natural language.</strong> It outlines how data should be retrieved or manipulated. </p><p>Consider the following example query:</p><pre><code><code>SELECT 
    first_name, 
    last_name, 
    date_of_hire
FROM employees
WHERE date_of_hire &gt; &#8216;2018-12-31&#8217;
ORDER BY date_of_hire, last_name</code></code></pre><p>In this query, the SQL keywords <code>SELECT</code>, <code>FROM</code>, <code>WHERE</code>, and <code>ORDER BY</code> define the actions to be performed and any person can understand the main purpose of the query. </p><p>So after all of this information, you might be wondering&#8230;</p><blockquote><p><em><strong>How to (ACTUALLY) get started with SQL?</strong></em></p></blockquote><p>This roadmap will help you to get started, build a strong foundation, and progress through more advanced topics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Yway!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Yway!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 424w, https://substackcdn.com/image/fetch/$s_!Yway!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 848w, https://substackcdn.com/image/fetch/$s_!Yway!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 1272w, https://substackcdn.com/image/fetch/$s_!Yway!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Yway!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png" width="1456" height="1816" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1816,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1562483,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/176811266?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Yway!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 424w, https://substackcdn.com/image/fetch/$s_!Yway!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 848w, https://substackcdn.com/image/fetch/$s_!Yway!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 1272w, https://substackcdn.com/image/fetch/$s_!Yway!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb4166f81-c9e5-4104-a90f-a45b8eb77f98_2606x3250.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s break down each of the previous steps!</p><h3><strong>1. Learning the Basics</strong></h3><p>Before diving deep, it&#8217;s essential to grasp what is SQL. Begin with:</p><ul><li><p><strong>What is a Relational Database?</strong></p></li><li><p><strong>Comparing SQL and NoSQL Databases</strong></p></li><li><p><strong>Understanding SQL Syntax and Basic Commands</strong></p></li></ul><h3><strong>2. Exploring Data Types</strong></h3><p>Once you have a clear image of SQL, you should understand the core data types you will be working with &#128071;&#127995;</p><ul><li><p><strong>Integers, Decimals, and Booleans</strong></p></li><li><p><strong>Character Types: CHAR and VARCHAR</strong></p></li><li><p><strong>Dates and Binary Data</strong></p></li></ul><h3><strong>3. Mastering Basic Keywords</strong></h3><p>The first real step is to familiarize yourself with the commands that form the backbone of SQL querying:</p><ul><li><p><strong>SELECT, FROM, WHERE</strong></p></li><li><p><strong>ORDER BY and LIMIT Clauses</strong></p></li></ul><p>You will see that SQL queries are usually quite easy to understand, as their syntax resembles natural language. The most common SQL query you will find is.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kFBb!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kFBb!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 424w, https://substackcdn.com/image/fetch/$s_!kFBb!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 848w, https://substackcdn.com/image/fetch/$s_!kFBb!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 1272w, https://substackcdn.com/image/fetch/$s_!kFBb!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kFBb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png" width="348" height="337.6291390728477" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:879,&quot;width&quot;:906,&quot;resizeWidth&quot;:348,&quot;bytes&quot;:null,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:&quot;&quot;,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!kFBb!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 424w, https://substackcdn.com/image/fetch/$s_!kFBb!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 848w, https://substackcdn.com/image/fetch/$s_!kFBb!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 1272w, https://substackcdn.com/image/fetch/$s_!kFBb!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e47895a-beed-44c4-90e1-27f09c7746da_906x879.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Already proficient with basic commands? </p><p><em>Now it&#8217;s turn to understand how to manage databases with the following two steps:</em></p><h3><strong>4. Data Definition</strong></h3><p>Learn how to structure and manage your databases with:</p><ul><li><p><strong>CREATE, ALTER, DROP Statements</strong></p></li></ul><h3><strong>5. Data Manipulation</strong></h3><p>Get hands-on with inserting, updating, and deleting data:</p><ul><li><p><strong>INSERT, UPDATE, DELETE Commands</strong></p></li></ul><p><em>Now you should keep getting better with SQL programming language &#128071;&#127995;</em></p><h3><strong>6. Understanding Aggregation</strong></h3><p>Aggregate functions are powerful tools for summarizing data:</p><ul><li><p><strong>SUM, AVG, COUNT, MAX, MIN</strong></p></li></ul><p>This will be one of the most important steps when creating KPIs and specific metrics. </p><h3><strong>7. Enforcing Constraints</strong></h3><p>Ensure data integrity through constraints:</p><ul><li><p><strong>PRIMARY KEY, FOREIGN KEY, UNIQUE</strong></p></li><li><p><strong>NOT NULL and CHECK Constraints</strong></p></li></ul><p><em>Our data will usually be spread across many different tables, this is why being able to merge data from different sources is crucial in SQL. </em></p><h3><strong>8. Mastering JOINs</strong></h3><p>JOINs are critical for combining data from multiple tables:</p><ul><li><p><strong>INNER, LEFT, RIGHT, and FULL OUTER JOINs</strong></p></li></ul><p><em>Your SQL skills here are already really good!! &#128588;&#127995; But learning must go on&#8230;</em></p><h3><strong>9. Leveraging Subqueries</strong></h3><p>As queries keep getting more complex, you need to create subqueries. </p><ul><li><p><strong>Nested and Correlated Subqueries</strong></p></li><li><p><strong>EXISTS and NOT EXISTS</strong></p></li></ul><p><em>Now you should understand advanced syntax like specific functions and new ways of merging data like UNION. </em></p><h3><strong>10. Advanced Syntax</strong></h3><p>Explore more complex SQL operations:</p><ul><li><p><strong>UNION, INTERSECT, EXCEPT</strong></p></li><li><p><strong>CASE, COALESCE, and Functions for NULL Handling</strong></p></li></ul><p><em>Once a result is good, you might want to create a view!</em></p><h3><strong>11. Working with Views</strong></h3><p>Views can simplify complex queries:</p><ul><li><p><strong>Creating, Modifying, and Dropping Views</strong></p></li></ul><p><em>Now you should focus on crafting better queries by leveraging indexes and following best security practices &#128165;</em></p><h3><strong>12. Optimizing with Indexes</strong></h3><p>Indexes improve query performance:</p><ul><li><p><strong>Unique, Clustered, and Non-Clustered Indexes</strong></p></li></ul><h3><strong>13. Data Integrity and Security</strong></h3><p>Now that you are here, I strongly recommend you get familiar with security best practices. Maintain the security and integrity of your database:</p><ul><li><p><strong>Using GRANT and REVOKE</strong></p></li><li><p><strong>Database Security Best Practices</strong></p></li></ul><p><em>The two final steps is learning how to craft better and more optimized SQL queries. You know I am a big fan of modular code with CTEs, so that&#8217;s something we will talk more about in coming issues! </em>&#128521;</p><h3><strong>14. Performance Optimization</strong></h3><p>Techniques to enhance the efficiency of your queries:</p><ul><li><p><strong>Query Analysis, Optimizing JOINS, Reducing Subqueries</strong></p></li></ul><h3><strong>15. Advanced SQL Techniques</strong></h3><p>For seasoned users, explore sophisticated SQL features:</p><ul><li><p><strong>Windows Functions, Recursive Queries</strong></p></li><li><p><strong>Pivot/Unpivot Operations, Common Table Expressions (CTE)</strong></p></li></ul><p><em>And this is all for today!</em></p><p><em>We will see in more detail most of the previous steps, this is just a summary to help you get started with SQL!</em></p><div><hr></div><h2><strong>How to Get Started</strong></h2><ol><li><p><strong>Master the basics:</strong> <code>SELECT</code> &#8594; <code>FROM</code> &#8594; <code>WHERE</code>, then <code>ORDER BY</code>, <code>GROUP BY/HAVING</code>, and core <code>JOIN</code>s (<code>INNER</code>, <code>LEFT</code>).</p></li><li><p><strong>Set up your stack:</strong> Use SQLite/DuckDB locally or a warehouse (BigQuery/Snowflake), with a comfy editor (DB UI or Jupyter + DuckDB); add a simple BI view if helpful.</p></li><li><p><strong>Ship tiny projects:</strong> KPI query pack (WAU/MAU, conversion, revenue by channel), a cohort/retention table, and a customer 360 (users + orders &#8594; first/last order, AOV, LTV).</p></li></ol><div><hr></div><h3>A final note</h3><p>If you&#8217;ve made it this far, you&#8217;ve already done the hardest part: deciding to start.<br>SQL rewards short, consistent reps.</p><p>Ship one tiny query this week, then another next week.<br>A KPI today, a JOIN tomorrow, a view next Friday.</p><p>Momentum compounds.</p><p>Are you in?</p><p>&#8212; Josep</p><div><hr></div><h2><strong>Still with me? &#129488;</strong></h2><p>As fellow data enthusiasts, I&#8217;m sure you&#8217;d be eager to help me shape some impactful KPIs and take this newsletter to the next level!</p><p><em>So here&#8217;s how you can help:</em></p><p>&#128073;&#127995; I want this newsletter to be truly valuable for you, so please share your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:393913}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; and the restack buttons at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><em>P.S. Share this with the coworker who &#8220;doesn&#8217;t need SQL&#8221; and spends lunch VLOOKUP-ing.</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p>]]></content:encoded></item><item><title><![CDATA[How to Actually Get Started with Python]]></title><description><![CDATA[CS15 - A clear (and human) guide to get started without drowning]]></description><link>https://reads.databites.tech/p/how-to-actually-get-started-with-5e7</link><guid isPermaLink="false">https://reads.databites.tech/p/how-to-actually-get-started-with-5e7</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 14 Oct 2025 10:02:52 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/eaa3293c-87f6-405a-985f-7f92a93b27f2_976x704.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>You&#8217;ve wanted to learn Python for a while&#8230;</strong></p><p><em>Too many tabs, not enough progress? </em></p><blockquote><p>This guide cuts the noise and gives you a shippable path. </p></blockquote><p><strong>Only the pieces that actually move you forward.</strong></p><h1>Why this, why now</h1><p>Python is the most versatile &#8220;one language, many careers&#8221; tool: analytics, ML, web, scripting, automation, LLM apps&#8212;you name it.<br>If you learn it now, you compound for the next decade.</p><p>Need more reasons? Then let&#8217;s try to give them!</p><h2><strong>Why Python can supercharge your career?</strong></h2><p>From <strong>data science</strong> and <strong>web development</strong> to <strong>automation</strong> and <strong>artificial intelligence</strong>, Python&#8217;s applications are vast and continue to expand. You can check the latest <a href="https://survey.stackoverflow.co/2025/technology#most-popular-technologies-language">StackOverflow Developer Survey 2025</a>, where Python stands as the 4th most-used programming language of all developers!</p><p>(And the second one if we only consider those used in the data science field &#128293;)</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gIE7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gIE7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 424w, https://substackcdn.com/image/fetch/$s_!gIE7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 848w, https://substackcdn.com/image/fetch/$s_!gIE7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 1272w, https://substackcdn.com/image/fetch/$s_!gIE7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gIE7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png" width="1456" height="430" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:430,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73676,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/176120424?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gIE7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 424w, https://substackcdn.com/image/fetch/$s_!gIE7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 848w, https://substackcdn.com/image/fetch/$s_!gIE7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 1272w, https://substackcdn.com/image/fetch/$s_!gIE7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff0081c64-4843-4ae1-923a-08ee191fda12_1706x504.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>So here are the 5 main reasons why you should start learning Python today&#8230;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!-Qwm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!-Qwm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 424w, https://substackcdn.com/image/fetch/$s_!-Qwm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 848w, https://substackcdn.com/image/fetch/$s_!-Qwm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 1272w, https://substackcdn.com/image/fetch/$s_!-Qwm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!-Qwm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png" width="924" height="556" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:556,&quot;width&quot;:924,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:101006,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!-Qwm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 424w, https://substackcdn.com/image/fetch/$s_!-Qwm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 848w, https://substackcdn.com/image/fetch/$s_!-Qwm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 1272w, https://substackcdn.com/image/fetch/$s_!-Qwm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4caa691a-14bf-4303-ad37-a6c0d09dc652_924x556.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>#1. <strong>Beginner-Friendly</strong></h3><p>Python&#8217;s <strong>clear syntax</strong> resembles English, making it the perfect starting point for beginners. </p><p>The learning curve is gentle, allowing you to focus more on solving problems than wrestling with complex code structures.</p><h3><strong>#2. Extensive Libraries</strong></h3><p>Python&#8217;s ecosystem is rich with libraries. Tools like <strong>Pandas</strong>, <strong>NumPy</strong>, and <strong>Matplotlib</strong> simplify data analysis, while <strong>Django</strong> and <strong>Flask</strong> are great for web development. </p><p>This <strong>wide array of libraries</strong> reduces the need to write code from scratch, speeding up development.</p><h3><strong>#3. High Demand in the Job Market</strong></h3><p>Python developers enjoy <strong>competitive salaries</strong>, thanks to the language&#8217;s popularity across industries like <strong>AI</strong>, <strong>data science</strong>, <strong>software development</strong>, and <strong>automation</strong>. Its applications span across finance, tech, healthcare, and more.</p><h3><strong>#4. Artificial Intelligence</strong></h3><p>Python is <strong>dominant in AI and machine learning</strong>. With libraries such as <strong>TensorFlow</strong> and <strong>Keras</strong>, developers can implement sophisticated AI models for tasks like <strong>natural language processing</strong>, <strong>image recognition</strong>, and even <strong>self-driving car algorithms</strong>.</p><h3><strong>#5. Strong Community Support</strong></h3><p>One of Python&#8217;s greatest strengths is its <strong>active community</strong>. With numerous tutorials, forums, and resources, help is always available. This vibrant support system ensures you won&#8217;t be stuck for long when facing a challenge.</p><p>So after all of this information, you might be wondering&#8230;</p><p></p><blockquote><p><em><strong>How to (ACTUALLY) get started with Python?</strong></em></p></blockquote><p>This roadmap will help you to get started, build a strong foundation, and progress through more advanced topics.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WIxz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WIxz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 424w, https://substackcdn.com/image/fetch/$s_!WIxz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 848w, https://substackcdn.com/image/fetch/$s_!WIxz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 1272w, https://substackcdn.com/image/fetch/$s_!WIxz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WIxz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png" width="1456" height="1753" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/af8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:1753,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1874800,&quot;alt&quot;:&quot;&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" title="" srcset="https://substackcdn.com/image/fetch/$s_!WIxz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 424w, https://substackcdn.com/image/fetch/$s_!WIxz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 848w, https://substackcdn.com/image/fetch/$s_!WIxz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 1272w, https://substackcdn.com/image/fetch/$s_!WIxz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Faf8cc71f-a40f-4f46-9797-770067eead61_3671x4419.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Let&#8217;s break down the steps to mastering Python!</p><h1><strong>Navigate Your Way Through Python </strong></h1><p>Whether you&#8217;re a data enthusiast, a budding analyst, or an experienced developer looking to sharpen your data science coding  skills, understanding Python is crucial.</p><p>So let&#8217;s start by&#8230;</p><h3><strong>1. Learning the Basics</strong></h3><p>Before diving into data-heavy tasks, you need to understand Python fundamentals:</p><ul><li><p><strong>Basic Syntax and Variables</strong></p></li><li><p><strong>Data Types</strong>: Strings, Integers, Floats, etc.</p></li><li><p><strong>Conditionals and Type Casting</strong></p></li><li><p><strong>Error Handling and Functions</strong> (including built-in functions)</p></li><li><p><strong>Data Structures</strong>: Lists, Tuples, Sets, Dictionaries</p></li><li><p><strong>Loops</strong>: for and while loops</p></li></ul><h3>2. Data Structures</h3><p>Once you have a solid foundation of the basics, a good grasp of data structures is crucial for efficient programming:</p><ul><li><p><strong>Arrays and Linked Lists</strong></p></li><li><p><strong>Heaps, Stacks, and Queues</strong></p></li><li><p><strong>Hash Tables</strong></p></li><li><p><strong>Trees</strong>, including Binary Search Trees</p></li></ul><h3><strong>3. Algorithms</strong></h3><p>With data structures covered, it&#8217;s time to explore algorithms:</p><ul><li><p><strong>Sorting Algorithms</strong>: Bubble, Merge, Quick Sort, etc.</p></li><li><p><strong>Searching Algorithms</strong>: Binary Search and Linear Search</p></li><li><p><strong>Recursion</strong> and its applications</p></li></ul><p>Already proficient with Python&#8217;s algorithms? </p><p><em>Now it&#8217;s turn to further understand Python&#8217;s world with its modules and functions. </em></p><h3>4. Modules</h3><p>Python&#8217;s extensive library of modules can make your life easier:</p><ul><li><p><strong>Built-in Modules</strong>: os, sys, math, etc.</p></li><li><p><strong>Creating Custom Modules</strong> for reusability</p></li></ul><h3>5. Advanced Topics</h3><p>Dive deeper with advanced Python techniques:</p><ul><li><p><strong>Lambdas</strong>: Anonymous functions</p></li><li><p><strong>Decorators</strong>: Enhancing functions</p></li><li><p><strong>Iterators</strong> and Generators</p></li><li><p><strong>Regular Expressions</strong> for pattern matching</p></li></ul><p><em>If you have arrived here&#8230; congrats! You are already a mid-level user. Now it&#8217;s turn to spice up your coding abilities with OOP &#128293;</em></p><h3><strong>6. Object-Oriented Programming (OOP)</strong></h3><p>Python is an object-oriented language, so understanding OOP is essential:</p><ul><li><p><strong>Classes and Objects</strong></p></li><li><p><strong>Inheritance</strong></p></li><li><p><strong>Dunder (Magic) Methods</strong> to customize class behavior</p></li></ul><p>Now it&#8217;s turn to start understanding how to install (and why!) Python&#8217;s best libraries. </p><h3>7. Package Managers</h3><p>To install libraries and manage dependencies, you&#8217;ll need to know:</p><ul><li><p><strong>PyPI and pip</strong></p></li><li><p><strong>Conda</strong> for data science environments</p></li><li><p><strong>Poetry</strong> for project management</p></li></ul><p><em>Already bored of essentials concepts? Then Python still has a lot more to offer &#10024;</em></p><h3>8. Comprehensions</h3><p>Python offers elegant ways to create data structures:</p><ul><li><p><strong>List Comprehensions</strong></p></li><li><p><strong>Generator Expressions</strong></p></li></ul><h3>9. Learn a Framework</h3><p>Choose a framework based on your goals:</p><ul><li><p><strong>Web Development</strong>: Django, Flask, Pyramid</p></li><li><p><strong>Data Science/Visualization</strong>: Plotly Dash</p></li><li><p><strong>Asynchronous</strong>: FastAPI, Aiohttp, Tornado</p></li></ul><h3>10. Concurrency</h3><p>For high-performance applications, learn concurrency:</p><ul><li><p><strong>Global Interpreter Lock (GIL)</strong></p></li><li><p><strong>Threading and Multiprocessing</strong></p></li><li><p><strong>Asynchrony</strong> with async/await</p></li></ul><h3>11. Environments</h3><p>Managing different Python environments is critical:</p><ul><li><p><strong>Virtualenv and Pyenv</strong></p></li><li><p><strong>Pipenv</strong> for dependency management</p></li></ul><h3>12. Static Typing</h3><p><em>Add type hints to improve readability and catch errors early:</em></p><ul><li><p><strong>Pydantic</strong> and <strong>Mypy</strong></p></li><li><p><strong>Pyright</strong> and <strong>Pyre</strong></p></li></ul><h3>13. Code Formatting</h3><p>Maintain clean, readable code with formatting tools:</p><ul><li><p><strong>Black, YAPF</strong>, and <strong>Ruff</strong></p></li></ul><h3>14. Documentation</h3><p>Document your code for clarity:</p><ul><li><p><strong>Sphinx</strong> for generating docs</p></li></ul><h3>15. Common Packages</h3><p>Familiarize yourself with essential packages:</p><ul><li><p><strong>Typing</strong> and <strong>Tox</strong></p></li></ul><h3>16. Testing</h3><p>Testing is crucial for reliable code:</p><ul><li><p><strong>Pytest</strong> and <strong>Unittest</strong></p></li><li><p><strong>Doctest</strong> and <strong>Nose</strong></p></li></ul><h3>17. DevOps</h3><p>Finally, integrate Python into DevOps practices for deployment and scaling.</p><p><em>Phew, that was a lot to cover! </em></p><p><strong>This roadmap is just a summary to help you start your Python journey. </strong></p><p>We&#8217;ll dive deeper into each topic in upcoming issues, so stay tuned for more!</p><div><hr></div><h2>How to Get Started</h2><ol><li><p><strong>Master the Basics:</strong> Begin with Python fundamentals&#8212;<strong>variables, control structures, functions,</strong> and <strong>data types</strong>.</p></li><li><p><strong>Explore Libraries:</strong> Get hands-on with <strong>Pandas</strong> for data manipulation, <strong>Matplotlib</strong> for visualizations, and <strong>Flask</strong> for creating web applications.</p></li><li><p><strong>Work on Real Projects:</strong> Apply your skills by <strong>building small projects</strong> like a <strong>task automation script</strong> or a <strong>simple web app</strong>.</p></li></ol><div><hr></div><h3><strong>A final note</strong></h3><p>If you&#8217;ve made it this far, you already did the hardest part: <strong>decide to start.</strong><br>Python rewards short, consistent reps. </p><p>Ship something small this week, then another next week. </p><p>Momentum compounds.</p><p>Are you in?</p><p>&#8212; Josep</p><div><hr></div><h2>Still with me? &#129488;</h2><p>As fellow data enthusiasts, I&#8217;m sure you&#8217;d be eager to help me shape some impactful KPIs and take this newsletter to the next level!</p><p><em>So here&#8217;s how you can help:</em></p><p>&#128073;&#127995; I want this newsletter to be truly valuable for you, so please share your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:389999}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; and the restack buttons at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><em>P.S. Share this with the coworker who isn&#8217;t confident in Python, yet.</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p>]]></content:encoded></item><item><title><![CDATA[You’re Using ChatGPT Wrong (According to 700M Users)]]></title><description><![CDATA[Notes #13 - Why asking > doing, and how to turn prompts into business decisions.]]></description><link>https://reads.databites.tech/p/why-most-people-dont-use-chatgpt</link><guid isPermaLink="false">https://reads.databites.tech/p/why-most-people-dont-use-chatgpt</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Tue, 16 Sep 2025 10:02:45 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!T-e9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Hey everyone! &#128075;&#127996;</strong></p><p>Josep here, back with your weekly bite of career insights and encouragement &#10024;</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T-e9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T-e9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 424w, https://substackcdn.com/image/fetch/$s_!T-e9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 848w, https://substackcdn.com/image/fetch/$s_!T-e9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 1272w, https://substackcdn.com/image/fetch/$s_!T-e9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T-e9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png" width="830" height="784" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:784,&quot;width&quot;:830,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1723419,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/173735987?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T-e9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 424w, https://substackcdn.com/image/fetch/$s_!T-e9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 848w, https://substackcdn.com/image/fetch/$s_!T-e9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 1272w, https://substackcdn.com/image/fetch/$s_!T-e9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb51a0eef-c638-4f47-9523-5bb7a5d551b5_830x784.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Enjoying a biking day from Rotterdam to Delft! &#128154;</figcaption></figure></div><h3>A quick gut-check:</h3><p>When you picture ChatGPT, what&#8217;s the first image that pops up?<br>Someone cranking out SQL? Debugging Python? Auto-drafting emails?</p><p>That was my picture too, until I dug into a new OpenAI study covering <strong>hundreds of millions of users and billions of messages</strong>. </p><p>The data flipped my mental model.</p><div><hr></div><p><strong>&#129517; In today&#8217;s issue:</strong></p><ul><li><p><strong>What 700M+ people actually do with ChatGPT</strong> (fast facts you can use)</p></li><li><p><strong>3 implications for your data career</strong> (beyond &#8220;code faster&#8221;)</p></li><li><p><strong>Copy-paste prompt formulas</strong> + a <strong>context checklist</strong> to make your outputs land</p></li></ul><p>Stick with me for ~5 minutes; <strong>this one can upgrade how you work starting today. </strong>&#10024;</p><div><hr></div><p>Let&#8217;s dive in! &#128071;&#127995;</p><h2>The surprising reality</h2><p>From May 2024 &#8594; June 2025, usage exploded. </p><p>Now <strong>there are more than 2.5B messages/day (!!!)</strong>. </p><p>But here&#8217;s the twist:</p><ul><li><p><strong>3 buckets dominate (~80%):</strong><br><em>Practical Guidance, Seeking Information, Writing.</em></p></li><li><p><strong>Coding is small.</strong> ~<strong>4.2%</strong> of all messages (Data Analysis ~<strong>0.4%</strong>).</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xqFR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xqFR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 424w, https://substackcdn.com/image/fetch/$s_!xqFR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 848w, https://substackcdn.com/image/fetch/$s_!xqFR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 1272w, https://substackcdn.com/image/fetch/$s_!xqFR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xqFR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png" width="1226" height="592" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:592,&quot;width&quot;:1226,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:121215,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/173735987?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xqFR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 424w, https://substackcdn.com/image/fetch/$s_!xqFR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 848w, https://substackcdn.com/image/fetch/$s_!xqFR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 1272w, https://substackcdn.com/image/fetch/$s_!xqFR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc8202af7-3d4e-4bee-8974-368d2d95fa06_1226x592.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-paper.pdf">Image from </a><em><a href="https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-paper.pdf">How People Use ChatGPT</a></em><a href="https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-paper.pdf">. </a>Figure 9 shows topic shares (percent of total conversations) based on ~1.1M sampled chats from May 15, 2024 to June 26, 2025, reweighted to daily message volumes. Classifier details in Appendix A; sampling in Section 3.</figcaption></figure></div><ul><li><p><strong>At work, writing wins.</strong> ~<strong>40% of work messages</strong> are writing/editing/clarifying text. Two-thirds of that is <strong>editing your text</strong>, not generating from scratch.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!C61X!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!C61X!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 424w, https://substackcdn.com/image/fetch/$s_!C61X!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 848w, https://substackcdn.com/image/fetch/$s_!C61X!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 1272w, https://substackcdn.com/image/fetch/$s_!C61X!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!C61X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png" width="1220" height="613" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:613,&quot;width&quot;:1220,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:152959,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/173735987?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!C61X!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 424w, https://substackcdn.com/image/fetch/$s_!C61X!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 848w, https://substackcdn.com/image/fetch/$s_!C61X!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 1272w, https://substackcdn.com/image/fetch/$s_!C61X!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9402d484-8565-49c6-b431-5f3438e1b659_1220x613.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-paper.pdf">Image from How People Use ChatGPT. </a>Figure 8: Share of work-related ChatGPT messages by high-level topic (Table 3), averaged over a 28-day window. Based on ~1.1M sampled conversations (May 15, 2024&#8211;June 26, 2025), reweighted to daily volumes; sampling details in Section 3.</figcaption></figure></div><ul><li><p><strong>Intent matters:</strong> ~<strong>49% Asking</strong>, <strong>40% Doing</strong>, <strong>11% Expressing</strong>.<br>&#8220;<strong>Asking</strong>&#8221; is growing faster and is <strong>rated higher quality</strong> than &#8220;Doing.&#8221;</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yRY9!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yRY9!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 424w, https://substackcdn.com/image/fetch/$s_!yRY9!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 848w, https://substackcdn.com/image/fetch/$s_!yRY9!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 1272w, https://substackcdn.com/image/fetch/$s_!yRY9!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yRY9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png" width="1218" height="611" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:611,&quot;width&quot;:1218,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:88172,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/173735987?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yRY9!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 424w, https://substackcdn.com/image/fetch/$s_!yRY9!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 848w, https://substackcdn.com/image/fetch/$s_!yRY9!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 1272w, https://substackcdn.com/image/fetch/$s_!yRY9!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa10d6ceb-23b3-4a5e-b100-0ebaef09b29f_1218x611.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption"><a href="https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-paper.pdf">Image from How People Use ChatGPT. </a>Figure 12: Shares of messages classified as Asking, Doing, or Expressing (automated ternary classifier), averaged over a 28-day window. Based on ~1.1M sampled conversations (May 15, 2024&#8211;June 26, 2025), reweighted to daily volumes; sampling details in Section 3.</figcaption></figure></div><ul><li><p><strong>Most usage isn&#8217;t work.</strong> Non-work messages grew from <strong>53% to ~73%</strong>.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3osG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3osG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 424w, https://substackcdn.com/image/fetch/$s_!3osG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 848w, https://substackcdn.com/image/fetch/$s_!3osG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 1272w, https://substackcdn.com/image/fetch/$s_!3osG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3osG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png" width="1065" height="161" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:161,&quot;width&quot;:1065,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:30138,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:&quot;https://www.databites.tech/i/173735987?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3osG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 424w, https://substackcdn.com/image/fetch/$s_!3osG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 848w, https://substackcdn.com/image/fetch/$s_!3osG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 1272w, https://substackcdn.com/image/fetch/$s_!3osG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F474d7ea4-7d7e-4669-b15c-eb5f2a05eeba_1065x161.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Image from <em><a href="https://cdn.openai.com/pdf/a253471f-8260-40c6-a2cc-aa93fe9f142e/economic-research-chatgpt-usage-paper.pdf">How People Use ChatGPT</a></em>. Table 1 reports ChatGPT&#8217;s daily message volume (in millions), split into work vs. non-work use, shown as 7-day averages from sampled conversations ending June 26, 2024 and June 26, 2025.</figcaption></figure></div></li><li><p><strong>Who&#8217;s using it?</strong> Nearly half of adult messages come from <strong>&lt;26 years old</strong>;<br>usage is <strong>surging in lower-income countries</strong>; the early <strong>gender gap has largely closed</strong>.</p></li></ul><blockquote><p><strong>Translation: </strong>People aren&#8217;t just &#8220;getting AI to do tasks.&#8221;<br>They&#8217;re using it to think, decide, and write more clearly.</p></blockquote><h2>Why this matters for you (data folks)</h2><p>It&#8217;s tempting to think of AI purely as a &#8220;doer&#8221;: something that can code faster, write boilerplate reports, or automate workflows. </p><p>But the reality is that people use it most for <strong>thinking and communication support</strong>.</p><p>And that should make us pause.</p><p>Because the biggest opportunities for us as data professionals aren&#8217;t just in making ChatGPT write SQL faster. They&#8217;re in using it as a partner to sharpen how we think, ask questions, and explain context.</p><ul><li><p><strong>Leverage = writing + context</strong><br>Dashboards rarely fail because of SQL. They fail because they don&#8217;t say what it means for a decision. LLMs excel at </p><ul><li><p>(a) sharpening your thinking</p></li><li><p>(b) editing your words so stakeholders <em>&#8220;get it.&#8221;</em></p></li></ul></li><li><p><strong>&#8220;Soft&#8221; use &#8800; soft impact</strong><br>The next generation of workers arrives expecting AI at every step, scoping, brainstorming, drafting, revising, and explaining.</p><p> If you only use AI for code, you&#8217;re leaving most of the value on the table.</p></li><li><p><strong>Edge beats execution</strong><br>If only ~4% of usage is coding, &#8220;I code with AI&#8221; won&#8217;t differentiate you. </p><p>Owning the problem framing, asking better questions, and adding context will.</p></li></ul><h2>How you can use this insight today</h2><p>Use these as is. They&#8217;ll lift the quality of outputs immediately.</p><h4>1) Decision Framing (for analysis, memos, or dashboards)</h4><pre><code>You are my writing co-pilot. 
- <strong>Context: </strong>[business model], [audience], [decision &amp; timeframe], [constraints], [data caveats].
- <strong>Goal: </strong>Draft a concise brief that answers: 
    1) What changed? 
    2) Why? 
    3) So what? 
    4) Now what? (next actions + owner + when)
- <strong>Tone: </strong>Clear, non-jargon. 
Max 250 words. Add a 1-line TL;DR.</code></pre><h4>2) Stakeholder Translation (tech &#8594; business)</h4><pre><code>You are a translator for non-technical execs. 
<strong>- Input: </strong>[technical finding/SQL/Python output].
<strong>- Audience: </strong>[role, e.g., VP Sales]. Decision needed: [X by Y].
<strong>- Rewrite: </strong>
    1) 3 bullets: impact on revenue/cost/risk 
    2) Confidence &amp; caveats 
    3) A single recommended action with owner &amp; deadline</code></pre><h4>3) Editing Your Draft (LLM&#8217;s #1 work use)</h4><pre><code>You are my editor. 
<strong>- Audience: </strong>[e.g., CX leadership]. 
<strong>- Objective: </strong>[approve plan].

Revise this draft for clarity, brevity, and flow. 
Replace jargon, keep numbers, keep nuance. 
Return: 
    1) improved text 
    2) 3 notes on what you changed and why</code></pre><h4>4) Analysis Planning (prevent dead dashboards)</h4><pre><code>You are a senior analytics lead. 
- <strong>Problem: </strong>[business question]. 
- <strong>Metric(s): </strong>[define]. 
- <strong>Decisions: </strong>[which levers may change].
Design an analysis plan: hypotheses, required data, cuts/segments, pitfalls, success criteria, and the &#8220;decision table&#8221; we&#8217;ll hand to stakeholders.</code></pre><h4>5) &#8220;Asking&#8221; beats &#8220;Doing&#8221; (quality boost)</h4><pre><code>Before doing anything, ask me 5 clarifying questions that would change the output, then propose 2 alternative approaches and their trade-offs. 
Goal: best possible answer for [audience/decision].</code></pre><h2>The Context Checklist (paste next to your IDE)</h2><p>Before you ask an LLM to write, code, or summarize, check these:</p><ul><li><p><strong>Audience:</strong> who is this for (role, context, reading level)?</p></li><li><p><strong>Decision:</strong> what choice will this enable, and by when?</p></li><li><p><strong>Metric(s):</strong> which KPI matters, what&#8217;s &#8220;good vs bad&#8221;?</p></li><li><p><strong>Constraints:</strong> data limitations, guardrails, must-haves, off-limits.</p></li><li><p><strong>Caveats:</strong> sampling bias, freshness issues, &#8220;unknowns.&#8221;</p></li><li><p><strong>Format:</strong> bullets vs memo, 1-pager vs slide, TL;DR required?</p></li></ul><blockquote><p>If you can&#8217;t answer these, your output will look polished but <strong>won&#8217;t move a decision</strong>.</p></blockquote><h2>Common traps to avoid</h2><ul><li><p><strong>Prompting with verbs, not context.</strong> (&#8220;Write SQL for churn&#8221; &#8594; meh.)</p></li><li><p><strong>Pretty output, no decision.</strong> If the reader can&#8217;t act, you didn&#8217;t finish.</p></li><li><p><strong>Forgetting the audience.</strong> Exec &#8800; PM &#8800; engineer. Rewrite per role.</p></li><li><p><strong>Over-trusting summaries.</strong> Always add <strong>caveats + confidence</strong>.</p></li></ul><h2>TL;DR you can share</h2><p>Most people use ChatGPT to <strong>think and write</strong>, not just to code.<br>For data pros, the win is <strong>context</strong> &#8594; better <strong>decisions</strong> &#8594; <strong>impact</strong>.<br>Lead with <strong>Asking</strong> (clarify), then <strong>Doing</strong> (draft), finish with <strong>Editing</strong> (for audience).</p><h2>Your turn</h2><p>How do <em>you</em> mostly use ChatGPT right now &#8212; <strong>Asking</strong>, <strong>Doing</strong>, or <strong>Editing</strong>?<br>Hit reply with one example and the audience you wrote for. I&#8217;ll feature a few (anonymously) in next week&#8217;s Note.</p><p>Stay curious,</p><p>&#8212; Josep</p><div><hr></div><p><em>P.S. If this helped, forward it to a teammate who&#8217;s still using LLMs only for code. They&#8217;re missing 80% of the upside.</em></p><h2><strong>Are you still here? &#129488;</strong></h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:376436}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; and the restack buttons at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p>]]></content:encoded></item><item><title><![CDATA[How to Become a Data Scientist]]></title><description><![CDATA[A clear (and human) guide to get started without getting lost]]></description><link>https://reads.databites.tech/p/how-to-become-a-data-scientist</link><guid isPermaLink="false">https://reads.databites.tech/p/how-to-become-a-data-scientist</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Mon, 15 Sep 2025 13:56:07 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/afb8123c-7433-4503-8ab0-f17ef22a36a9_1465x1296.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you&#8217;re reading this, you probably suspect it already: <strong>data science is a fascinating field&#8230; and also overwhelming. </strong></p><p>With so many languages, tools, and possible paths, it&#8217;s easy not to know where to start.</p><p>That&#8217;s why one of the questions I get most is: </p><blockquote><p>How do you become a data scientist?</p></blockquote><p><strong>This article is my attempt to answer it clearly. </strong></p><p>I won&#8217;t promise magic shortcuts, but I will offer a realistic, step-by-step roadmap to understand what a data scientist does, what skills you need, and how you could start, even from zero.</p><p><em>So let&#8217;s begin with the first question you should have in mind&#8230;</em></p><blockquote><p>What is a data scientist, really?</p></blockquote><p>A data scientist is someone who turns data into decisions. That can take many forms:</p><ul><li><p><strong>Automating processes</strong> with machine learning models</p></li><li><p><strong>Cleaning and exploring data</strong> with SQL and Python</p></li><li><p><strong>Communicating findings</strong> through visualizations</p></li><li><p><strong>Contributing to products</strong> that move the business</p></li></ul><p>And here&#8217;s the important part: not everyone does everything.</p><p>Some profiles are more technical, others are more analytical, and others act as a bridge between teams.</p><p>There&#8217;s room for different talents and paths.</p><blockquote><p>Why become a data scientist?</p></blockquote><p>It&#8217;s a role with impact, growing demand, and a work environment where you never stop learning.</p><p>Having a university degree can help (computer science, math, statistics, engineering), but it&#8217;s not essential.</p><p>Many professionals arrive via non-traditional routes, combining&#8230;</p><ul><li><p>Curiosity</p></li><li><p>Self-learning</p></li><li><p>Personal projects</p></li><li><p>Online training</p></li></ul><p>The key isn&#8217;t where you come from, it&#8217;s what you can do.</p><p>Knowing languages like Python, R, or SQL can open many doors.</p><p>And if you want to prove your level, there are recognized certifications that help.</p><p>So, now that you&#8217;re convinced&#8230; let&#8217;s look at the skills you need to become a data scientist.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h3>The skills you need</h3><p>Data science blends technical know-how with human skills. Both matter.</p><p><strong>Technical skills</strong></p><ul><li><p><strong>Python and R: </strong>your base languages for analysis, visualization, and modeling</p></li><li><p><strong>Statistics and mathematics: </strong>to understand what the data is really saying</p></li><li><p><strong>SQL and NoSQL:</strong> to access, combine, and prepare information</p></li><li><p><strong>Data visualization: </strong>because what isn&#8217;t seen isn&#8217;t understood</p></li><li><p><strong>Machine learning:</strong> predictive models and decision automation</p></li><li><p><strong>Deep learning and NLP:</strong> to work with text, images, or large volumes</p></li><li><p><strong>Big Data: </strong>when the data doesn&#8217;t fit on your laptop</p></li><li><p><strong>Cloud computing:</strong> because today we work in distributed environments</p></li></ul><p><strong>Human skills</strong></p><ul><li><p><strong>Clear communication:</strong> explaining your findings is as important as finding them</p></li><li><p><strong>Data storytelling:</strong> giving context and narrative to what you discover</p></li><li><p><strong>Critical thinking:</strong> question, validate, don&#8217;t take anything for granted</p></li><li><p><strong>Business sense:</strong> connect your analysis to real decisions</p></li><li><p><strong>Problem-solving: </strong>with creativity and method</p></li><li><p><strong>Teamwork: </strong>projects are always collective</p></li></ul><blockquote><p>Where to start?</p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><p>Here&#8217;s a roadmap in 8 steps you can adapt to your context:</p><h3><strong>1) Learn to code</strong></h3><p>If you want to work with data, you need to program. You don&#8217;t have to be a software engineer, but you should know how to manipulate data with code. The three essential languages:</p><ul><li><p><strong>SQL: </strong>to access data</p></li><li><p><strong>Python: </strong>to transform, analyze, and model it</p></li><li><p><strong>R: </strong>a powerful alternative for statistics and visualization</p></li></ul><p><strong>Practical tip: </strong>start with <strong>SQL</strong>. It&#8217;s widely used, stable, and has a friendly learning curve. One resource I like is <a href="https://sqlshortreads.com/">SQLShortRead</a>s, which has an excellent introduction.</p><p>I also published an<a href="https://www.databites.tech/p/launching-the-sql-crash-course-from"> introductory SQL course</a> in my DataBites newsletter, and I&#8217;ll release the practical part in the coming weeks. Take a look if you&#8217;re interested.</p><p>Then move to <strong>Python</strong>. It lets you analyze, build models, and automate tasks. <a href="https://www.kaggle.com/learn/python">Kaggle&#8217;s Python intro course</a> is a great starting point. You can also practice directly in Google Colab or Kaggle Notebooks without installing anything.</p><h3><strong>2) Learn to wrangle, visualize, and communicate data</strong></h3><p>One of the first real challenges is facing &#8220;real&#8221; data: messy, incomplete, poorly structured.</p><p>The process of cleaning, transforming, and preparing this data is called data wrangling, and it&#8217;s one of the most useful skills from the start.</p><p><strong>To begin: </strong>Kaggle has solid beginner courses on <a href="https://www.kaggle.com/learn/data-cleaning">data cleaning</a>, working with tables in <a href="https://www.kaggle.com/learn/pandas">pandas</a>, and <a href="https://www.kaggle.com/learn/data-visualization">data visualization</a>. I recommend starting there.</p><p><strong>Recommended tools</strong></p><ul><li><p><strong>In Python: </strong>pandas, matplotlib, seaborn, plotly</p></li><li><p><strong>No-code: </strong><a href="https://www.youtube.com/watch?v=NNSHu0rkew8&amp;t=37s">Power BI</a>, <a href="https://www.youtube.com/watch?v=kU6fHV2Axso&amp;list=PLaZ3ONWTFzkq1EyOxCDFpB59kGjpKCQ_M">Tableau</a> (you can get started with beginner courses in both)</p></li></ul><p><strong>Personal tip: </strong>it&#8217;s not just about finding insights&#8212;it&#8217;s about telling them well. Explaining your findings clearly and visually is a huge advantage. Invest time in data storytelling and communicating with non-technical audiences.</p><p><strong>Trust me, it makes the difference.</strong></p><h3><strong>3) Strengthen your foundations in math, statistics, and machine learning</strong></h3><p>You don&#8217;t need a PhD in stats or math to become a data scientist, but you do need a solid base to understand the models you&#8217;ll use and avoid treating them as a black box.</p><p><strong>Key topics to master (or at least understand):</strong></p><ul><li><p>Probability, distributions, inference</p></li><li><p>Linear algebra: vectors and matrices</p></li><li><p>Calculus: derivatives and optimization</p></li><li><p>ML: regression, classification, overfitting, cross-validation</p></li></ul><p><strong>Useful resources:</strong></p><ul><li><p><a href="https://www.youtube.com/c/joshstarmer">StatQuest:</a> the perfect channel to understand stats and math clearly</p></li><li><p><a href="https://es.khanacademy.org/">Khan Academy: </a>great for reinforcing math from the basics</p></li><li><p>Intro ML courses like <a href="https://course.fast.ai/">fast.ai</a></p></li></ul><h3><strong>4) Understand how databases work</strong></h3><p>Data rarely arrives in a perfect CSV. Most of the time it lives in complex systems or relational databases.</p><p>&#128218; To practice:</p><ul><li><p>Learn <a href="https://www.youtube.com/watch?v=qw--VYLpxG4">PostgreSQL</a> or <a href="https://www.youtube.com/watch?v=oPV2sjMG53U&amp;list=PLZPZq0r_RZOMskz6MdsMOgxzheIyjo-BZ">MySQL</a> with YouTube tutorials</p></li><li><p>Install <a href="https://www.postgresql.org/download/">PostgreSQL + pgAdmin</a> to set up a local environment</p></li><li><p>Learn to connect everything with Python using SQLAlchemy or psycopg2</p></li></ul><p>The next natural step is the cloud.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h3><strong>5) Get familiar with Big Data and the cloud</strong></h3><p>As data grows, tools change. Many companies work in the cloud and process data in distributed systems using AWS, Google Cloud, or Azure. It&#8217;s worth getting to know services like S3, BigQuery, or data lakes.</p><p>Personally, I enjoy working with Google Cloud. The <a href="https://cloudskillsboost.google/">free Google Cloud Skills Boost</a> is solid, and creators like <a href="https://www.youtube.com/@thecloudgirl">TheCloudGirl</a> make very accessible content.</p><h3><strong>6) Practice, build projects, and connect with others</strong></h3><p>This is, honestly, the most important part. No matter how much theory you read, if you don&#8217;t practice, you won&#8217;t learn. Build your portfolio with personal projects, analysis challenges, well-explained notebooks, and mini-apps with Streamlit or dashboards in Power BI or Tableau.</p><p>You can learn the earlier steps directly through practice and turn them into projects you can show.</p><p>If you&#8217;re out of ideas&#8230; the whole internet is there for inspiration.</p><p>Some useful GitHub repos:</p><ul><li><p><a href="https://github.com/academic/awesome-datascience">Data Science Projects</a></p></li><li><p><a href="https://github.com/llSourcell/Data-Science-Projects">Data-Science-Projects</a></p></li><li><p><a href="https://github.com/mahmoud/awesome-data-science#projects">100+ Projects</a></p></li></ul><p>Once you start building, you need a place to document, share, and keep things organized.</p><p>That place is <strong>GitHub</strong>.</p><p>But first, learn the basics of <strong>Git</strong>, the version control tool: save changes, collaborate without stepping on each other&#8217;s toes, and roll back when you break something (it happens more than you think).</p><p>Recommended resources:</p><ul><li><p><a href="https://www.youtube.com/watch?v=HiXLkL42tMU">Git and GitHub course in Spanish (OpenBootcamp)</a></p></li><li><p><a href="https://skills.github.com/">GitHub Skills: </a>free, guided mini-courses from GitHub</p></li></ul><h3><strong>7) Get an internship or your first job</strong></h3><p>Once you have some basics and a few projects, start applying for internships or junior roles. You don&#8217;t need to know everything. You do need to show you can learn.</p><p>Prepare well:</p><ul><li><p>A clear, structured portfolio (GitHub, Notion, Medium)</p></li><li><p>A concise LinkedIn profile oriented to what you want</p></li><li><p>Practice interview-style exercises: SQL, business reasoning, EDA</p></li></ul><p><strong>Key advice:</strong> how you communicate is worth as much as (or more than) your code.</p><h3><strong>8) Connect with the community</strong></h3><p>Data science moves fast. The best way to keep up is to be close to others who are learning, building, and sharing.</p><p>Follow people you trust, join Discord or LinkedIn communities, go to events. And if you can, share what you&#8217;re learning: writing, teaching, or explaining will help you lock in what you&#8217;ve learned.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://reads.databites.tech/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://reads.databites.tech/subscribe?"><span>Subscribe now</span></a></p><h3>A final note</h3><p>If you&#8217;ve made it this far, you&#8217;ve already taken the first step: understanding that this isn&#8217;t about knowing everything&#8212;it&#8217;s about moving forward bit by bit.</p><p><strong>With patience, curiosity, and consistency.</strong></p><p>No one starts out knowing.</p><p>But we all start in the same place: by taking the first step.</p><p><em>Are you in?</em></p><p>Hope to see you in the community soon!</p><p>Sincerely,</p><p>&#8212; Josep</p><div><hr></div><h2><strong>Are you still here? &#129488;</strong></h2><p>&#128073;&#127995; I want this newsletter to be useful, so please let me know your feedback!</p><div class="poll-embed" data-attrs="{&quot;id&quot;:376005}" data-component-name="PollToDOM"></div><div><hr></div><p>Before you go,<strong> tap the &#128154; and the restack buttons at the bottom of this email to show your support</strong>&#8212;<em>it really helps and means a lot!</em></p><p><strong>Any doubt? Let&#8217;s start a conversation! &#128071;&#127995;</strong></p>]]></content:encoded></item><item><title><![CDATA[SQL COURSE PROBLEM #4]]></title><description><![CDATA[SQL Crash Course - Managing Financial Services Database]]></description><link>https://reads.databites.tech/p/sql-course-problem-4</link><guid isPermaLink="false">https://reads.databites.tech/p/sql-course-problem-4</guid><dc:creator><![CDATA[Josep Ferrer]]></dc:creator><pubDate>Fri, 06 Jun 2025 11:22:18 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!RryE!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F29d8ee22-a790-4cbe-9cac-63125f0c89d7_1380x962.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p></p><div class="pullquote"><p><em>All the course material is stored in the <strong><a href="https://github.com/CornelliusYW/SQL-Crash-Course">SQL Crash Course repository</a></strong>.</em></p></div><p>Hi everyone! <strong>Josep</strong> and <a href="https://open.substack.com/users/6000855-cornellius-yudha-wijaya?utm_source=mentions">Cornellius Yudha Wijaya</a> from <a href="https://open.substack.com/pub/cornellius">Non-Brand Data</a> here &#128075;&#127995;</p><p>As promised, today we are publishing the next two issues of our <a href="https://www.databites.tech/p/launching-the-sql-crash-course-from">SQL Crash Course &#8211; From Zero to Hero!</a> &#128640;</p><p>I am sure you are here to continue our <strong>SQL Crash Course Journey!&#128218;</strong></p><p>If this is your first time or you&#8217;ve for&#8230;</p>
      <p>
          <a href="https://reads.databites.tech/p/sql-course-problem-4">
              Read more
          </a>
      </p>
   ]]></content:encoded></item></channel></rss>