<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chang on Medium]]></title>
        <description><![CDATA[Stories by Chang on Medium]]></description>
        <link>https://medium.com/@changlee99?source=rss-7e8628880f33------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Dr0wqQbOP89Om9WzT_E0Mw.jpeg</url>
            <title>Stories by Chang on Medium</title>
            <link>https://medium.com/@changlee99?source=rss-7e8628880f33------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 07:47:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@changlee99/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fixing Vercel Timeout and Size Errors When Deploying Flutter + Python Endpoints]]></title>
            <link>https://medium.com/@changlee99/fixing-vercel-timeout-and-size-errors-when-deploying-flutter-python-endpoints-5581f09ebaf7?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/5581f09ebaf7</guid>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Sun, 16 Nov 2025 11:02:13 GMT</pubDate>
            <atom:updated>2025-11-16T11:02:13.863Z</atom:updated>
            <content:encoded><![CDATA[<h2>The Problem</h2><p>When deploying a Flutter web application alongside Python API endpoints to Vercel, you may encounter deployment failures with timeout errors or size limit errors like:</p><pre>15:53:57.335  Compiling lib/main.dart for the Web...                             60.1s<br>15:53:57.336  ✓ Built build/web<br>15:53:59.154  No Python version specified in pyproject.toml or Pipfile.lock. Using latest installed version: 3.12<br>15:54:00.664  Installing required dependencies from requirements.txt...<br>15:54:00.665  Using uv at &quot;/usr/local/bin/uv&quot;<br>15:54:04.893  Build Completed in /vercel/output [3m]<br>15:54:05.828  Deploying outputs...<br>16:21:58.689  Error: Size of uploaded file exceeds 300MB</pre><p><strong>Note:</strong> Getting the size error is actually the “happy case” — most of the time you just get a timeout without any clear indication of what went wrong.</p><h2>Root Cause</h2><p>After building a Flutter application, the build process creates many folders and files in the Vercel working directory. When deploying Flutter alone as a static site, this isn’t a problem because Vercel only deploys the output directory.</p><p>However, when you add other platforms like Python API endpoints, <strong>Vercel attempts to deploy all files in the working folder</strong>, not just your specified output directory. This causes:</p><ol><li><strong>Timeouts</strong> — Too many files to process</li><li><strong>Size limit errors</strong> — Total size exceeds Vercel’s 300MB deployment limit</li></ol><h2>The Solution</h2><p>Add post-processing to your build script that deletes all folders and files except build/web (your Flutter output) and api (your Python endpoints).</p><h3>Configuration Files</h3><h4>vercel.json</h4><pre>{<br>  &quot;git&quot;: {<br>    &quot;deploymentEnabled&quot;: {<br>      &quot;main&quot;: false<br>    }<br>  },<br>  &quot;installCommand&quot;: &quot;sh install_flutter.sh&quot;,<br>  &quot;buildCommand&quot;: &quot;sh build_flutter.sh&quot;,<br>  &quot;outputDirectory&quot;: &quot;build/web&quot;<br>}</pre><h4>install_flutter.sh</h4><pre>#!/bin/bash</pre><pre># Install or update Flutter to specific version<br>FLUTTER_VERSION=&quot;3.35.7&quot;</pre><pre>if cd flutter; then<br>  echo &quot;Updating existing Flutter installation to version $FLUTTER_VERSION...&quot;<br>  git fetch --tags<br>  git checkout $FLUTTER_VERSION<br>  git pull<br>  cd ..<br>else<br>  echo &quot;Cloning Flutter and checking out version $FLUTTER_VERSION...&quot;<br>  git clone <a href="https://github.com/flutter/flutter.git">https://github.com/flutter/flutter.git</a> --branch stable<br>  cd flutter<br>  git checkout $FLUTTER_VERSION<br>  cd ..<br>fi</pre><pre>echo &quot;Flutter files:&quot;<br>ls</pre><pre>echo &quot;Running Flutter doctor...&quot;<br>flutter/bin/flutter doctor</pre><pre>echo &quot;Cleaning Flutter build...&quot;<br>flutter/bin/flutter clean</pre><pre>echo &quot;Enabling web support...&quot;<br>flutter/bin/flutter config --enable-web</pre><pre>echo &quot;Getting Flutter dependencies...&quot;<br>flutter/bin/flutter pub get</pre><pre>echo &quot;Flutter installation complete!&quot;</pre><h4>build_flutter.sh (The Key Solution)</h4><pre>#!/bin/bash</pre><pre># Build Flutter web application for production</pre><pre># Load environment variables<br>sh env.sh</pre><pre># Build Flutter web with release configuration<br>flutter/bin/flutter build web --release</pre><pre># Clean up: delete all files except build/web and api directories<br>find . -mindepth 1 -maxdepth 1 ! -name &#39;build&#39; ! -name &#39;api&#39; ! -name &#39;.&#39; -exec rm -rf {} +<br>find build -mindepth 1 -maxdepth 1 ! -name &#39;web&#39; -exec rm -rf {} +</pre><h3>Key Lines Explained</h3><p>The critical cleanup commands at the end of build_flutter.sh:</p><pre># Delete everything in root except &#39;build&#39; and &#39;api&#39; directories<br>find . -mindepth 1 -maxdepth 1 ! -name &#39;build&#39; ! -name &#39;api&#39; ! -name &#39;.&#39; -exec rm -rf {} +</pre><pre># Inside &#39;build&#39;, delete everything except &#39;web&#39; directory<br>find build -mindepth 1 -maxdepth 1 ! -name &#39;web&#39; -exec rm -rf {} +</pre><p>This ensures that after the build:</p><ul><li>Only build/web (Flutter static files) remains</li><li>Only api/ (Python endpoints) remains</li><li>All other Flutter source files, dependencies, and build artifacts are removed</li></ul><h2>Result</h2><p>With this cleanup in place, Vercel only deploys:</p><ul><li>Your Flutter web application (build/web) as a static site</li><li>Your Python API endpoints (api/)</li></ul><p>This keeps the deployment size small and prevents timeout errors, allowing successful deployment of both Flutter and Python on Vercel.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5581f09ebaf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Small Models, Niche Success: Lessons from Building SajuGPT, a Fortune-Telling AI Chatbot]]></title>
            <link>https://medium.com/@changlee99/small-models-niche-success-lessons-from-building-sajugpt-a-fortune-telling-ai-chatbot-e8353640e217?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8353640e217</guid>
            <category><![CDATA[fine-tuning-llm]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Sat, 26 Apr 2025 08:22:22 GMT</pubDate>
            <atom:updated>2025-04-26T08:22:22.979Z</atom:updated>
            <content:encoded><![CDATA[<p>For the past 18 months, I’ve been running <a href="https://www.sajugpt.co.kr/">SajuGPT</a>, an AI chatbot focused on the specific domain of “Saju” — traditional Korean fortune-telling and cosmology. When we started, neither investors nor I were certain it would work. From the outset, we made a conscious decision to <strong>avoid relying on large API-based models like ChatGPT</strong>. Instead, we focused on <strong>fine-tuning smaller models (under 10 billion parameters)</strong>. Our strategy wasn’t to attract a few high-paying users, but to build a large, engaged base of free users.</p><p>This journey involved numerous experiments with various sub-10B models. The key takeaway? <strong>A well-tuned smaller model can achieve user satisfaction levels comparable to, or even exceeding, large language models (LLMs) within its specific niche.</strong> We proved this without significant advertising spend, relying almost entirely on viral growth and word-of-mouth.</p><p>The following chart illustrates the growth in our site’s visibility on Google over time (note: the specific Y-axis values are intentionally omitted):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/0*YIWe1mwNOK9T62QX" /></figure><p>Currently, searching for “사주” (Saju) on Google Korea places our service on the first page, near prominent resources like the Namuwiki entry for “Saju Palja.” This organic growth validates our approach.</p><p>Interestingly, we made very few changes to the basic menu structure or features after the initial launch. Partly due to resource constraints, but primarily because we wanted to test a hypothesis: <strong>Could we drive service improvement <em>solely</em> through enhancing the core model’s performance?</strong></p><p>Fine-tuning itself isn’t the most complex task. The real challenge, especially in the early days with few users, was <strong>evaluating the effectiveness of the tuning</strong>. Gathering meaningful user feedback was slow and often inaccurate.</p><p>Once we achieved a critical mass of users, we shifted our evaluation focus. Standard benchmarks proved almost useless for our specific goals. Instead, <strong>user session duration became our most crucial metric.</strong></p><p>Our process became straightforward: deploy a newly tuned model and closely monitor the average conversation length of active users. <strong>If the session duration didn’t increase, we discarded that model iteration, regardless of benchmark scores.</strong> Conversely, when session duration <em>did</em> increase, we consistently observed a significant spike in the overall user base one to two months later. This pattern held true repeatedly.</p><p>Our experience hammered home a crucial lesson: <strong>for fine-tuning, the dataset is more critical than the base model.</strong> Once we had accumulated a sufficiently large and high-quality dataset specific to Saju, we found that different base models (within the &lt;10B parameter range) could achieve similar performance levels after tuning.</p><p>This isn’t to say the base model is irrelevant, of course. A better base model provides a better starting point. However, <strong>swapping base models is relatively easy compared to the painstaking effort of building and refining a domain-specific dataset.</strong> Therefore, the dataset provides significantly more leverage in the long run.</p><p>We also confirmed that relying solely on large, general-purpose models like ChatGPT or Claude can be disadvantageous for highly specialized domains. Knowledge areas like Saju and Myeongrihak (a related study) are often poorly represented even in massive models. <strong>Prompt engineering can only go so far when the underlying model lacks sufficient foundational knowledge.</strong> If the target domain knowledge isn’t adequately present in the model itself, <strong>fine-tuning appears to be the most viable, perhaps only, path to high performance.</strong></p><p>In summary, our journey with SajuGPT highlights several key points for AI engineers working on specialized applications:</p><ol><li><strong>Niche AI is Viable:</strong> Don’t underestimate the potential of focused AI services.</li><li><strong>Small Models Can Win:</strong> Fine-tuned smaller models can outperform LLMs in specific domains when data and tuning are done right.</li><li><strong>Data is Paramount:</strong> Invest heavily in curating high-quality, domain-specific datasets. This is likely your biggest lever.</li><li><strong>Benchmarks Aren’t Everything:</strong> Real user behavior metrics (like session duration) can be far more indicative of model quality and user satisfaction in practice.</li><li><strong>Embrace the Iteration:</strong> The process is a continuous loop: gather user interaction data -&gt; refine/create datasets -&gt; fine-tune -&gt; deploy -&gt; monitor user behavior -&gt; repeat.</li></ol><p>Building SajuGPT has been a testament to the power of focused effort, domain-specific data, and listening to user behavior over chasing generic benchmarks or relying solely on the largest available models. For engineers building specialized AI, these principles might offer a more effective path to success.</p><p><em>Originally published at </em><a href="https://gist.github.com/lcw99/3f4731ebe3dc29090facf9867b621b8b"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8353640e217" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Gotcha with package_info_plus in Flutter Web Applications]]></title>
            <link>https://medium.com/@changlee99/the-gotcha-with-package-info-plus-in-flutter-web-applications-37f91e747276?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/37f91e747276</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Thu, 28 Nov 2024 06:43:53 GMT</pubDate>
            <atom:updated>2024-11-28T06:45:48.417Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/937/0*ilnGOq2ZWClqWqL0.png" /></figure><p>When developing Flutter web applications, many developers use the package_info_plus package to retrieve app version information. However, there&#39;s a crucial gotcha that you need to be aware of, especially when implementing version checking or update mechanisms.</p><p>The problem lies in how package_info_plus works specifically in web environments. Unlike mobile platforms where version information is embedded in the app bundle, Flutter web handles this differently:</p><ol><li>During the build process, Flutter web generates a version.json file</li><li>This file is placed in your web distribution folder</li><li>When package_info_plus needs to retrieve version information, it makes an HTTPS request to fetch this file from your web server</li></ol><p>This mechanism creates a potential issue for version checking. Here’s why:</p><pre>// This might not work as expected in web <br>final packageInfo = await PackageInfo.fromPlatform(); <br>final buildNumber = packageInfo.buildNumber;</pre><p>When your app makes this call, it’s actually performing a network request to fetch the latest version.json from your server. This means:</p><ul><li>If you deploy a new version but a user is still running an old version, they’ll still get the <strong>new</strong> version number</li><li>This makes it impossible to reliably detect if the user is running an outdated version of your app</li><li>Version comparison logic might fail since the reported version will always be the latest one on the server</li></ul><p>Instead of relying on package_info_plus for web version checking, consider these alternatives:</p><p>To implement robust version checking in Flutter web:</p><ul><li>Always store a local build number constant in your application code</li><li>Don’t rely solely on package_info_plus for version comparison in web</li><li>Use consistent build number increments for reliable comparisons</li></ul><p>While package_info_plus is a valuable package for Flutter development, its web implementation has limitations that make it unsuitable for version checking. Understanding these limitations helps you design more robust update mechanisms for your Flutter web applications.</p><p>Remember: In web environments, the version information from package_info_plus will always reflect the latest deployed version, not the version currently running in the user&#39;s browser.</p><p><em>Originally published at </em><a href="https://gist.github.com/lcw99/4b5d74b8920d51358b61e32b19baf7a7"><em>http://github.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37f91e747276" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The AI Bubble: Why Tech Giants’ Investments Aren’t Yielding Expected Returns]]></title>
            <link>https://medium.com/@changlee99/the-ai-bubble-why-tech-giants-investments-aren-t-yielding-expected-returns-a317daf5f247?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/a317daf5f247</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Sun, 04 Aug 2024 12:10:08 GMT</pubDate>
            <atom:updated>2024-08-04T12:10:08.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*951Splox8RaKN7tc" /></figure><p>As concerns about an AI bubble continue to grow, tech stocks are taking a hit. This downturn is largely due to disappointing quarterly revenues from companies that have heavily invested in AI. Despite the repeated discourse, it’s worth reiterating that while current generative AI technologies can boost efficiency for some workers, they are unlikely to drive significant revenue growth across the entire industry.</p><p>Google has recently been experimenting with displaying AI-generated results alongside traditional search results. This is a useful feature that could eventually become a staple of Google’s core service. But will the introduction of AI in search lead to increased ad revenue for Google? It’s unlikely. Google dominates the global search market, and for its revenue to grow, advertisers would need to spend more on Google ads. However, it’s improbable that advertisers will increase their budgets just because AI search results are being displayed.</p><p>Therefore, Google might consider charging users to view AI search results. Yet, how much revenue could this realistically generate? Probably not enough to cause a significant surge in Google’s stock price. Even Netflix, struggling with its subscription model, has turned to ad-supported plans. Charging for search results seems equally impractical.</p><p>Nevertheless, Google will continue to invest in AI infrastructure. The competitive pressure is intense; with tools like ChatGPT entering web search, Google can’t afford to be complacent. If ChatGPT were to falter, Google might take a breather, but until then, the investment will persist.</p><p>Unlike Google, other companies may not invest as heavily in AI infrastructure moving forward. Meta’s CEO has spent around 30 trillion won (approximately $25 billion), mostly on model development. Will more equipment be needed for model development? The peak has likely passed. The industry is shifting from creating larger language models to optimizing smaller ones. Reducing model sizes can significantly cut costs — achieving 80% accuracy instead of 90% could slash costs by a factor of ten.</p><p>In summary, while AI investments continue, especially for giants like Google, the landscape is changing. The focus is now on efficiency and cost reduction rather than scaling up. The AI boom might not be the revenue driver many hoped for, but it remains a critical area for technological advancement and competitive positioning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a317daf5f247" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Dark Side of Generative AI: How Automation is Undermining Online Content]]></title>
            <link>https://medium.com/@changlee99/the-dark-side-of-generative-ai-how-automation-is-undermining-online-content-0312d530517f?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/0312d530517f</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[quora]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Sat, 20 Jul 2024 03:56:01 GMT</pubDate>
            <atom:updated>2024-07-20T03:57:45.681Z</atom:updated>
            <content:encoded><![CDATA[<p>Generative AI, exemplified by tools like ChatGPT, was once hailed as a revolutionary force poised to drive growth and efficiency across various industries. However, contrary to these optimistic forecasts, the internet is facing rapid deterioration due to the proliferation of AI-generated content. Centralized and closed internet environments, such as Naver, are particularly vulnerable to this disruption.</p><p>Currently, the market is flooded with programs that leverage ChatGPT to automatically post on platforms like Naver Knowledge, blogs, and forums. While automation in ad postings isn’t new, the shift lies in the content generation itself now being fully automated. Previously, even if the posting process was automated, the content was still crafted by humans. This transition to AI-generated content is exacerbating the issue of Naver’s already ad-heavy environment, pushing it towards a tipping point where quality content becomes a rarity.</p><p>This problem extends beyond Naver. Quora, an English-language platform similar to Naver Knowledge, is also grappling with a flood of AI-generated answers. This influx has led to a significant decline in the quality of responses, with many being useless or inaccurate, driving away genuine contributors.</p><p>Stack Overflow, a Q&amp;A site for programmers, has taken a firm stance against AI-generated answers. Given that much of generative AI’s coding proficiency is derived from Stack Overflow’s extensive content, the platform fears that allowing AI-generated responses would undermine its very foundation. The site has officially banned such content to preserve the integrity and reliability of its community-driven answers.</p><p>The broader implication is that content management sites and search engines will inevitably need to actively filter out AI-generated content. The experiences of Naver Knowledge and Quora illustrate that AI-generated responses often fail to resonate with users due to their superficiality, redundancy, and frequent inaccuracies. Although generative AI can produce high-quality content, such instances are rare, and the overwhelming presence of seemingly well-written but ultimately inaccurate content creates a significant problem. Consequently, content managers are likely to exclude AI-generated content, regardless of its apparent quality, to maintain the integrity of their platforms.</p><p>A year ago, Goldman Sachs predicted that generative AI would boost global GDP by 7%. However, recent reports paint a more skeptical picture of the future of generative AI. While investments in high-performance parallel computing and AI expertise may lead to groundbreaking innovations, the practical utility of generative AI, primarily in producing human-like content, remains questionable and challenging to justify.</p><ul><li><a href="https://www.goldmansachs.com/intelligence/pages/generative-ai-could-raise-global-gdp-by-7-percent.html">Generative AI Could Raise Global GDP by 7%</a></li><li><a href="https://www.goldmansachs.com/intelligence/pages/gen-ai-too-much-spend-too-little-benefit.html">Gen AI: too much spend, too little benefit?</a></li></ul><p>In conclusion, while generative AI holds the potential for innovation, its current application in content generation poses significant challenges. The balance between leveraging AI for efficiency and maintaining the quality and integrity of online content is delicate and demands careful consideration by platform managers and policymakers alike.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0312d530517f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing Pinkish Hue on Samsung Monitor in Ubuntu 22.04: A Step-by-Step Guide]]></title>
            <link>https://medium.com/@changlee99/fixing-pinkish-hue-on-samsung-monitor-in-ubuntu-22-04-a-step-by-step-guide-2c2d95c1b29c?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c2d95c1b29c</guid>
            <category><![CDATA[colors]]></category>
            <category><![CDATA[monitor]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Thu, 13 Jun 2024 11:52:25 GMT</pubDate>
            <atom:updated>2024-06-13T11:52:25.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*1TaubWFKyZBxwJgSFeizEg.jpeg" /><figcaption>Pinkish color is actually grayscale</figcaption></figure><p>If you recently noticed that your Samsung monitor is displaying a pinkish hue instead of proper grayscale tones on your Ubuntu 22.04 system, you might initially suspect that your monitor or graphics card is malfunctioning. However, if your monitor works fine with another device, like a Windows notebook, and another monitor works well with your current setup, the issue is likely related to the color profile settings on your Ubuntu system.</p><p>In this guide, I’ll walk you through diagnosing and fixing this issue by adjusting the color profile of your monitor using command line tools. By the end, your display should return to the expected colors.</p><p>Before jumping to solutions, ensure that the problem is indeed with the color profile settings:</p><ol><li><strong>Check with Another Device</strong>: Connect your Samsung monitor to another device (e.g., a Windows notebook) to see if the issue persists. If the colors display correctly, the monitor is fine.</li><li><strong>Test with Another Monitor</strong>: Connect a different monitor to your Ubuntu system. If it displays correctly, your graphics card and cable are not the problem.</li></ol><p>The problem likely lies within the color profile settings of your monitor on Ubuntu. By default, Ubuntu might have assigned a faulty or inappropriate color profile to your monitor, causing the pinkish hue.</p><p>Before delving into command-line solutions, check if you can resolve the issue via the graphical interface:</p><ol><li><strong>Open Settings</strong>: Go to the Settings menu in Ubuntu.</li><li><strong>Navigate to Color</strong>: Click on the “Color” section.</li><li><strong>Select Your Monitor</strong>: Find your Samsung monitor in the list of devices.</li><li><strong>Change the Profile</strong>: If you see an sRGB profile or any other appropriate color profile, select it.</li></ol><p>If you find and select an appropriate profile, this method is much easier and more straightforward. However, if you don’t find a useful profile in the GUI, proceed with the command-line method.</p><p>Open a terminal and run the following commands:</p><p>This command lists all available color profiles on your system. Note down the Profile_ID for the standard RGB profile, which is often named something like sRGB.icc.</p><p>Next, list all connected devices:</p><p>Look through the output to find your monitor’s device ID. It will look something like</p><pre>xrandr-Samsung Electric Company-CF791-HTRK100105...</pre><p>Note this down as well.</p><p>Now, use the Profile_ID and Device_ID you noted to assign the standard RGB profile to your monitor. Replace Device_ID and Profile_ID in the following command with your actual IDs. Here is an example command for reference:</p><pre>colormgr device-add-profile &quot;xrandr-Samsung Electric Company-CF791-HTRK100105&quot; icc-a16f7c144d1f572cbbc0ee12227c0d14</pre><p>After assigning the new profile, verify if the changes have taken effect. Your monitor should now display colors correctly without the pinkish hue.</p><p>Sometimes, a reboot is necessary for changes to take full effect. If the color profile assignment doesn’t seem to apply immediately, restart your system:</p><p>Changing the color profile should resolve the pinkish hue issue on your Samsung monitor when using Ubuntu 22.04. If you continue to experience problems, double-check that you selected the correct Profile_ID and Device_ID, and try reapplying the steps above.</p><p>This solution not only fixes the color display issue but also helps maintain accurate color representation on your monitor. If you found this guide helpful, consider sharing it with others who might face similar issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c2d95c1b29c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Preserving Pre-trained LLM Capabilities While Injecting New Knowledge Through Fine-tuning]]></title>
            <link>https://medium.com/@changlee99/preserving-pre-trained-llm-capabilities-while-injecting-new-knowledge-through-fine-tuning-43b4762c08ff?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/43b4762c08ff</guid>
            <category><![CDATA[finetune-llm]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Wed, 15 May 2024 05:26:13 GMT</pubDate>
            <atom:updated>2024-05-15T05:26:13.828Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:<br></strong>Large Language Models (LLMs) have revolutionized the field of natural language processing, demonstrating remarkable performance across a wide range of tasks. However, when fine-tuning these models to inject new knowledge, especially in minor languages, the pre-existing capabilities of the model often suffer significant degradation. This article explores a novel approach to address this issue, allowing LLMs to retain their original performance while successfully incorporating new information.</p><p><strong>The Problem:</strong><br>Traditional fine-tuning methods, when applied to LLMs, can lead to a substantial loss of the model’s pre-trained capabilities. This problem becomes particularly severe when the new knowledge being injected is in a minor language, such as fine-tuning an English-trained model with Korean data. The resulting model often experiences a drastic decline in performance, rendering it less effective for its intended purpose.</p><p><strong>The Solution:</strong><br>To mitigate this issue, researchers have proposed a modified fine-tuning approach that involves expanding the model’s architecture by adding new layers. The number of additional layers should be determined based on the amount of new information to be injected. During the fine-tuning process, only the newly added layers are unlocked, while the original layers remain fixed.</p><p>By strategically placing these new layers in the middle of the model’s architecture, the LLM can effectively learn and integrate the new knowledge without compromising its pre-existing capabilities. This approach allows the model to retain its original performance on tasks it was initially trained on while simultaneously acquiring new skills.</p><p><strong>The Advantages:</strong><br>1. Preservation of pre-trained capabilities: By keeping the original layers of the model fixed during fine-tuning, the LLM maintains its performance on tasks it was previously trained on. This is particularly valuable when the model has been trained on a large corpus of data and has acquired a wide range of language understanding and generation skills.</p><p>2. Effective integration of new knowledge: The addition of new layers specifically designed to accommodate the new information allows the model to learn and incorporate the injected knowledge effectively. By strategically placing these layers in the middle of the architecture, the model can leverage its pre-existing knowledge while integrating the new information seamlessly.</p><p>3. Flexibility in knowledge injection: The proposed approach offers flexibility in terms of the amount of new knowledge that can be injected. By adjusting the number of additional layers based on the volume of new information, the model can be fine-tuned to accommodate varying levels of knowledge expansion.</p><p><strong>Conclusion:</strong><br>The challenge of preserving pre-trained LLM capabilities while injecting new knowledge, particularly in minor languages, has been a significant hurdle in the field of natural language processing. The proposed fine-tuning approach, which involves adding new layers to the model’s architecture and selectively unlocking them during training, offers a promising solution to this problem. By retaining the model’s original performance while effectively integrating new information, this technique opens up new possibilities for expanding the capabilities of LLMs without compromising their pre-existing skills. As research in this area continues to advance, we can expect to see more innovative methods for enhancing the versatility and adaptability of language models.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43b4762c08ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Expanding the Linguistic Horizon: Merging Gemma 7B Models for Multilingual Capabilities]]></title>
            <link>https://medium.com/@changlee99/expanding-the-linguistic-horizon-merging-gemma-7b-models-for-multilingual-capabilities-3acb04b693d9?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/3acb04b693d9</guid>
            <category><![CDATA[self-attention]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[gemma]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Fri, 19 Apr 2024 23:34:26 GMT</pubDate>
            <atom:updated>2024-04-19T23:38:21.893Z</atom:updated>
            <content:encoded><![CDATA[<p>As the field of natural language processing continues to advance, the need for versatile and capable language models that can handle a diverse range of languages and tasks has become increasingly important. This is where the Gemma Self-Attention Merger project steps in, offering a unique solution to this challenge.</p><h4>The Challenge of Language Barriers</h4><p>Language barriers have long been a significant obstacle in the world of natural language processing. While there are many impressive language models available, such as the Gemma 7B, they are often trained on a specific language or set of languages, limiting their applicability across different linguistic domains.</p><p>This is where the Gemma Self-Attention Merger project comes into play. By merging the self-attention layers of an English-based Gemma 7B model and a Korean-based Gemma 7B model, the project aims to create a more versatile and capable language model that can perform well on tasks involving both English and Korean text.</p><h4>The Gemma Self-Attention Merger Approach</h4><p>The key idea behind the Gemma Self-Attention Merger project is to leverage the strengths of both the English and Korean Gemma 7B models by combining their self-attention layers. This is achieved through a custom script that performs the following steps:</p><p>1. Loads the pre-trained English and Korean Gemma 7B models.<br>2. Creates a larger configuration based on the English model, doubling the number of attention heads.<br>3. Merges the weights of the self-attention layers from the two pre-trained models into the larger model.<br>4. Saves the merged model and the associated tokenizer for future use.</p><p>By doubling the number of attention heads, the merged model can potentially capture more fine-grained relationships and patterns in the input data, leading to improved performance on a wide range of natural language processing tasks.</p><h4>The Benefits of the Merged Model</h4><p>The Gemma Self-Attention Merger project offers several key benefits:</p><p>1. <strong>Multilingual Capabilities</strong>: The merged model can handle both English and Korean input, making it a more versatile solution for applications that require dealing with multiple languages.<br>2. <strong>Increased Representational Capacity</strong>: The doubled number of attention heads in the merged model allows for more expressive power, potentially leading to better performance on various tasks.<br>3. <strong>Leveraging Existing Models</strong>: Instead of training a completely new model from scratch, the project builds upon the strengths of the pre-trained English and Korean Gemma 7B models, saving time and resources.</p><p>By bridging the linguistic gap between English and Korean, the Gemma Self-Attention Merger project paves the way for more inclusive and effective natural language processing solutions.</p><h4>Conclusion</h4><p>The Gemma Self-Attention Merger project represents a significant step forward in the quest for versatile and capable language models that can transcend language barriers. By merging the self-attention layers of English and Korean Gemma 7B models, the project offers a promising approach to creating multilingual language models that can excel in a wide range of applications.</p><p>As the field of natural language processing continues to evolve, initiatives like the Gemma Self-Attention Merger project will play a crucial role in pushing the boundaries of what’s possible, ultimately leading to more inclusive and impactful technologies.</p><h4>Code</h4><p><a href="https://github.com/lcw99/merge-gemma-attn">GitHub - lcw99/merge-gemma-attn</a></p><h4>Model</h4><p><a href="https://huggingface.co/lcw99/google-gemma-10B-ko-chang">lcw99/google-gemma-10B-ko-chang · Hugging Face</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3acb04b693d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Perils of Blindly Following Online Solutions: A Cautionary Tale]]></title>
            <link>https://medium.com/@changlee99/the-perils-of-blindly-following-online-solutions-a-cautionary-tale-d6e37fcc827d?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6e37fcc827d</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[sudo]]></category>
            <category><![CDATA[ubuntu]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Mon, 01 Apr 2024 00:58:33 GMT</pubDate>
            <atom:updated>2024-04-01T01:00:08.955Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong>:<br>In the world of technology, we often find ourselves facing various issues and error messages that can hinder our productivity. In our quest for quick solutions, we turn to the internet, hoping to find answers from the vast pool of knowledge shared by others who have encountered similar problems. However, blindly following online solutions without fully understanding their implications can sometimes lead to unintended consequences, as I recently discovered.</p><p><strong>The Initial Problem:<br></strong>While using Remote Desktop Protocol (RDP) to access my system remotely, I encountered an annoying prompt that read, “Authentication is required to create a color profile.” Each time I logged in via RDP, this message would appear, forcing me to cancel it before proceeding. Determined to find a solution, I turned to the internet for help.</p><p><strong>The Online Solution:<br></strong>After some searching, I stumbled upon a seemingly straightforward solution. It involved creating a configuration file named “02-allow-colord.conf” under the directory “/etc/polkit-1/localauthority.conf.d/” with specific instructions to modify the polkit configuration. The solution claimed that by adding the provided rules, the authentication prompt would no longer appear during RDP sessions.</p><p><strong>Implementing the Solution:<br></strong>Eager to resolve the issue, I followed the instructions and created the configuration file with the provided rules. At the time, I couldn’t recall whether this solution actually solved the RDP problem or not. However, I soon realized that my hasty implementation had unintended consequences.</p><p><strong>The Unintended Consequence:<br></strong>Recently, while trying to use the “pkexec” command with the “ — user” option, I encountered an error message: “Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying.” This error prevented me from executing the command successfully.</p><p>Moreover, I noticed that the modification caused authentication problems on all GUI applications that required sudo privileges, such as Ubuntu Software, which needs sudo privileges to install apps. This meant that I was unable to perform tasks that required administrative permissions through the graphical user interface.</p><p><strong>Tracing the Root Cause:<br></strong>After some investigation and troubleshooting, I discovered that the root cause of the “pkexec” issue and the authentication problems in GUI applications was the “02-allow-colord.conf” file I had created earlier based on the online solution. The modifications I made to the polkit configuration had unintentionally interfered with the proper functioning of “pkexec” and the authentication mechanism for GUI applications.</p><p><strong>The Resolution:<br></strong>To resolve the “pkexec” issue and restore the proper functioning of GUI applications that required sudo privileges, I removed the “02-allow-colord.conf” file that I had created. Once the file was removed, the “pkexec” command worked fine without any errors, and I was able to use Ubuntu Software and other GUI applications that needed sudo privileges without encountering authentication problems.</p><p><strong>Lessons Learned:<br></strong>This experience taught me a valuable lesson: don’t blindly follow online solutions without fully understanding their implications. It’s crucial to approach such solutions with caution and take the time to comprehend what each step does and how it may affect your system. Blindly copying and pasting commands or configurations can lead to unintended consequences that may cause more problems than they solve.</p><p>Before implementing any solution, it’s essential to:<br>1. Research and understand the problem thoroughly.<br>2. Verify the credibility and reliability of the source providing the solution.<br>3. Read and comprehend each step of the solution and its potential impact on your system.<br>4. Create backups or snapshots of your system before making any significant changes.<br>5. Test the solution in a controlled environment, if possible, before applying it to your main system.</p><p><strong>Conclusion</strong>:<br>In the world of technology, it’s important to approach problems and solutions with a critical mindset. While the internet can be an invaluable resource for finding answers, blindly following online solutions without proper understanding can lead to unintended consequences. By taking the time to research, comprehend, and test solutions before implementing them, we can minimize the risk of introducing new issues and ensure the stability and integrity of our systems. Let my experience serve as a reminder to always proceed with caution and never underestimate the power of knowledge and understanding when it comes to solving technical problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6e37fcc827d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Paradox in Retrieval-Augmented Generation (RAG): Searching for Answers in the Realm of…]]></title>
            <link>https://medium.com/@changlee99/the-paradox-in-retrieval-augmented-generation-rag-searching-for-answers-in-the-realm-of-be99555695e3?source=rss-7e8628880f33------2</link>
            <guid isPermaLink="false">https://medium.com/p/be99555695e3</guid>
            <category><![CDATA[retrieval-augmented]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Chang]]></dc:creator>
            <pubDate>Fri, 19 Jan 2024 23:56:18 GMT</pubDate>
            <atom:updated>2024-01-19T23:56:18.645Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Paradox in Retrieval-Augmented Generation (RAG): Searching for Answers in the Realm of Questions</h3><p>A Paradox of RAG</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BTFn0_WMJV6Z6VyzE9tTpw.png" /></figure><p><strong>Introduction</strong>: The integration of Retrieval-Augmented Generation (RAG) in question-answering AI systems marks a significant leap in the quest for more contextually aware and knowledgeable AI. This technique, which merges the generative power of Large Language Models (LLMs) with the vast database of internet information, faces a noteworthy paradox. How can a system effectively search for answers using questions as queries, especially when the target documents predominantly contain answers, not questions? This blog post delves into this intriguing paradox and its implications for the future of AI-driven question-answering systems.</p><p><strong>The RAG Technique, An Overview:</strong> RAG combines a generative AI model with a search mechanism that retrieves documents based on a user’s query. The AI then utilizes these documents to formulate an informed response. Theoretically, this approach should yield more precise and comprehensive answers by tapping into the extensive online repository of information.</p><p><strong>The Fundamental Paradox: </strong>The central challenge in RAG lies in the disconnect between user queries, which are typically questions, and the retrieved documents, which contain answers or relevant information. This leads to a skeptical question: Are we attempting to create an expected answer to find the answer? This paradox highlights the difficulty in aligning the question-oriented nature of queries with the answer-focused content of documents.</p><p><strong>Comparison with Conventional Search Engines:</strong> In traditional search engines like Google, users input keywords or phrases expected to be present in the target documents, facilitating effective content matching. However, this method seems less efficient when the input is a question, as it may limit search results to documents in a Q&amp;A format or those containing similar queries. This limitation raises concerns about the breadth and depth of information retrievable by RAG systems, possibly affecting answer quality.</p><p><strong>Implications and Solutions: </strong>This paradox demands a rethinking of retrieval systems in AI question-answering. A potential solution is improving document retrieval to better understand and match the user’s question intent and context. This might involve sophisticated natural language processing techniques to infer potential answers from the question.</p><p>Another strategy could involve restructuring the knowledge base to be more conducive to question-based retrieval. This approach would see information being categorized and indexed in a manner more aligned with question posing.</p><p><strong>Conclusion:</strong> RAG represents a significant advancement in AI and natural language processing, yet its effectiveness is constrained by the inherent paradox of using questions to retrieve answer-based documents. Overcoming this challenge is crucial for advancing AI-driven question-answering systems. As the field evolves, it will be fascinating to witness the development of innovative solutions that address this paradox, leading to more intelligent and adept AI systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be99555695e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>