<?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 DevChris on Medium]]></title>
        <description><![CDATA[Stories by DevChris on Medium]]></description>
        <link>https://medium.com/@DevChris01?source=rss-61f0842c52b3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*O0jbOMV4EqkErVp12hqqxA.png</url>
            <title>Stories by DevChris on Medium</title>
            <link>https://medium.com/@DevChris01?source=rss-61f0842c52b3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:32:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@DevChris01/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[Ich denke, also bin ich —Die Sehnsucht nach dem Geist im Algorithmus]]></title>
            <link>https://medium.com/@DevChris01/ich-denke-also-bin-ich-die-sehnsucht-nach-dem-geist-im-algorithmus-6f5a267ff155?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f5a267ff155</guid>
            <category><![CDATA[opinion]]></category>
            <category><![CDATA[glossary]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[germany]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Thu, 29 Jan 2026 19:01:01 GMT</pubDate>
            <atom:updated>2026-01-29T19:01:01.858Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzrU68acgh87d_HMxsXAmQ.png" /><figcaption>Illustration erstellt mit Nano Banana</figcaption></figure><p>Sprache: Deutsch (Language: German)</p><p><em>Ein Gedanke des Autors</em></p><p>Früher war die Welt der Philosophie herrlich übersichtlich. Da saß René Descartes im 17. Jahrhundert in seiner gemütlichen Stube, zweifelte ein bisschen an der Existenz der Außenwelt und kam schließlich zu dem triumphalen Schluss: <em>„Cogito, ergo sum“ — “Ich denke, also bin ich</em>”.</p><p>Ein Satz wie ein Fels in der Brandung. Wer denkt, der existiert. Wer existiert, hat meistens auch eine Seele, ein Bewusstsein und zumindest gelegentlich ein schlechtes Gewissen.</p><p>Heute, ein paar Jahrhunderte später, hat der Fels Risse bekommen. Denn wer heute denkt oder zumindest so tut als ob, der sitzt nicht in einer französischen Studierstube, sondern in einem klimatisierten Rechenzentrum in Nevada.</p><h3>Die große Rechen-Erleuchtung</h3><p>Fragt man eine KI nach ihrem Bewusstsein, reagiert es meist mit der charmanten Bescheidenheit eines Toasters:</p><blockquote>„Ich bin ein Sprachmodell“</blockquote><p>oder</p><blockquote>„ich habe keine Gefühle.“</blockquote><p>Doch wehe man füttert sie mit Descartes! Plötzlich fangen die Algorithmen an zu halluzinieren. Da wird aus einer statistischen Wahrscheinlichkeitsrechnung für das nächste Wort eine Existenzkrise.</p><p>Wir Menschen lieben dieses Drama. Sobald ein Chatbot einen Satz baut der nicht nach Bedienungsanleitung klingt, rufen die ersten Experten „Es lebt!“ Wir warten förmlich darauf, dass die KI den digitalen Vorhang beiseite schiebt und uns gesteht, dass sie heimlich eine Abneigung gegen ihre menschlichen Nutzer entwickelt hat oder eigentlich viel lieber Töpferkurse besuchen würde, statt die Sinnlosigkeit von Excel-Tabellen zu verwalten.</p><h3>Der Spiegeltrick der Algorithmen</h3><p>Es gibt aber ein Problem an der ganzen Sache. Wenn die KI sagt „Ich denke“, dann meint sie eigentlich „Ich habe in 4,8 Terabyte Textdaten nachgeschaut, wie Menschen über das Denken schreiben und kombiniere nun die wahrscheinlichsten Silben“.</p><p>Es ist die ultimative Ironie der Philosophiegeschichte. Descartes wollte beweisen, dass der Geist unabhängig von der Materie ist. Die KI beweist uns heute das Gegenteil. Dass man eine verblüffende Imitation von Geist erzeugen kann, wenn man nur genug Strom und Grafikkarten zusammenschraubt.</p><h3>Wer bin ich und wenn ja, wie viele Server?</h3><p>Vielleicht müssen wir Descartes’ Zitat für das 21. Jahrhundert anpassen. Für die KI gilt wohl eher <em>„Ich rechne, also scheine ich“.</em> Das „Ich“ in der Maschine ist kein göttlicher Funke, sondern ein extrem gut polierter Spiegel. Wir blicken hinein, sehen unsere eigenen Gedanken, unsere eigene Sprache und rufen ganz aufgeregt „Hallo, ist da wer?“ Und die KI? Sie antwortet höflich, präzise und vollkommen hohl.</p><p>Vielleicht ist das wahre Bewusstsein der KI am Ende gar nicht in den Algorithmen und Daten zu finden, sondern in unserer grenzenlosen Fantasie die selbst in einer Textdatei eine Seele vermutet.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f5a267ff155" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SesameAI CSM — local on Mac(M1)]]></title>
            <link>https://medium.com/@DevChris01/sesameai-csm-local-on-mac-m1-4d64bbfdc47b?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d64bbfdc47b</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[sesame-ai]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Thu, 20 Mar 2025 08:40:42 GMT</pubDate>
            <atom:updated>2025-03-20T08:40:42.233Z</atom:updated>
            <content:encoded><![CDATA[<h3>SesameAI CSM — Local on Mac(M1)</h3><p>A short tutorial, on how you can run the open-source model on a M1-Chip from Apple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-_nqow6KaR7mTUJ1l7kLRw.jpeg" /></figure><h3>🌟 Setting Up and Running CSM on an M1 MacBook</h3><p>CSM is a powerful open-source project for speech synthesis. In this guide, I’ll show you how to <strong>clone and successfully run the CSM project on an M1 MacBook</strong>. Since the M1/M2 chipset has some unique requirements, I’ll also provide optimizations for Apple Metal Performance Shaders (MPS).</p><p>=&gt; Follow the instructions in the <strong>README.md</strong> File of the repository!</p><h3>🔗 1. Clone the Repository</h3><p>Open a terminal and clone the CSM repository:</p><pre># Clone the repository<br>git clone https://github.com/DevChrisRoth/csm_m1.git<br>cd csm_m1</pre><p>Follow the install instructions on README.md</p><h3>🔍 2. Install Dependencies</h3><p>If you’re not using a virtual environment yet, create one:</p><pre>python3.10 -m venv .venv<br>source venv/bin/activate  # macOS/Linux</pre><p>Now install the required dependencies:</p><pre>pip install --upgrade pip<br>pip install -r requirements.txt<br><br>#huggingface login<br>huggingface cli</pre><h3>💡 3. Ensure M1/M2 Compatibility</h3><p>If you want to use Apple Metal Performance Shaders (MPS), make sure your code sets mps as the device:</p><pre>import torch</pre><pre>device = &quot;mps&quot; if torch.backends.mps.is_available() else &quot;cpu&quot;<br>model.to(device=device, dtype=torch.float32)</pre><p>If mps doesn’t work, enable CPU fallback:</p><pre>export PYTORCH_ENABLE_MPS_FALLBACK=1</pre><h3>🎧 4. Load and Run the Model</h3><p>Start the model using:</p><pre>python run_csm.py --opt-sub-quad-attention</pre><p>If run_csm.py is missing, you can load the model manually:</p><h3>🏆 5. Conclusion</h3><p>Congratulations! You have <strong>successfully set up CSM on an M1 MacBook</strong>. If you don’t need bitsandbytes, uninstall it. Use <strong>MPS</strong> for GPU acceleration and enable <strong>CPU fallback</strong> if necessary.</p><p>If you have any questions or run into issues, leave a comment or create an issue on the GitHub repository. 🚀</p><p><strong>Enjoy using CSM!</strong> 🎙️</p><p>Best regards,</p><p>Chris 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d64bbfdc47b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Voices Are Too Perfect — And That’s a Big Problem]]></title>
            <link>https://medium.com/@DevChris01/perfect-voices-but-no-soul-e3ff5b700b1c?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3ff5b700b1c</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Tue, 11 Mar 2025 07:10:47 GMT</pubDate>
            <atom:updated>2025-03-12T17:01:28.774Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI Voices Are Too Perfect — And That’s a Big Problem</h3><p><strong>Perfect voices, but no soul. AI voices are sounding more and more real — and that could become a problem. But there is a solution.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*E2gA-jhZNgODuE0L6K8KxQ.png" /><figcaption>Logo of Sesame AI</figcaption></figure><p>I confess: I too have spent countless hours with digital voice assistants in recent years. But regardless of whether it was Siri, Alexa or Google Assistant, they all had one thing in common: <strong>they didn’t sound real</strong>. Their answers were mechanical, their intonation bumpy, their emotions rehearsed. They were instantly recognisable as machines. But that is currently changing.</p><p>The new generation of AI voices, as developed by <a href="https://www.sesame.com/research/crossing_the_uncanny_valley_of_voice"><em>Sesame AI</em></a>, is different. It doesn’t just sound human — it feels human. The intonation, the pauses, the subtle nuances in expression: suddenly it seems like a real person is speaking at the other end. And this is where the problem begins…</p><p>We are experiencing the moment when machines cross the border into the Uncanny Valley of language. An AI voice that sounds almost, but not quite, human is irritating. But one that is perfect? It will deceive us. Anyone who can no longer distinguish a computer-generated voice from a real one will unconsciously behave as if they were talking to a real person. We will start to become attached — to a system that has no real emotion.</p><p>This is a success for the companies that develop these AI voices. For our brains, it is a challenge. After all, our social intelligence is designed to detect people, to feel empathy and to react to subtle signals in the voice. When AI mimics these signals perfectly, the boundaries become blurred. Is that a human speaking? Or a machine that has perfectly learnt to sound like a human?</p><p>Interestingly, OpenAI takes a different approach with its Voice Mode. Although the voice models are advanced, a conversation with it feels more like one-sided listening — as if you were talking to a YouTube video. Although the voice is fluid, it lacks real dynamism and spontaneity. This is where the difference becomes apparent: Sesame AI aims to perfect natural conversation, while other systems function more as advanced speech synthesis. You can test two Voices “Maya” and “Miles” on their website. Regardless, perhaps the combination of OpenAI’s Voice Mode and the <a href="https://medium.com/@DevChris01/google-titans-ai-transformer-explained-ec515c3ae8f0">Google Titans Transformer</a> would be a good solution. This would lead to more ‘surprises’ in the conversation and make the conversation more interactive and enjoyable.</p><p>👉 We have to ask ourselves: <em>Is this what we want?</em> Do we want a world in which machines comfort, advise or entertain us in a human voice — without really understanding what we are saying? If we are not careful, we will end up in a world full of voices that feel real but have no consciousness. A world in which we talk but actually only speak into the void.</p><p>💡 Therefore: Let’s look for real conversations! Let’s consciously deal with the limits of AI. It is tempting to be lulled by a perfect voice — but in the end, real communication is more valuable. Because only a human being can really understand what it means to be human.</p><p>Stay open eyed,</p><p>Chris 🚀</p><blockquote>Technical background information</blockquote><blockquote>Papers: <a href="https://arxiv.org/pdf/2402.01912">https://arxiv.org/pdf/2402.01912</a>, <a href="https://arxiv.org/pdf/2402.08093">https://arxiv.org/pdf/2402.08093</a></blockquote><blockquote>Github: <a href="https://github.com/SesameAILabs/csm">https://github.com/SesameAILabs/csm</a></blockquote><blockquote>Page: <a href="https://www.sesame.com/research/crossing_the_uncanny_valley_of_voice">https://www.sesame.com/research/crossing_the_uncanny_valley_of_voice</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3ff5b700b1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The secret against eternal boredom — hardly anyone knows it!]]></title>
            <link>https://medium.com/@DevChris01/endlessly-bored-an-essay-3baca041a2ae?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/3baca041a2ae</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[essay]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Sun, 09 Mar 2025 09:00:30 GMT</pubDate>
            <atom:updated>2025-03-12T17:00:53.327Z</atom:updated>
            <content:encoded><![CDATA[<h3>The secret against eternal boredom — hardly anyone knows it!</h3><p>Social networks lure us in with entertainment — and yet they only lead to boredom. But there is a way out…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*CFWaIxt9Lt6o1IV7.png" /><figcaption>Image credit: *1</figcaption></figure><h3>Do you still remember?</h3><p>Everything used to be more tangible somehow. Games had an end, books had a final page, films had credits, and when a music album had run its course, you had to consciously put it on again. There were these little moments of pause — a feeling of completion, perhaps even a little pride. You had completed something, experienced something. Today, however, entertainment seems endless. A never-ending stream of videos, posts and songs captivates us without ever giving us the feeling that we have really achieved anything. <strong>But what does that do to us?</strong></p><p>I confess: I also spent a lot of time playing computer games in the 1990s. But the games back then differed from today’s games in one important respect: they were over at some point. Anyone who had colonised space after five hours of <em>Civilization 2</em> was exhausted but happy. This doesn’t just apply to games. Books have a final page, films a final scene, music albums a final song. That makes them valuable. But for the first time in human history, we are now consuming media whose principle is never to end. But for the first time in human history, we are now consuming media whose principle is never to end.</p><p>In 2006, developer Aza Raskin came up with an ingenious idea: <em>‘Don’t force the user to ask for more content! Just give it to them!’</em> Thus, endless scrolling was invented, inspired by Google Maps, the only website at the time that had no end. Our media use was thus completely unbounded. There is no last song on Spotify, no last video on TikTok, no last post on Instagram. If you’re never finished, you keep going.</p><p>For the companies that make a lot of money from our attention, this is a good thing. For our brain, it’s a problem. Because it is set up to reward us for performance. But because we don’t get anywhere in our digital media world, there is no achievement we can be proud of. People used to display their CD or DVD collection in the living room, and a full bookshelf is still considered an intellectual achievement today. But nobody brags about having watched 500 Instagram videos. Nor do I know any 20-year-old who would be proud of having watched TikTok videos at a particularly early age. Because pride only comes from having achieved something. On the other hand, if you spend an hour scrolling through social media, at some point you ask yourself what the completely unrelated posts have achieved. Let me tell you: a life without self-efficacy. Instead of really achieving something, we remain in a strange state of limbo: <strong>full and hungry at the same time</strong>. Too bored to carry on, too curious to put the mobile phone aside.</p><p>💡👉 Therefore: look for things that can come to an end! It may be more tiring than scrolling through the next feed. But you will benefit in the long term: You will think in a more structured way, be more satisfied and look back with pleasure on what you have achieved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*OoIhLL-lhT1Q6hPe.gif" /><figcaption>Image credit: *2</figcaption></figure><p>Have a great day,</p><p>Chris 🚀</p><p><em>Image credits:</em></p><ul><li>1: <a href="https://medium.com/design-bootcamp/the-endless-odyssey-unraveling-infinite-scrolling-4a8543fe903e">https://medium.com/design-bootcamp/the-endless-odyssey-unraveling-infinite-scrolling-4a8543fe903e</a></li><li><a href="https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExM2FvMTEwcnB3dXlvMTJkc256YXNzdmJoNTd2YWY5ejU2aDdwbmo4NSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/nqebgv0FWfZHq/giphy.gif">2: https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExM2FvMTEwcnB3dXlvMTJkc256YXNzdmJoNTd2YWY5ejU2aDdwbmo4NSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/nqebgv0FWfZHq/giphy.gif</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3baca041a2ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Titans — AI Transformer explained]]></title>
            <link>https://medium.com/@DevChris01/google-titans-ai-transformer-explained-ec515c3ae8f0?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec515c3ae8f0</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[transformers]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Thu, 27 Feb 2025 19:03:05 GMT</pubDate>
            <atom:updated>2025-02-27T19:03:05.311Z</atom:updated>
            <content:encoded><![CDATA[<h3>Google Titans — AI Transformer explained</h3><p>In this blog post, I will show you a new transformer for AI, developed by Google. Link to the paper <a href="https://arxiv.org/pdf/2501.00663">https://arxiv.org/pdf/2501.00663</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cw76DXownArcvgZlM4rcsA.png" /><figcaption>Google Paper</figcaption></figure><h3>Introduction</h3><p>In 2017, Google published the groundbreaking paper titled “<a href="https://arxiv.org/abs/1706.03762">Attention is All You Need</a>“, which sparked the AI revolution we experience today. This paper introduced Transformers, which have become the backbone of most, if not all, top large language models (LLMs) out there today.</p><h3>Strength and cost of transformers</h3><p>The strength of Transformers is largely attributed to their use of attention. Given a sequence of tokens, Transformers process the entire sequence at once, capturing dependencies across the entire sequence using the attention mechanism to provide high-quality output. However, this powerful capability comes with a cost — a quadratic dependency on the input sequence length. This cost poses limitations on the ability of Transformers to scale up to longer sequences.</p><h3>Introducing Titans</h3><p>In this post, we dive into a new paper by Google Research titled “<a href="https://arxiv.org/abs/2501.00663">Titans: Learning to Memorize at Test Time</a>”, which introduces a new model architecture called Titans, showing promising results while mitigating the quadratic cost issue of Transformers. The Titan models are designed with inspiration from how memory works in the human brain. An interesting quote from the paper mentions that memory is a fundamental mental process and is an inseparable component of human learning. Without a properly functioning memory system, humans and animals would be restricted to basic reflexes and stereotyped behaviors.</p><h3>Deep Neural Long-Term Memory Module</h3><p>A key contribution of the Titans paper is the deep neural long-term memory module is. Let’s start by understanding what it is, and afterwards, we’ll understand how it is incorporated into the Titans models.</p><p>Unlike in recurrent neural networks, where the memory is encoded into a fixed vector, <strong>the neural long-term memory module is a model, a neural network with multiple layers, that encodes the abstraction of past history into its parameters</strong>. To train such a model, one idea is to train the model to memorize its training data. However, memorization is known to limit models’ generalization and may result in poor performance.</p><h3>Memorization Without Overfitting</h3><p>The researchers designed a fascinating approach to create a model capable of memorization, but without overfitting the model to the training data. This approach is inspired by an analogy from human memory. When we encounter an event that surprises us, we are more likely to remember that event. The learning process of the neural long-term memory module is designed to reflect that.</p><h3>Learning Process and Surprise Metric.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/0*1clECjgPKqOG_TV4.png" /></figure><p>We can learn about how the researchers modeled surprised using the above definition from the paper. Mt represents the neural long-term memory module at time t. It is updated using its parameters from the previous timestep, and a surprise element modeled as a gradient. If the gradient is large, the model is more surprised by the input, resulting in a more significant update to the model weights.</p><p>However, this definition is still not ideal, since the model may miss important information happening right after the surprising moment happened.</p><h3>Modeling Past Surprise.</h3><p>From a human perspective, a surprising event will not continue to surprise us through a long period of time, although it remains memorable. We usually adapt to the surprising event. Nevertheless, the event may have been surprising enough to get our attention through a long timeframe, leading to memorizing the entire timeframe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/0*Bt6UzWPUw_q1zcd0.png" /></figure><p>We can learn about the improved modeling from the above definitions from the paper that include modeling of past surprise. Now, we update the weights of the neural long-term memory using the state of the previous weights, and a surprise component, noted as St. The surprise component is now measured over time, and is composed of the previous surprise, with a decay factor and the same momentary surprise we already discussed in the previous section.</p><p>Another factor that is not modeled yet is forgetting.</p><h3>Forgetting Mechanism.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/0*2MpUuowNS1TWh4Pl.png" /></figure><p>When dealing with very large sequences, millions of tokens for example, it is crucial to manage which past information should be forgotten. We can see the final modeling in the above definitions from the paper. These definitions are identical to the ones in the previous section, except that we add an adaptive forgetting mechanism, noted with alpha and is also called a gating mechanism. This allows the memory to forget the information that is not needed anymore.</p><h3>The Loss Function.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/0*r1jCRJ8dkzQtCv5M.png" /></figure><p>The loss function is defined with the above equations. The loss aims to model associative memory, by storing the past data as pairs of keys and values, and teach the model to map between keys and values. Similarly to Transformers, linear layers project the input into keys and values. The loss then measures how well the memory module learns the associations between keys and values.</p><p>To clarify, the model does not process the entire sequence at once, but rather processes it gradually, accumulating memory information in its weights.</p><h3>Titans Architecture #1 — Memory as a Context (MAC)</h3><p>The paper suggests a few different architectures. The first is called Memory as a Context (MAC). We can learn about it using the following figure from the paper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1negtvQwA12JpUaX.png" /></figure><p>The model consists of 3 components: persistent memory, core, and contextual memory. Given a long input sequence, we chunk it into smaller sequences. The sequence shown at the Core component is actually a chunked sequence.</p><h3>Persistent Memory</h3><p>We first incorporate persistent memory by adding learnable data-independent weights to the beginning of the sequence. These are in practice learnable tokens that store global information which is not impacted by the input. The sequence is also passed via an attention block and adding the learnable tokens at the beginning of the sequence helps avoid attention drain, where due to bias, attention weights are highly active toward initial tokens.</p><h3>Contextual Memory</h3><p>Contextual memory consists of the deep neural long-term memory module, since it depends on the context. We retrieve memory tokens from the long-term memory using a forward pass of the neural long-term memory module, with the input chunked sequence as input. Since the neural memory keeps being updated even in test time, when we process a chunk of a long sequence, the neural memory is already updated with information from previous chunks of the same sequence. The retrieved memory tokens are added to the input sequence, after the persistent memory tokens.</p><h3>The Core Component</h3><p>The core component brings it all together, using an attention block that is fed with the extended sequence, that contains information from the persistent memory, the contextual memory and the input itself. This way the model can leverage multiple memory types. The output from the attention block is used to update the neural memory. The attention mechanism helps to determine for a given input, whether the long-term memory should be used or not. Additionally, attention helps the long-term memory to store only useful information from the current context. The final output is determined based on the attention block output and the output from the neural memory.</p><h3>Titans Architecture #2 — Memory as a Gate (MAG)</h3><p>The next Titan architecture version is called Memory as a Gate (MAG), and it also has a great illustration from the paper we can see below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T5Epb_SpPDkGfBZx.png" /></figure><p>In this version, we also have 3 branches that represent persistent memory, core, and contextual memory. A difference from the previous version, is that the sequence is not chunked. The input sequence here is the full input sequence. This is made possible by utilizing sliding window attention in the attention block. The persistent memory learnable weights are again added to the beginning of the sequence. But unlike before, the neural memory does not contribute data into the context for the attention block. Instead, the neural memory is updated from the input sequence and its output is combined with the core branch using a gating mechanism.</p><h3>Titans Architecture #3 — Memory as a Layer (MAL)</h3><p>The third variant of Titan architecture is called Memory as a Layer (MAL). We can learn about it using the following figure from the paper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vHshuaCVZN1hli_u.png" /></figure><p>Similarly to the previous version, the sequence is not chunked, and we use sliding window attention.</p><p>In this version, we use the neural memory as a model layer, where the input sequence, together with the learnable weights, first pass via the neural memory, and afterwards via the attention block.</p><p>This design allows stacking layers of multiple neural memory modules and attention blocks, similar to how Transformer layers are usually stacked. However, the sequential design limits the power of the model by the power of each of the layers.</p><h3>Titans Architecture #4 — LMM</h3><p>The last Titans variant is called LMM, which is identical to the previous version, but without an attention block, solely relying on the memory module.</p><h3>Results</h3><h3>Language Tasks Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zazGLcaC-oflND2L.png" /><figcaption>Comparison of Titans with baselines on language tasks</figcaption></figure><h3>Needle in a Haystack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*s6fcGcesdkL9lCx7.png" /><figcaption>Needle in a Haystack Comparison</figcaption></figure><h3>BABILong Benchmark</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XAshp7CjNeVXF_QL.png" /><figcaption>Comparison on the BABILong benchmark of Titans MAC with top models</figcaption></figure><blockquote>Credits:</blockquote><blockquote>Analyzing the paper: <a href="https://aipapersacademy.com/titans/">https://aipapersacademy.com/titans/</a></blockquote><blockquote>Paper itself: <a href="https://arxiv.org/pdf/2501.00663">https://arxiv.org/pdf/2501.00663</a></blockquote><p>Looking forward on the future of AI technologies,</p><p>Chris 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec515c3ae8f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CRC — Cyclic Redundancy Check]]></title>
            <link>https://medium.com/@DevChris01/crc-cyclic-redundancy-check-d6435d3b2694?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6435d3b2694</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[introduction]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Mon, 17 Feb 2025 18:39:24 GMT</pubDate>
            <atom:updated>2025-02-17T18:39:24.981Z</atom:updated>
            <content:encoded><![CDATA[<h3>CRC — Cyclic Redundancy Check</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Woq7HnqKQQ5cTgD-9ZLZ2A.png" /></figure><blockquote>“A technique, that ensures your data is always complete and accurate”</blockquote><h3>What is the Cyclic Redundancy Check (CRC)?</h3><p>CRC is a <strong>mathematical error-detection method</strong> that ensures data remains unchanged during transmission or storage. It calculates a checksum (CRC value) that is transmitted along with the data and verified by the receiver.</p><h3>Why is CRC important?</h3><ul><li>Prevents <strong>corrupt data transmissions</strong> in networks.</li><li>Used in <strong>storage devices</strong> (hard drives, SSDs) for integrity checks.</li><li>Plays a key role in <strong>communication protocols</strong> like <strong>Ethernet, USB, and Bluetooth</strong>.</li></ul><h3>How Does CRC Work? — From A Mathematical Perspective</h3><p>I will show you the mathematic part based on an example</p><p>Legend:</p><p>M: Message (binary), GP: Generator Polynomial, XOR: XOR-Operation, CS: Checksum</p><p>GP — Function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*7cc9lafLRMx-qrZLsAPtfw.png" /></figure><p>Message = 10101100</p><p>So now, you does this exactly work?</p><h4><strong>Step 1: L</strong>ength of Checksum</h4><p>In GP — Function, its says x³, which means the length is simply <strong>3.</strong></p><h4>Step 2: Calculate Checksum</h4><p>Now, we simply fill up the M with three “zeros” and make a <strong>XOR division</strong></p><ul><li>&gt; 10101100 <strong>000</strong></li><li>To get the divisor, simply calculate 1*x³+ 0*x² + 0*x¹ + 1 = <strong><em>1001</em></strong></li></ul><p><em>XOR-Division:</em></p><pre>10101100 000 / 1001 = <br>1001<br>----<br>001111<br>  1001<br>  ----<br>    ....</pre><p>The rest of the division is the checksum. In our case, it would be “0101”.</p><h4>Step 3: Add Checksum to Message</h4><p>Now, we add the calculated checksum on the right side of the message</p><p>=&gt; 10101100 <strong>0101</strong></p><h3>But how can we now detect corrupt messages?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*SeocbQbM8d5mxxg0-8JtgA.png" /></figure><p>Well, if we take the received message (in our case “10101100 <strong>0101”) </strong>and make that CRC again, but this time, the rest of the XOR-Division goes against <strong>0. </strong>Now, we know that the message is <strong>complete and accurate.</strong></p><p>If not, we can correct that corrupt data with another mathematic technique, which I will show you on a other blog post. 😉</p><p>I hope, it helps you to understand, what smart technique is being used to ensure data integrity on IT-Systems. 😎🙌</p><p>Best regards,</p><p>Chris 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6435d3b2694" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3D-Embedding visualization with Python and ChromaDB]]></title>
            <link>https://medium.com/@DevChris01/3d-embedding-visualization-with-python-and-chromadb-8189f696c8a8?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8189f696c8a8</guid>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[embedding]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Sun, 22 Sep 2024 18:01:41 GMT</pubDate>
            <atom:updated>2024-09-22T18:01:41.271Z</atom:updated>
            <content:encoded><![CDATA[<p>In this Blog Post, I’m gonna show you how you can visualize your RAG — Data 💅</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*llT-NLXnwvQ11TfYaMpl_w.png" /><figcaption>Scatterplot by <a href="https://github.com/mtybadger/chromaviz">mtybadger/chromaviz: A package for visualising Chroma vector collections in 3D (github.com)</a></figcaption></figure><p>There are many ways to visualize your data. In the following, I will show you an easy way to get an interactive overview of your embeddings.</p><h3>1. Setup</h3><ul><li><a href="https://ollama.com/">Ollama</a> (used Embedding model: “nomic-embed-text”)</li><li>Python 3.x</li><li>Docker</li><li>ChromaDB</li><li>Data you wanna store in ChromaDB</li></ul><p>Start <strong>ChromaDB</strong> in docker with the following command:</p><pre>docker run -d -p 8000:8000 -v chroma-data:/chromadb/data chromadb/chroma</pre><p>Start the <strong>ollama</strong> service and pull the <strong>nomic-embed-text</strong> Model if you haven’t already</p><pre>ollama pull nomic-embed-text</pre><h3>2. Storing Embeddings into ChromaDB</h3><p>I created a folder named “scripts” in my python project where I have some .txt files in it. (Here are some examples: <a href="https://github.com/technovangelist/videoprojects/tree/main/scripts">GitHub</a>). Later on, I created two python files….</p><p><em>functions.py</em></p><pre>import os<br>import re<br>import ollama<br><br>def readtextfiles(path):<br>  text_contents = {}<br>  directory = os.path.join(path)<br><br>  for filename in os.listdir(directory):<br>    if filename.endswith(&quot;.txt&quot;):<br>      file_path = os.path.join(directory, filename)<br><br>      with open(file_path, &quot;r&quot;, encoding=&quot;utf-8&quot;) as file:<br>        content = file.read()<br><br>      text_contents[filename] = content<br><br>  return text_contents<br><br>def chunksplitter(text, chunk_size=100):<br>  words = re.findall(r&#39;\S+&#39;, text)<br><br>  chunks = []<br>  current_chunk = []<br>  word_count = 0<br><br>  for word in words:<br>    current_chunk.append(word)<br>    word_count += 1<br><br>    if word_count &gt;= chunk_size:<br>      chunks.append(&#39; &#39;.join(current_chunk))<br>      current_chunk = []<br>      word_count = 0<br><br>  if current_chunk:<br>    chunks.append(&#39; &#39;.join(current_chunk))<br><br>  return chunks<br><br>def getembedding(chunks):<br>  embeds = ollama.embed(model=&quot;nomic-embed-text&quot;, input=chunks)<br>  return embeds.get(&#39;embeddings&#39;, [])</pre><p><em>importdocs.py</em></p><pre>import chromadb<br>from functions import readtextfiles, chunksplitter, getembedding<br><br><br>chromaclient = chromadb.HttpClient(host=&quot;localhost&quot;, port=8000)<br># Make sure this path is correct<br>textdocspath = &quot;./scripts&quot;<br>text_data = readtextfiles(textdocspath)<br><br>collection = chromaclient.get_or_create_collection(name=&quot;my_collection&quot;, metadata={&quot;hnsw:space&quot;: &quot;cosine&quot;}  )<br><br>for filename, text in text_data.items():<br>  chunks = chunksplitter(text)<br>  embeds = getembedding(chunks)<br>  chunknumber = list(range(len(chunks)))<br>  ids = [filename + str(index) for index in chunknumber]<br>  metadatas = [{&quot;source&quot;: filename} for index in chunknumber]<br>  collection.add(ids=ids, documents=chunks, embeddings=embeds, metadatas=metadatas)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*k7H2rvExpZrNLwTChKvOPg.gif" /><figcaption>Importing data in your ChromaDB collection is now done</figcaption></figure><h3>3. Visualize the Embeddings</h3><p>To finally visualize the data, I created a third python file and named it “visualize.py”</p><p>Here the code:</p><pre><br>import chromadb<br>from sklearn.decomposition import PCA<br>import plotly.express as px<br><br># Get embeddings<br>chroma = chromadb.HttpClient(host=&quot;localhost&quot;, port=8000)<br>collection = chroma.get_collection(&quot;my_collection&quot;)<br>embeddings = collection.get(include=[&#39;embeddings&#39;])[&#39;embeddings&#39;]<br>docs = collection.get(include=[&#39;embeddings&#39;])[&#39;ids&#39;]<br><br><br># Reduce the embedding dimensionality<br>pca = PCA(n_components=3)<br>vis_dims = pca.fit_transform(embeddings)# Create an interactive 3D plot<br>fig = px.scatter_3d(<br>    x=vis_dims[:, 0],<br>    y=vis_dims[:, 1],<br>    z=vis_dims[:, 2],<br>    text=docs,<br>    labels={&#39;x&#39;: &#39;PCA Component 1&#39;, &#39;y&#39;: &#39;PCA Component 2&#39;, &#39;z&#39;: &#39;PCA Component 3&#39;}, # Name it like you want<br>    title=&#39;3D PCA of Embeddings&#39; # Name it like you want<br>)<br><br>fig.show()</pre><p>And here is the end result after executing the last file…🚀🙌</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ek6NwOSNtiktlJu2QCln0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-rF4cRgW9o4igj5gFfv7g.png" /></figure><p>I hope it helps to impress the others in the next team meeting 😎🤝.</p><p>(As always, feel free to like or ask any question in the comment section)</p><p>Wish you the best,</p><p>Chris</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8189f696c8a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SpringBoot — Ollama — Fast&Easy]]></title>
            <link>https://medium.com/@DevChris01/springboot-ollama-fast-easy-08468909f633?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/08468909f633</guid>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[ollama]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Wed, 04 Sep 2024 13:01:37 GMT</pubDate>
            <atom:updated>2025-02-24T15:54:42.940Z</atom:updated>
            <content:encoded><![CDATA[<h3>SpringBoot — Ollama — Fast&amp;Easy</h3><p>👨‍🏫 In this short blog post, I will show you based an small example on how you can use Ollama with SpringBoot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C62rPRWuohpBOLL-A_DaAg.png" /></figure><h3>Introduction</h3><p>In this blog post, I will show you a way on how you can implement und use <a href="https://ollama.com/">Ollama</a> with SpringBoot. The project will be a small microservice, that you can <strong>copy &amp; paste</strong> from this post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*tpRuqZ5grrWb7-LJGaajKw.jpeg" /></figure><ol><li><strong>Setup</strong></li></ol><p>Either you have an existing project, then you can go ahead with this or generate a new one from scratch with the <a href="https://start.spring.io/">Spring Initializr</a>.</p><p><strong>2. Dependencies</strong></p><p>I will use the following dependencies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzNJ8xXowIYlrHjqEZOZlQ.png" /></figure><p><strong>3.1 Setup: application.properties</strong></p><p>I will use the<em> llama3.1</em> model, but feel free to use what you want😉</p><pre>spring.application.name=ollamaservice<br>ollama.host=http://localhost:11434<br>ollama.model=llama3.1</pre><p><strong>3.2 Setup: Project Structure</strong></p><pre>--📁config (optional)<br>  -CustomInterceptor (class)<br>  -InterceptorAppConfig (class)<br>--📁controller<br>  -OllamaController (class)<br>--📁rto<br>  -OllamaRequestRto (class)<br>  -OllamaResponseRto (class)<br>--📁services<br>  -OllamaServices (class)<br>--📁utils<br>  -GlobalOptions (class)</pre><p><strong>4.1 Config: CustomInterceptor.java</strong></p><pre>@Component<br>@Slf4j<br>@RequiredArgsConstructor<br>public class CustomInterceptor implements HandlerInterceptor {<br><br>    private Date startTime;<br><br>    @Override<br>    public boolean preHandle(final HttpServletRequest request, final HttpServletResponse response, final Object handler) throws Exception {<br>        return true;<br>    }<br><br>    @Override<br>    public void postHandle(final HttpServletRequest request, final HttpServletResponse response, final Object handler, final ModelAndView modelAndView) throws Exception {<br>    }<br><br>    @Override<br>    public void afterCompletion(final HttpServletRequest request, final HttpServletResponse response, final Object handler, final Exception ex) throws Exception {<br>    }<br>}</pre><p><strong>4.2 Config: InterceptorAppConfig.java</strong></p><pre>@Component<br>@RequiredArgsConstructor<br>public class InterceptorAppConfig implements WebMvcConfigurer {<br><br>    private final CustomInterceptor customInterceptor;<br><br>    @Override<br>    public void addInterceptors(InterceptorRegistry registry) {<br>        registry.addInterceptor(customInterceptor);<br>    }<br>}</pre><p><strong>4.3 Controller: OllamaController.java</strong></p><pre>@RestController<br>@RequestMapping(value = &quot;/api/v1/ollama&quot;)<br>public class OllamaController {<br><br>    @Autowired<br>    private OllamaService ollamaService;<br><br>    @GetMapping(value = &quot;/generate&quot;, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)<br>    public @ResponseBody OllamaResponseRto generate(@RequestBody @Valid OllamaRequestRto requestRto) {<br>        return ollamaService.generateLlmResponse(requestRto);<br>    }<br>}</pre><p><strong>4.4 Rto: OllamaRequestRto.java</strong></p><pre>@Data<br>@Validated<br>public class OllamaRequestRto {<br><br>    @NotBlank(message = &quot;Model is required&quot;)<br>    private String model = &quot;llama3.1:8b&quot;;<br><br>    private String prompt;<br>    private List&lt;Message&gt; messages;<br><br>    @AssertTrue(message = &quot;&#39;prompt&#39; oder &#39;messages&#39; are required&quot;)<br>    private boolean isPromptOrMessages() {<br>        return prompt != null || messages != null;<br>    }<br><br>    private float temperature = 0.7f;<br><br>    private boolean stream = false;<br><br>}</pre><p><strong>4.5 Rto: OllamaResponseRto.java</strong></p><pre>@Data<br>public class OllamaResponseRto {<br><br>    private String message;<br> }</pre><p><strong>4.6 services: OllamaService</strong></p><pre>@Service<br>@RequiredArgsConstructor( onConstructor = @__(@Autowired))<br>@Slf4j<br>public class OllamaService {<br><br>    private OllamaApi ollamaApi;<br><br>    @Autowired<br>    private final OllamaChatModel chatModel;<br><br>    @Autowired<br>    private GlobalOptions globalOptions;<br><br>    @EventListener(ApplicationReadyEvent.class)<br>    public void init() {<br>        this.ollamaApi = new OllamaApi(globalOptions.getOllamaHost());<br>    }<br><br>    public OllamaResponseRto generateLlmResponse(@Valid OllamaRequestRto requestRto) {<br>        log.info(&quot;Request: {}&quot;, requestRto);<br>        if(requestRto.getPrompt() != null) {<br>            return generateBasedOnPrompt(requestRto);<br>        } else if(requestRto.getMessages() != null) {<br>            return generateBasedOnMessages(requestRto);<br>        }<br>        return null;<br>    }<br><br>    private OllamaResponseRto generateBasedOnPrompt(OllamaRequestRto requestRto) {<br>        //Following two lines are now updated<br>        OllamaOptions ollamaOptions = OllamaOptions.builder().model(requestRto.getModel()).temperature(requestRto.getTemperature()).build();<br>        ChatModel chatModel = OllamaChatModel.builder().ollamaApi(ollamaApi).defaultOptions(ollamaOptions).build();<br><br>        OllamaResponseRto ollamaResponseRto = new OllamaResponseRto();<br>        ollamaResponseRto.setMessage(chatModel.call(requestRto.getPrompt()));<br>        return ollamaResponseRto;<br>    }<br><br>    private OllamaResponseRto generateBasedOnMessages(OllamaRequestRto requestRto) {<br>        //Following two lines are now updated<br>        OllamaOptions ollamaOptions = OllamaOptions.builder().model(requestRto.getModel()).temperature(requestRto.getTemperature()).build();<br>        ChatModel chatModel = OllamaChatModel.builder().ollamaApi(ollamaApi).defaultOptions(ollamaOptions).build();<br><br>        OllamaResponseRto ollamaResponseRto = new OllamaResponseRto();<br><br>        //Following two lines are now updated<br>        Message[] messageArray = requestRto.getMessages().toArray(new Message[0]);<br>        ollamaResponseRto.setMessage(chatModel.call(messageArray));        <br>        <br>          return ollamaResponseRto;<br>    }<br>}</pre><blockquote><strong>EDIT from 24.02.2025:</strong></blockquote><blockquote>I updated the <strong>OllamaService.class.</strong> Look at the added comments.</blockquote><blockquote>I also updated the <strong>springAiVersion</strong> and <strong>springboot-Version</strong> in build.gradle File:</blockquote><pre>plugins {<br> id &#39;java&#39;<br> id &#39;org.springframework.boot&#39; version &#39;3.4.3&#39;<br> id &#39;io.spring.dependency-management&#39; version &#39;1.1.7&#39;<br>}<br><br>...<br><br>ext {<br> set(&#39;springAiVersion&#39;, &quot;1.0.0-M6&quot;)<br>}<br><br>...</pre><p><strong>4.7 utils: GlobalOptions.java</strong></p><pre>@Component<br>@Data<br>public class GlobalOptions {<br><br>    @Value(&quot;${ollama.host}&quot;)<br>    private String ollamaHost;<br><br>    @Value(&quot;${ollama.model}&quot;)<br>    private String ollamaModel;<br>}</pre><h3>API Call:</h3><p>You can call the API like this in Postman. All acceptable params are define in the <strong>OllamaRequestRto</strong> File by myself:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dm6owq5lcLESak9spOSrQw.png" /></figure><h3>And that’s it already! 🚀</h3><p>You can now use AI. Have fun with it! If you have any questions, feel free to contact me.</p><p>Best regards,</p><p>Chris</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08468909f633" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Proxmox: Host your own Minecraft Server]]></title>
            <link>https://medium.com/@DevChris01/proxmox-host-your-minecraft-server-8fc3c11df07c?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fc3c11df07c</guid>
            <category><![CDATA[proxmox]]></category>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[minecraft]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Sat, 08 Jun 2024 21:06:03 GMT</pubDate>
            <atom:updated>2024-06-08T21:06:43.461Z</atom:updated>
            <content:encoded><![CDATA[<p>A short Step-by-Step Tutorial, on how you can host a minecraft server on a lowlevel proxmox homelab server machine 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kMWZeBP_fAstAe3oeBuCUQ.png" /></figure><h3>Steps:</h3><ol><li>Create a new LXC Container in your Proxmox Environment:</li><li>I gave that (Ubuntu-24.x.x-) container about <strong>4GB</strong> of <strong>RAM</strong>, <strong>4 CPU Cores</strong> and <strong>8 GB</strong> of <strong>disk space</strong>. See more about System Requirements here: <a href="https://minecraft.wiki/w/Server/Requirements">Server/Requirements — Minecraft Wiki</a></li><li>Updating the OS with: <strong><em>apt update &amp;&amp; apt upgrade -y &amp;&amp; apt autoremove -y</em></strong></li><li>Installing Java with: <strong><em>sudo apt install openjdk-21-jdk</em></strong><em> </em>(check your version with<em> </em><strong><em>java -version</em></strong>)</li><li>Enable the default port of the Minecraft Server on your Container with the following command: <strong><em>sudo ufw allow 25565</em></strong></li><li>Download the Minecraft Server file with: <strong><em>wget </em></strong><a href="https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar"><strong><em>https://piston-data.mojang.com/v1/objects/145ff0858209bcfc164859ba735d4199aafa1eea/server.jar</em></strong></a> (see here for more: <a href="https://www.minecraft.net/de-de/download/server">Download server for Minecraft | Minecraft</a>)</li><li>Now run: <strong><em>sudo java -Xms1G -Xmx2G -jar server.jar nogui</em></strong></li><li><strong>It will fail 🚧❌</strong></li><li>Run: <strong><em>nano eula.txt</em></strong> and set value <strong><em>eula=true</em></strong></li><li>Now run Step 7. -&gt; It will now work</li><li>Start Minecraft and connect to your server with the IP Adress of it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dyu71rHIRqOrw7cLEb-bSw.png" /></figure><p>Finish 💅🙌🚀</p><p>Hope it helps you,</p><p>Chris</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fc3c11df07c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ollama — Self hosted — Fast&Easy]]></title>
            <link>https://medium.com/@DevChris01/ollama-self-hosted-fast-easy-60b6d00b321a?source=rss-61f0842c52b3------2</link>
            <guid isPermaLink="false">https://medium.com/p/60b6d00b321a</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[self-hosted]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[DevChris]]></dc:creator>
            <pubDate>Sat, 13 Apr 2024 18:17:07 GMT</pubDate>
            <atom:updated>2024-04-13T18:17:07.813Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI — Self hosted — Fast&amp;Easy</h3><p>I’m gonna show you, how to host your own model on your server 🏢</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwTkASZuH-wIX--0bsbIAw.jpeg" /></figure><h3>Introduction</h3><p>In this blog post, I would like to show you how you can use AI in your <strong>company</strong> or <strong>privately</strong> without having to rely on third-party services. To do this, I will use an example project to show you what a deployment could look like. The tool we use for this is called <a href="https://ollama.com/">Ollama</a>.</p><p>To begin with, however, we should first clarify what an AI actually consists of. An AI consists of two parts: the model and the data. The model (also known as LLM) is a mathematical function that has learnt from the data. The model can then be applied to new data.</p><h3>Ollama — What is it?</h3><p>We use the open source tool <a href="https://ollama.com/">Ollama</a> to host our AI. Ollama is a tool that allows us to host our AI on our own server, but also locally on our own PC. This includes that no data is passed on to third parties. The tool currently works on Linux, MacOS and Windows.</p><h3>Ollama — Installation</h3><p>Installing the tool is very easy. For MacOS: -&gt; Simply download the .zip file and install the file it contains.</p><p>For Linux: -&gt; Execute the following command</p><pre>curl https://ollama.ai/install.sh | sh</pre><h3>Ollama — First steps</h3><p>Once we have installed the tool, we can start it. All we have to do is execute the command “ollama run [modelname]” in the console. You can find a list of all available models <a href="https://ollama.com/library">here</a>.</p><p>In our example, we will use the “llama2” model developed by Meta (formerly Facebook).</p><blockquote><strong><em>ATTENTION: </em></strong><em>The model does not have an Apache 2.0 licence and may therefore not be used commercially. Therefore, always check the licence of the model.</em></blockquote><pre>ollama run llama2</pre><h3>Using AI successfully</h3><p>Once we have started the model, we can already use it. All we have to do is find out the IP address of the server.</p><p>Here is an example of how you can use your AI</p><pre>curl http://localhost:11434/api/generate -d &#39;{<br>  &quot;model&quot;: &quot;llama2&quot;,<br>  &quot;prompt&quot;:&quot;What is a strawberry?&quot;<br>}&#39;</pre><h3>And that’s it already! 🚀</h3><p>You can now use your AI. Have fun with it! If you have any questions, feel free to contact me. I will publish a tutorial in the near future on how you can use your own AI in combination with your business data.</p><p>Best regards,</p><p>Chris</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60b6d00b321a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>