<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machine Learning on [ MECANIK DEV ]</title><link>https://mecanik.dev/en/tags/machine-learning/</link><description>Recent content in Machine Learning on [ MECANIK DEV ]</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2020-{year} by [ MECANIK DEV ]. All Rights Reserved.</copyright><lastBuildDate>Sun, 09 Aug 2026 19:00:00 +0100</lastBuildDate><atom:link href="https://mecanik.dev/en/tags/machine-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>Fine-Tuning vs RAG vs Prompting: What Each Costs</title><link>https://mecanik.dev/en/posts/fine-tuning-vs-rag-vs-prompting-cost/</link><pubDate>Sun, 09 Aug 2026 19:00:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/fine-tuning-vs-rag-vs-prompting-cost/</guid><description>&lt;p>The fine-tuning vs RAG question usually arrives as a statement: &amp;ldquo;we need to fine-tune a model on our data.&amp;rdquo; It is one of the most expensive sentences in enterprise AI, and it is usually wrong. Not always, but usually. The request nearly always means one of two things: the model does not know about our business, or the model does not answer the way we want. Fine-tuning is a poor solution to the first and an expensive solution to the second.&lt;/p></description></item><item><title>Self-Hosting Kimi K3: Hardware, Cost and Sovereignty</title><link>https://mecanik.dev/en/posts/self-hosting-kimi-k3-hardware-cost/</link><pubDate>Wed, 05 Aug 2026 19:00:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/self-hosting-kimi-k3-hardware-cost/</guid><description>&lt;p>Self-hosting Kimi K3 became technically possible on 27 July 2026, when Moonshot AI published the weights for a 2.8-trillion-parameter model alongside production inference support. A great many organisations read that news and concluded they could now run frontier-class reasoning on their own hardware and stop paying per token.&lt;/p>
&lt;p>That conclusion is usually wrong, but not for the reason people expect. The engineering is achievable. The arithmetic is what defeats most projects, and it defeats them quietly, several months after the budget was approved.&lt;/p></description></item><item><title>Retrieval-Augmented Generation (RAG) Explained 2026</title><link>https://mecanik.dev/en/posts/retrieval-augmented-generation-rag-explained/</link><pubDate>Sat, 11 Jul 2026 19:00:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/retrieval-augmented-generation-rag-explained/</guid><description>&lt;p>A general-purpose AI model knows a lot about the world and nothing about your business. It has never seen your product manuals, your internal policies, or last quarter&amp;rsquo;s reports. Retrieval-augmented generation (RAG) is the technique that closes that gap: it lets a model answer questions using &lt;em>your&lt;/em> documents, accurately and with sources, without retraining the model. This guide explains what RAG is, how it works, and when to use it.&lt;/p></description></item><item><title>AI Software Development - A UK Business Guide for 2026</title><link>https://mecanik.dev/en/posts/ai-software-development-a-uk-business-guide-for-2026/</link><pubDate>Thu, 18 Jun 2026 07:00:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/ai-software-development-a-uk-business-guide-for-2026/</guid><description>&lt;p>AI software development is not a future trend for UK businesses; it is already the baseline. Search interest in the term has grown 30% in the past three months, and interest in &amp;ldquo;AI software development company&amp;rdquo; is up 60%. The businesses that understand this shift now will have a significant head start over those still deciding whether to engage.&lt;/p>
&lt;p>This guide explains what AI software development actually means in practice, what it changes about how software gets built, and what UK businesses should look for when choosing a partner to help them do it.&lt;/p></description></item><item><title>OpenAI ChatGPT 5 vs Grok 4 - Which one creates better Python code?</title><link>https://mecanik.dev/en/posts/openai-chatgpt-5-vs-grok-4-which-one-creates-better-python-code/</link><pubDate>Tue, 12 Aug 2025 18:10:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/openai-chatgpt-5-vs-grok-4-which-one-creates-better-python-code/</guid><description>&lt;p>When it comes to AI-assisted coding, &lt;strong>OpenAI ChatGPT 5&lt;/strong> and &lt;strong>Grok 4&lt;/strong> are two of the hottest tools of 2025. Both claim to write Python code with high accuracy and efficiency, but which one actually delivers cleaner, more maintainable scripts in real-world scenarios?&lt;/p>
&lt;p>In this article, we&amp;rsquo;ll pit &lt;strong>ChatGPT 5&lt;/strong> and &lt;strong>Grok 4&lt;/strong> against each other in multiple Python challenges. We will review &lt;strong>code correctness&lt;/strong>, &lt;strong>readability&lt;/strong>, &lt;strong>execution speed&lt;/strong>, and &lt;strong>adaptability&lt;/strong> when given tricky prompts.&lt;/p></description></item><item><title>ChatGPT 5 Review - Features, Improvements &amp; Real-World Performance</title><link>https://mecanik.dev/en/posts/chatgpt-5-review-features-improvements-real-world-performance/</link><pubDate>Fri, 08 Aug 2025 18:50:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/chatgpt-5-review-features-improvements-real-world-performance/</guid><description>&lt;p>ChatGPT 5 has officially arrived, and it&amp;rsquo;s already making waves in the AI world. Building on the success of GPT-4, OpenAI&amp;rsquo;s latest release isn&amp;rsquo;t just about raw intelligence, it&amp;rsquo;s about speed, accuracy, and adaptability.&lt;/p>
&lt;p>In this hands-on &lt;strong>ChatGPT 5 review&lt;/strong>, I&amp;rsquo;ll walk you through my hands-on experience with ChatGPT 5, highlight the standout features, and help you decide whether it&amp;rsquo;s worth your time if you&amp;rsquo;re already using GPT-4.&lt;/p>
&lt;h2 id="whats-new-in-chatgpt-5">What’s New in ChatGPT 5&lt;/h2>
&lt;p>OpenAI has tightened up the architecture, refined training methods, and added more safety guardrails - but here are the changes you&amp;rsquo;ll actually feel when you use it:&lt;/p></description></item><item><title>Tiny BPE Trainer – A Fast and Lightweight BPE Trainer in C++</title><link>https://mecanik.dev/en/posts/tiny-bpe-trainer-a-fast-and-lightweight-bpe-trainer-in-c++/</link><pubDate>Thu, 07 Aug 2025 20:00:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/tiny-bpe-trainer-a-fast-and-lightweight-bpe-trainer-in-c++/</guid><description>&lt;h2 id="introducing-tiny-bpe-trainer">Introducing Tiny BPE Trainer&lt;/h2>
&lt;p>Most modern NLP models today from GPT to RoBERTa, rely on subword tokenization using &lt;strong>Byte Pair Encoding (BPE)&lt;/strong>. But what if you want to train your own vocabulary in pure C++?&lt;/p>
&lt;p>Meet &lt;strong>Tiny BPE Trainer&lt;/strong> - a blazing-fast, header-only BPE trainer written in modern C++17/20, with &lt;strong>zero dependencies&lt;/strong>, full &lt;strong>UTF-8 support&lt;/strong>, and HuggingFace-compatible output (&lt;code>vocab.txt&lt;/code>, &lt;code>merges.txt&lt;/code>).&lt;/p>
&lt;h3 id="why-another-bpe-trainer">Why Another BPE Trainer?&lt;/h3>
&lt;p>Because existing options are often:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Python-only&lt;/strong>, with heavy runtime dependencies (Rust, Protobuf, etc.)&lt;/li>
&lt;li>Not easily embeddable in &lt;strong>C++ applications&lt;/strong>&lt;/li>
&lt;li>Not focused on &lt;strong>speed&lt;/strong>, &lt;strong>simplicity&lt;/strong>, or &lt;strong>cross-platform usage&lt;/strong>&lt;/li>
&lt;/ul>
&lt;p>Tiny BPE Trainer is:&lt;/p></description></item><item><title>A Fast, UTF-8 Aware C++ Tokenizer for NLP &amp; ML</title><link>https://mecanik.dev/en/posts/a-fast-utf-8-aware-c++-tokenizer-for-nlp-ml/</link><pubDate>Wed, 06 Aug 2025 06:00:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/a-fast-utf-8-aware-c++-tokenizer-for-nlp-ml/</guid><description>&lt;h2 id="introducing-modern-text-tokenizer">Introducing Modern Text Tokenizer&lt;/h2>
&lt;p>Modern natural language processing (NLP) models like BERT, DistilBERT, and other transformer-based architectures rely heavily on effective tokenization. But C++ developers often face limited options like bloated dependencies, poor Unicode support, or lack of compatibility with vocab-based encoders.&lt;/p>
&lt;p>That&amp;rsquo;s why I created &lt;strong>Modern Text Tokenizer&lt;/strong> - a blazing-fast, &lt;strong>header-only&lt;/strong> C++ tokenizer that&amp;rsquo;s &lt;strong>UTF-8 aware&lt;/strong>, &lt;strong>zero-dependency&lt;/strong>, and &lt;strong>ML-ready&lt;/strong> out of the box.&lt;/p>
&lt;h3 id="what-makes-it-unique">What Makes It Unique?&lt;/h3>
&lt;ul>
&lt;li>&lt;strong>Zero Dependencies&lt;/strong> – No Boost, no ICU, no external libs.&lt;/li>
&lt;li>&lt;strong>UTF-8 Safe&lt;/strong> – Correctly handles multilingual text, emojis, and multibyte characters.&lt;/li>
&lt;li>&lt;strong>Header-Only&lt;/strong> – Drop it into your project and go.&lt;/li>
&lt;li>&lt;strong>Vocabulary Encoding&lt;/strong> – Load &lt;code>vocab.txt&lt;/code> from HuggingFace and generate token IDs.&lt;/li>
&lt;li>&lt;strong>Transformer-Ready&lt;/strong> – Supports &lt;code>[CLS]&lt;/code>, &lt;code>[SEP]&lt;/code>, &lt;code>[PAD]&lt;/code>, and sequence formatting.&lt;/li>
&lt;/ul>
&lt;h3 id="key-features">Key Features&lt;/h3>
&lt;ul>
&lt;li>Fast ASCII vs Unicode branching using &lt;code>std::string_view&lt;/code>&lt;/li>
&lt;li>Fluent API for configuration:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-cpp" data-lang="cpp">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="n">TextTokenizer&lt;/span> &lt;span class="n">tokenizer&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl">&lt;span class="n">tokenizer&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl">&lt;span class="p">.&lt;/span>&lt;span class="n">set_lowercase&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nb">true&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl">&lt;span class="p">.&lt;/span>&lt;span class="n">set_split_on_punctuation&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nb">true&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl">&lt;span class="p">.&lt;/span>&lt;span class="n">set_keep_punctuation&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nb">true&lt;/span>&lt;span class="p">);&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>Load vocabularies:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-cpp" data-lang="cpp">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="n">tokenizer&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">load_vocab&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;vocab.txt&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>Encode / Decode:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-cpp" data-lang="cpp">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">&lt;span class="k">auto&lt;/span> &lt;span class="n">ids&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">tokenizer&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">encode&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Hello world!&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl">&lt;span class="n">std&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="n">string&lt;/span> &lt;span class="n">decoded&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">tokenizer&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">decode&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">ids&lt;/span>&lt;span class="p">);&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ul>
&lt;h3 id="performance">Performance&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">Performance &lt;span class="nb">test&lt;/span> with &lt;span class="m">174000&lt;/span> characters
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl">Results:
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl">Tokenization: &lt;span class="m">2159&lt;/span> μs &lt;span class="o">(&lt;/span>&lt;span class="m">22000&lt;/span> tokens&lt;span class="o">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl">Encoding: &lt;span class="m">1900&lt;/span> μs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">6&lt;/span>&lt;span class="cl">Decoding: &lt;span class="m">430&lt;/span> μs
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">7&lt;/span>&lt;span class="cl">Total time: 4.49 ms
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">8&lt;/span>&lt;span class="cl">Throughput: 36.97 MB/s&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;p>&lt;em>Benchmarked on Ryzen 9 5900X @ -O3 in release mode.&lt;/em>&lt;/p></description></item><item><title>Does True AI Exist? Unraveling the Myths and Reality</title><link>https://mecanik.dev/en/posts/does-true-ai-exist-unraveling-the-myths-and-reality/</link><pubDate>Sun, 27 Aug 2023 06:16:00 +0100</pubDate><guid>https://mecanik.dev/en/posts/does-true-ai-exist-unraveling-the-myths-and-reality/</guid><description>&lt;p>Artificial Intelligence (AI) has been an intriguing subject, often wrapped in an enigma, driven by speculation, and enhanced with Hollywood glitz.&lt;/p>
&lt;p>While movies paint a picture of AI as sentient entities, filled with emotions and consciousness, one must wonder if today&amp;rsquo;s AI mirrors such representation. It&amp;rsquo;s time to uncover the reality of AI in the contemporary era.&lt;/p>
&lt;h2 id="understanding-the-basics-of-ai">Understanding the Basics of AI&lt;/h2>
&lt;p>To decode AI, a foundational understanding is pivotal. Artificial Intelligence fundamentally revolves around creating computer systems capable of executing tasks that traditionally mandate human intelligence. From speech recognition to decision-making, these tasks have one essence - they perform rather than genuinely understand or feel.&lt;/p></description></item></channel></rss>