<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged local-ai</title>
<link>https://coderlegion.com/tag/local-ai</link>
<description>Powered by Question2Answer</description>
<item>
<title>What Is Context Size in Ollama? QWEN 3.8 Context Window Explained into Ollama</title>
<link>https://coderlegion.com/31590/what-is-context-size-in-ollama-qwen-3-8-context-window-explained-into-ollama</link>
<description>&lt;p&gt;Confused about context size in Ollama? Wondering what an AI context window is, why it matters, and how to configure it for Qwen 3.8 27B?&lt;/p&gt;
&lt;p&gt;In this beginner-friendly tutorial, you'll learn how context size works in local AI models, how to increase the context length in Ollama, and how to test different context sizes with real examples.&lt;/p&gt;
&lt;p&gt;I'll walk you through the basics of AI context windows, tokens, num_ctx, memory usage, and performance so you can run your local AI models more effectively.&lt;/p&gt;
&lt;p&gt;Whether you're just getting started with Ollama or experimenting with local LLMs, this video will help you understand context size and configure it with confidence.&lt;/p&gt;
&lt;p&gt;🚀 What You'll Learn&lt;/p&gt;
&lt;p&gt;✅ What is context size in Ollama?&lt;br&gt;
✅ AI context window explained in simple terms&lt;br&gt;
✅ Qwen 3.8 native context length vs. Ollama's configured context&lt;br&gt;
✅ How to increase context size using Ollama&lt;br&gt;
✅ How to test different context sizes with real examples&lt;br&gt;
✅ How context size affects RAM, VRAM, memory usage, and performance&lt;br&gt;
✅ How to check whether your configured context size is being used&lt;br&gt;
✅ Tips for choosing the right context size for local AI models&lt;/p&gt;
</description>
<category>Videos</category>
<guid isPermaLink="true">https://coderlegion.com/31590/what-is-context-size-in-ollama-qwen-3-8-context-window-explained-into-ollama</guid>
<pubDate>Sun, 18 Oct 2026 11:13:04 +0000</pubDate>
</item>
<item>
<title>Zaylo Local AI</title>
<link>https://coderlegion.com/30147/zaylo-local-ai</link>
<description>&lt;h2 id=&quot;zaylo-turn-your-existing-hardware-into-a-private-ai-server&quot;&gt;Zaylo: Turn Your Existing Hardware Into a Private AI Server&lt;/h2&gt;
&lt;p&gt;Running AI locally usually means dealing with model compatibility, hardware limitations, inference runtimes, and configuration.&lt;/p&gt;
&lt;p&gt;Zaylo is built to simplify that process.&lt;/p&gt;
&lt;p&gt;Zaylo turns an existing computer into a private AI server by detecting the available hardware, helping select suitable models, managing local inference, and exposing an OpenAI-compatible API that applications can use.&lt;/p&gt;
&lt;h3 id=&quot;why-zaylo-&quot;&gt;Why Zaylo?&lt;/h3&gt;
&lt;p&gt;AI infrastructure doesn't always need to live in the cloud.&lt;/p&gt;
&lt;p&gt;Many developers already have capable CPUs, GPUs, RAM, and storage sitting on their desks. Zaylo is designed to make that hardware usable as local AI infrastructure without requiring a complicated setup.&lt;/p&gt;
&lt;p&gt;The goal is simple:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Your hardware → Zaylo → Local AI infrastructure&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-zaylo-does&quot;&gt;What Zaylo Does&lt;/h3&gt;
&lt;p&gt;Zaylo handles several parts of the local AI workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hardware detection and capability analysis&lt;/li&gt;
&lt;li&gt;Model compatibility and recommendation&lt;/li&gt;
&lt;li&gt;Local model management&lt;/li&gt;
&lt;li&gt;AI inference through local runtimes&lt;/li&gt;
&lt;li&gt;OpenAI-compatible API access&lt;/li&gt;
&lt;li&gt;RAG workflows&lt;/li&gt;
&lt;li&gt;Vision model support&lt;/li&gt;
&lt;li&gt;Automatic process recovery&lt;/li&gt;
&lt;li&gt;Local and private AI execution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This allows developers to connect their own applications to locally running models instead of sending every request to a cloud AI provider.&lt;/p&gt;
&lt;h3 id=&quot;zaylo-v2&quot;&gt;Zaylo V2&lt;/h3&gt;
&lt;p&gt;Zaylo V2 expands the platform beyond basic local model serving.&lt;/p&gt;
&lt;h4 id=&quot;rag-support&quot;&gt;RAG Support&lt;/h4&gt;
&lt;p&gt;Applications can use locally running models with retrieval-augmented generation workflows, making it possible to build knowledge-based AI systems while keeping the underlying data local.&lt;/p&gt;
&lt;h4 id=&quot;vision-models&quot;&gt;Vision Models&lt;/h4&gt;
&lt;p&gt;Zaylo V2 adds support for vision-capable models, allowing applications to work with images alongside traditional text-based AI workloads.&lt;/p&gt;
&lt;h4 id=&quot;automatic-process-recovery&quot;&gt;Automatic Process Recovery&lt;/h4&gt;
&lt;p&gt;Local AI processes can fail for many reasons, especially when hardware resources are limited.&lt;/p&gt;
&lt;p&gt;Zaylo includes automatic process recovery to make local inference more reliable instead of requiring users to manually restart the service.&lt;/p&gt;
&lt;h3 id=&quot;built-for-developers&quot;&gt;Built for Developers&lt;/h3&gt;
&lt;p&gt;Zaylo exposes an OpenAI-compatible API, making it easier to integrate local models into existing applications.&lt;/p&gt;
&lt;p&gt;Developers can build:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AI assistants&lt;/li&gt;
&lt;li&gt;RAG applications&lt;/li&gt;
&lt;li&gt;Private document processing systems&lt;/li&gt;
&lt;li&gt;Vision applications&lt;/li&gt;
&lt;li&gt;Local development environments&lt;/li&gt;
&lt;li&gt;Internal AI tools&lt;/li&gt;
&lt;li&gt;AI-powered developer tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;without having to redesign their applications around a completely different API.&lt;/p&gt;
&lt;h3 id=&quot;the-bigger-idea&quot;&gt;The Bigger Idea&lt;/h3&gt;
&lt;p&gt;Cloud AI is convenient, but local AI provides something different: control.&lt;/p&gt;
&lt;p&gt;With Zaylo, the objective is to make existing hardware a practical part of the AI infrastructure stack.&lt;/p&gt;
&lt;p&gt;Instead of asking:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Which cloud service should I use?&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;developers can also ask:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;What can my own hardware run?&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Zaylo is being developed by LoftyTech Labs with a focus on making local AI infrastructure easier to deploy, manage, and integrate.&lt;/p&gt;
&lt;p&gt;The project is actively maintained and evolving toward supporting more models, runtimes, hardware configurations, and AI workloads.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zaylo — your hardware, your models, your AI infrastructure.&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/30147/zaylo-local-ai</guid>
<pubDate>Wed, 07 Oct 2026 15:02:47 +0000</pubDate>
</item>
<item>
<title>Qwen2.5 7B vs Qwen3 4B &amp; 8B for Writing Correction: 60 Local Ollama Responses on Windows</title>
<link>https://coderlegion.com/28819/qwen2-5-7b-vs-qwen3-4b-8b-for-writing-correction-60-local-ollama-responses-on-windows</link>
<description>&lt;p&gt;I expected Qwen2.5 7B to retain a noticeable advantage over the smaller Qwen3 4B model for writing correction.&lt;/p&gt;
&lt;p&gt;In this experiment, it didn't.&lt;/p&gt;
&lt;p&gt;Across the same 20 paired writing cases, Qwen2.5 7B and Qwen3 4B produced exactly the same complete-case outcome: both succeeded on the same 18 cases and failed on the same 2.&lt;/p&gt;
&lt;p&gt;The difference became much more noticeable in local execution time: in the tested cold-start setup, Qwen3 4B averaged &lt;strong&gt;23.99 seconds&lt;/strong&gt;, compared with &lt;strong&gt;54.37 seconds&lt;/strong&gt; for Qwen2.5 7B.&lt;/p&gt;
&lt;p&gt;That raised another practical question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Can a smaller model from a newer generation reproduce the practical writing-correction performance of a larger model from the previous generation?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This benchmark is a follow-up to my earlier &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/26477/qwen3-4b-vs-8b-vs-14b-for-writing-correction-60-local-ollama-responses-on-windows&quot;&gt;Qwen3 4B vs 8B vs 14B writing-correction experiment&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In that first study, Qwen3 8B and 14B both achieved &lt;strong&gt;19/20 complete cases&lt;/strong&gt;, while the mean cold-start time for Qwen3 8B was roughly half that of Qwen3 14B.&lt;/p&gt;
&lt;p&gt;This second experiment approaches the same model-selection question from another direction: instead of comparing sizes within Qwen3, it compares &lt;strong&gt;Qwen2.5 7B with Qwen3 4B and Qwen3 8B&lt;/strong&gt; under the same paired writing-coach evaluation framework.&lt;/p&gt;
&lt;h3 id=&quot;benchmark-setup&quot;&gt;Benchmark setup&lt;/h3&gt;
&lt;p&gt;The benchmark uses 20 paired writing cases, including 16 sentences with expected errors and 4 already-correct controls.&lt;/p&gt;
&lt;p&gt;Each case was evaluated with the same frozen reference and the same evaluation framework across three locally hosted Qwen models:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;qwen2.5:7b&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qwen3:4b-q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qwen3:8b-q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This produced 60 local responses in total.&lt;/p&gt;
&lt;p&gt;The models were executed through Ollama on Windows under the same benchmark conditions. The objective was not to identify a universal “best model,” but to compare several dimensions separately:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;complete correction of the expected errors;&lt;/li&gt;
&lt;li&gt;expected-correction coverage;&lt;/li&gt;
&lt;li&gt;localization of the error regions;&lt;/li&gt;
&lt;li&gt;preservation of the original facts;&lt;/li&gt;
&lt;li&gt;compliance with the requested output structure;&lt;/li&gt;
&lt;li&gt;explanation-language and consistency checks;&lt;/li&gt;
&lt;li&gt;local cold-start execution time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the primary metric discussed here, a case was considered complete only when all expected correction requirements for that case were satisfied without an incorrect replacement, false error, or configured fact loss.&lt;/p&gt;
&lt;h3 id=&quot;results&quot;&gt;Results&lt;/h3&gt;
&lt;h4 id=&quot;complete-case-correction&quot;&gt;Complete-case correction&lt;/h4&gt;
&lt;p&gt;The primary correction results were close:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 18/20 complete cases — 90%&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen2.5 7B:&lt;/strong&gt; 18/20 complete cases — 90%&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 19/20 complete cases — 95%&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On the primary metric alone, Qwen3 8B completed one additional case in this run.&lt;/p&gt;
&lt;p&gt;The more distinctive result, however, was the paired comparison between Qwen2.5 7B and Qwen3 4B.&lt;/p&gt;
&lt;p&gt;They did not merely finish with the same 18/20 score. They succeeded on the same 18 cases and failed on the same 2 cases.&lt;/p&gt;
&lt;p&gt;Across all 20 paired cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;both succeeded: &lt;strong&gt;18/20&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;both failed: &lt;strong&gt;2/20&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;different complete-case outcomes: &lt;strong&gt;0/20&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, for this specific 20-case writing benchmark, moving from Qwen2.5 7B to Qwen3 4B preserved the same primary correction outcome case by case.&lt;/p&gt;
&lt;p&gt;This should not be interpreted as evidence that the two models are universally equivalent. It means that no complete-case difference was observed between them within this controlled test set.&lt;/p&gt;
&lt;h4 id=&quot;local-execution-time&quot;&gt;Local execution time&lt;/h4&gt;
&lt;p&gt;The difference became much larger when local cold-start execution time was considered.&lt;/p&gt;
&lt;p&gt;In the tested configuration, the mean total cold-start times were:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 23.99 s&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen2.5 7B:&lt;/strong&gt; 54.37 s&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 60.24 s&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Qwen3 4B therefore required less than half the mean cold-start time of Qwen2.5 7B in this run.&lt;/p&gt;
&lt;p&gt;Expressed as a ratio, Qwen3 4B was approximately &lt;strong&gt;2.27× faster&lt;/strong&gt; than Qwen2.5 7B on this specific cold-start measurement, corresponding to about a &lt;strong&gt;55.9% reduction in mean cold-start time&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This makes the paired correction result more practically interesting: Qwen3 4B preserved the same complete-case outcome as Qwen2.5 7B across all 20 cases while responding substantially faster in the tested local setup.&lt;/p&gt;
&lt;p&gt;Qwen2.5 7B and Qwen3 8B, by contrast, were much closer in execution time. Qwen2.5 7B averaged 54.37 s versus 60.24 s for Qwen3 8B, making the 7B model about &lt;strong&gt;9.7% faster&lt;/strong&gt; on mean cold-start time in this run.&lt;/p&gt;
&lt;p&gt;These timing results should be interpreted within the tested configuration. They describe cold-start execution time on this local Windows/Ollama setup, not a universal model-speed ranking.&lt;/p&gt;
&lt;h4 id=&quot;error-localization-and-explanation-checks&quot;&gt;Error localization and explanation checks&lt;/h4&gt;
&lt;p&gt;Complete-case correction does not capture every difference between the models.&lt;/p&gt;
&lt;p&gt;Across the 21 expected error regions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 20/21 regions localized — &lt;strong&gt;97.6% F1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen2.5 7B:&lt;/strong&gt; 20/21 regions localized — &lt;strong&gt;97.6% F1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 21/21 regions localized — &lt;strong&gt;100% F1&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Neither Qwen3 4B nor Qwen2.5 7B produced a false-positive error region in this run, while Qwen3 8B localized all 21 expected regions with no false positive.&lt;/p&gt;
&lt;p&gt;Expected-correction coverage followed a similar pattern:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 19/21 expected corrections — 90.5%&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen2.5 7B:&lt;/strong&gt; 19/21 expected corrections — 90.5%&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 20/21 expected corrections — 95.2%&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So Qwen2.5 7B and Qwen3 4B again matched on both correction coverage and error-localization F1, while Qwen3 8B retained a small advantage on these measures.&lt;/p&gt;
&lt;p&gt;The explanation checks showed a more nuanced difference.&lt;/p&gt;
&lt;p&gt;For explanation-language compliance:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen2.5 7B:&lt;/strong&gt; 40/40 evaluated fields passed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 41/41 evaluated fields passed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 37 passes and 3 warnings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All three models nevertheless produced parseable JSON, usable core output and full-contract-compliant output in all 20 cases.&lt;/p&gt;
&lt;p&gt;The configured fact-preservation check also passed all 20 cases for every model.&lt;/p&gt;
&lt;p&gt;Among the 16 error-containing cases, the action–explanation consistency check recorded 16 consistent results for each model, with no contradictory, ambiguous or missing entries.&lt;/p&gt;
&lt;p&gt;These automatic checks should not be interpreted as a complete measure of pedagogical quality. They capture selected properties such as language compliance, output discipline and consistency, while deeper explanation quality would require additional linguistic or human evaluation.&lt;/p&gt;
&lt;h3 id=&quot;what-this-means-for-local-writing-assistants&quot;&gt;What this means for local writing assistants&lt;/h3&gt;
&lt;p&gt;The main takeaway is not that one model is universally better than the others.&lt;/p&gt;
&lt;p&gt;In this benchmark, Qwen2.5 7B and Qwen3 4B produced the same complete-case outcome on all 20 paired cases, while Qwen3 4B required substantially less cold-start time in the tested local setup.&lt;/p&gt;
&lt;p&gt;Qwen3 8B, however, completed one additional case and reached 100% error-localization F1.&lt;/p&gt;
&lt;p&gt;This creates a practical trade-off rather than a single winner.&lt;/p&gt;
&lt;p&gt;For this specific workload:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B&lt;/strong&gt; offered the strongest efficiency result: the same paired complete-case outcome as Qwen2.5 7B, with much lower measured cold-start time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen2.5 7B&lt;/strong&gt; remained a credible previous-generation baseline: it matched Qwen3 4B on complete cases, expected-correction coverage and error-localization F1, while showing cleaner explanation-language compliance in this run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B&lt;/strong&gt; provided the strongest correction coverage: one additional complete case, one additional expected correction and full error localization.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This suggests that choosing a local writing model should be treated as a multi-criteria decision rather than as a simple parameter-count comparison.&lt;/p&gt;
&lt;p&gt;For an interactive writing assistant, the relevant trade-off may involve correction reliability, explanation behavior, latency, model size and the available hardware.&lt;/p&gt;
&lt;p&gt;In this run, Qwen3 8B provided a small measurable correction advantage, but that advantage came with substantially higher cold-start time than Qwen3 4B.&lt;/p&gt;
&lt;h3 id=&quot;limitations&quot;&gt;Limitations&lt;/h3&gt;
&lt;p&gt;This benchmark is exploratory and should be interpreted within its experimental scope.&lt;/p&gt;
&lt;p&gt;Several limitations are important:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;20 paired cases:&lt;/strong&gt; the dataset is intentionally focused and is not large enough to support a universal ranking of the models.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One language scenario:&lt;/strong&gt; the benchmark evaluates English writing correction with explanations requested in French. Results may differ for other languages or writing tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One model family:&lt;/strong&gt; the comparison is limited to Qwen2.5 7B, Qwen3 4B and Qwen3 8B and should not be generalized to unrelated local model families.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One local machine:&lt;/strong&gt; execution time depends on hardware, background workload, model format, quantization and Ollama configuration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cold-start timing:&lt;/strong&gt; the reported measurements describe this specific cold-start workflow rather than warm-start interaction latency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reference-based evaluation:&lt;/strong&gt; outputs were compared against the same frozen, versioned correction reference and acceptance rules across all three models.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic explanation checks:&lt;/strong&gt; language compliance, output discipline and consistency were evaluated automatically, but these checks do not constitute a complete linguistic or pedagogical assessment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No direct resource measurement:&lt;/strong&gt; RAM, VRAM, CPU load and energy consumption were not measured in this run.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The last point is particularly important for interpreting the efficiency result.&lt;/p&gt;
&lt;p&gt;Qwen3 4B has a substantially smaller nominal parameter count than Qwen2.5 7B, but parameter count alone should not be treated as a direct measurement of hardware-resource usage.&lt;/p&gt;
&lt;p&gt;The benchmark therefore supports a measured latency comparison, not a claim that Qwen3 4B used a specific percentage less RAM, CPU or energy.&lt;/p&gt;
&lt;h3 id=&quot;what-i-plan-to-test-next&quot;&gt;What I plan to test next&lt;/h3&gt;
&lt;p&gt;This second benchmark leaves several useful directions open for further evaluation.&lt;/p&gt;
&lt;p&gt;The next iterations could extend the framework in four directions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;measure &lt;strong&gt;peak RAM and VRAM usage&lt;/strong&gt; alongside correction quality;&lt;/li&gt;
&lt;li&gt;compare &lt;strong&gt;cold-start and warm-start latency&lt;/strong&gt; under the same local conditions;&lt;/li&gt;
&lt;li&gt;extend the benchmark to a &lt;strong&gt;larger and more diverse writing test set&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;compare additional local model families under the same evaluation protocol.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Direct resource measurements would be particularly useful.&lt;/p&gt;
&lt;p&gt;In this run, Qwen3 4B showed a strong latency advantage over Qwen2.5 7B while preserving the same paired complete-case outcome, but memory and compute usage were not measured directly.&lt;/p&gt;
&lt;p&gt;Adding RAM, VRAM and processor-load measurements would make it possible to evaluate the trade-off more completely across:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;correction reliability;&lt;/li&gt;
&lt;li&gt;explanation behavior;&lt;/li&gt;
&lt;li&gt;latency;&lt;/li&gt;
&lt;li&gt;memory footprint;&lt;/li&gt;
&lt;li&gt;compute load;&lt;/li&gt;
&lt;li&gt;and model size.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am particularly interested in whether the efficiency pattern observed here remains stable when the task becomes more linguistically demanding and when resource usage is measured directly.&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;This experiment did not identify a universal winner, but it revealed a clear practical trade-off.&lt;/p&gt;
&lt;p&gt;For this specific 20-case writing benchmark, Qwen3 4B and Qwen2.5 7B produced the same complete-case outcome on every paired case:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;both completed &lt;strong&gt;18/20 cases&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;both applied &lt;strong&gt;19/21 expected corrections&lt;/strong&gt;;&lt;/li&gt;
&lt;li&gt;both reached &lt;strong&gt;97.6% error-localization F1&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The difference was much larger in local execution time.&lt;/p&gt;
&lt;p&gt;Qwen3 4B averaged &lt;strong&gt;23.99 seconds&lt;/strong&gt; of total cold-start time, compared with &lt;strong&gt;54.37 seconds&lt;/strong&gt; for Qwen2.5 7B.&lt;/p&gt;
&lt;p&gt;In this tested configuration, that corresponds to approximately &lt;strong&gt;2.27× faster cold-start execution&lt;/strong&gt; for Qwen3 4B while preserving the same primary paired correction outcome.&lt;/p&gt;
&lt;p&gt;Qwen3 8B remained slightly stronger on correction coverage, completing &lt;strong&gt;19/20 cases&lt;/strong&gt; and reaching &lt;strong&gt;100% error-localization F1&lt;/strong&gt;, but with a mean cold-start time of &lt;strong&gt;60.24 seconds&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The more useful question, therefore, may not be:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Which model has the most parameters?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;but rather:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Which model provides the best balance between correction reliability, explanation behavior, responsiveness and available local hardware for the intended task?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For local interactive applications, model size alone is not enough to answer that question.&lt;/p&gt;
&lt;h4 id=&quot;earlier-benchmark&quot;&gt;Earlier benchmark&lt;/h4&gt;
&lt;p&gt;Before this cross-generation comparison, I tested Qwen3 4B, 8B and 14B on the same 20 writing cases.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://getlinguapilot.com/research/qwen3-writing-coach-benchmark/&quot;&gt;Read the earlier Qwen3 benchmark →&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Disclosure:&lt;/strong&gt; AI assistance was used to refine the wording and organization of this article. The benchmark results and measurements reported here come from the documented experimental runs and were reviewed for accuracy before publication.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28819/qwen2-5-7b-vs-qwen3-4b-8b-for-writing-correction-60-local-ollama-responses-on-windows</guid>
<pubDate>Mon, 28 Sep 2026 04:48:41 +0000</pubDate>
</item>
<item>
<title>From Electronics to Local AI — Sami M.’s Developer Journey</title>
<link>https://coderlegion.com/28464/from-electronics-to-local-ai-sami-m-s-developer-journey</link>
<description>&lt;h2 id=&quot;from-electronics-to-local-ai-sami-m-s-developer-journey&quot;&gt;From Electronics to Local AI — Sami M.’s Developer Journey&lt;/h2&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Developer Stories — CoderLegion&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From childhood curiosity about computer hardware to robotics, artificial intelligence, multi-agent systems, and today's local LLMs, Sami M.'s journey has always been driven by one thing: understanding how intelligent systems work.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Sami M. is an &lt;strong&gt;Electronics Engineer and PhD in Artificial Intelligence (2014)&lt;/strong&gt;. Today, his work and experiments focus heavily on &lt;strong&gt;AI, local AI, LLMs, and Ollama&lt;/strong&gt;, with a particular interest in understanding what these technologies can actually do in practical, real-world situations.&lt;/p&gt;
&lt;p&gt;You can find Sami on &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/user/simouun&quot;&gt;CoderLegion&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;His recent CoderLegion work includes an experiment comparing &lt;strong&gt;Qwen3 4B, 8B and 14B for writing correction using 60 local Ollama responses on Windows&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But the story behind that experiment started much earlier.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;it-started-with-an-intel-286&quot;&gt;It Started With an Intel 286&lt;/h3&gt;
&lt;p&gt;Sami's interest in electronics began when he was very young.&lt;/p&gt;
&lt;p&gt;He remembers being fascinated by the Intel 286 and by the idea that a processor and electronic components could somehow make his favourite game, &lt;em&gt;Gorillas&lt;/em&gt; under MS-DOS, come to life.&lt;/p&gt;
&lt;p&gt;He didn't just want to use the computer.&lt;/p&gt;
&lt;p&gt;He wanted to understand what was happening inside it.&lt;/p&gt;
&lt;p&gt;That curiosity naturally pushed him toward electronics and engineering.&lt;/p&gt;
&lt;p&gt;His move toward artificial intelligence came later through robotics.&lt;/p&gt;
&lt;p&gt;One of his early projects involved autonomous trajectory following with a Pioneer 3-DX mobile robot. From there, his interests expanded into more ambitious work involving collaborative multi-agent systems and task-allocation mechanisms based on auction algorithms.&lt;/p&gt;
&lt;p&gt;The combination of electronics and AI still feels like a natural continuation of that original curiosity.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;from-robotics-to-artificial-intelligence&quot;&gt;From Robotics to Artificial Intelligence&lt;/h3&gt;
&lt;p&gt;What attracted Sami to AI was ultimately a question about &lt;strong&gt;intelligence itself&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;He became interested in biological intelligence and biological neural networks, and then in how some of those ideas could inspire artificial systems.&lt;/p&gt;
&lt;p&gt;His early work included robotics, computer vision, and mobile-robot path planning.&lt;/p&gt;
&lt;p&gt;Classical graph-search techniques such as Dijkstra's algorithm and heuristic search methods such as A* were part of that journey.&lt;/p&gt;
&lt;p&gt;Over time, his interest moved toward systems that could do more than execute a fixed algorithm.&lt;/p&gt;
&lt;p&gt;He became increasingly interested in systems that could:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perceive a situation&lt;/li&gt;
&lt;li&gt;Reason about it&lt;/li&gt;
&lt;li&gt;Make decisions&lt;/li&gt;
&lt;li&gt;Interact with other intelligent systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That path eventually led to his PhD in Artificial Intelligence, completed in 2014.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;how-ai-has-changed&quot;&gt;How AI Has Changed&lt;/h3&gt;
&lt;p&gt;The AI landscape Sami entered during his academic journey is very different from the one developers work with today.&lt;/p&gt;
&lt;p&gt;One of the biggest changes he notices is the move from highly task-specific systems toward models capable of representing much richer relationships between language, context, and meaning.&lt;/p&gt;
&lt;p&gt;He is careful about the word &quot;understanding.&quot;&lt;/p&gt;
&lt;p&gt;He doesn't claim that an LLM understands meaning exactly as a human does.&lt;/p&gt;
&lt;p&gt;But the semantic behaviour these models can demonstrate is still remarkable to him.&lt;/p&gt;
&lt;p&gt;Earlier AI systems often required intelligence to be explicitly designed through rules, features, decision logic, or algorithms tailored to a particular problem.&lt;/p&gt;
&lt;p&gt;Today, much richer behaviour can emerge from representations learned in high-dimensional spaces.&lt;/p&gt;
&lt;p&gt;And one development particularly interests him:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;local AI.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;why-local-ai-&quot;&gt;Why Local AI?&lt;/h3&gt;
&lt;p&gt;For Sami, one of the strongest attractions of local AI is control over information.&lt;/p&gt;
&lt;p&gt;When AI runs locally, sensitive or private information can remain on his own machine.&lt;/p&gt;
&lt;p&gt;That matters when working with technical documents, private information, or other material that he may not want to send to an external service.&lt;/p&gt;
&lt;p&gt;It also gives him more freedom to design the architecture around his own requirements.&lt;/p&gt;
&lt;p&gt;RAG is one example.&lt;/p&gt;
&lt;p&gt;Sami has experimented with large collections of training videos. Instead of manually watching hundreds of hours of material, he can:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Transcribe the content&lt;/li&gt;
&lt;li&gt;Divide it into useful segments&lt;/li&gt;
&lt;li&gt;Generate embeddings&lt;/li&gt;
&lt;li&gt;Retrieve relevant passages&lt;/li&gt;
&lt;li&gt;Interact with that knowledge through a local model&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This turns a huge collection of information into something he can query directly.&lt;/p&gt;
&lt;p&gt;For Sami, local AI isn't simply about running a model without an internet connection.&lt;/p&gt;
&lt;p&gt;It's about &lt;strong&gt;privacy, control, architecture, and practical usefulness&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;experimenting-with-qwen-and-ollama&quot;&gt;Experimenting With Qwen and Ollama&lt;/h3&gt;
&lt;p&gt;Sami's recent CoderLegion article, &lt;strong&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/26477/qwen3-4b-vs-8b-vs-14b-for-writing-correction-60-local-ollama-responses-on-windows&quot;&gt;Qwen3 4B vs 8B vs 14B for Writing Correction: 60 Local Ollama Responses on Windows&lt;/a&gt;&lt;/strong&gt;, came from a very practical need.&lt;/p&gt;
&lt;p&gt;He writes technical reports and emails, sometimes in very different communication styles.&lt;/p&gt;
&lt;p&gt;Constantly switching between correction, improvement, explanation, and tone adjustment was taking time.&lt;/p&gt;
&lt;p&gt;So he wanted something that could:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Correct genuine mistakes&lt;/li&gt;
&lt;li&gt;Suggest improvements when useful&lt;/li&gt;
&lt;li&gt;Work with text from different Windows applications&lt;/li&gt;
&lt;li&gt;Allow him to keep his original wording when preferred&lt;/li&gt;
&lt;li&gt;Explain corrections in a language he understands well&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of simply assuming that the largest model would perform best, Sami built a reusable benchmark framework to test different local models under the same conditions.&lt;/p&gt;
&lt;p&gt;The results reinforced an important lesson:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Model size alone isn't enough.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In his tests, a larger model did not necessarily improve the main correction result, while the difference in execution time could be significant.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;benchmarks-vs-real-world-testing&quot;&gt;Benchmarks vs. Real-World Testing&lt;/h3&gt;
&lt;p&gt;Sami sees published benchmarks as useful.&lt;/p&gt;
&lt;p&gt;They can help create a shortlist.&lt;/p&gt;
&lt;p&gt;But when it comes to deciding whether a model is actually useful, he prefers testing it against his own real-world requirements.&lt;/p&gt;
&lt;p&gt;His writing-correction experiment also connects to something personal.&lt;/p&gt;
&lt;p&gt;English isn't his first language, and he doesn't have much time to study English separately from his engineering work.&lt;/p&gt;
&lt;p&gt;So he thought:&lt;/p&gt;
&lt;p&gt;Why not learn while already working?&lt;/p&gt;
&lt;p&gt;He already needed to write reports and emails in English.&lt;/p&gt;
&lt;p&gt;By using AI to correct mistakes, suggest improvements, and explain corrections, he could learn while completing work he already needed to do.&lt;/p&gt;
&lt;p&gt;He doesn't claim this is a formally validated language-learning method.&lt;/p&gt;
&lt;p&gt;But personally, he has found it useful.&lt;/p&gt;
&lt;p&gt;For Sami, the important point is simple:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A benchmark can tell you something about a model. Your own problem tells you whether that model is useful.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;human-first&quot;&gt;Human First&lt;/h3&gt;
&lt;p&gt;Sami's approach to AI can be summed up simply:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Human first.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He uses AI extensively, but he doesn't want AI making important decisions for him.&lt;/p&gt;
&lt;p&gt;Instead, he uses it to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Challenge an idea&lt;/li&gt;
&lt;li&gt;Show him another perspective&lt;/li&gt;
&lt;li&gt;Point out something he may have missed&lt;/li&gt;
&lt;li&gt;Save time on repetitive work&lt;/li&gt;
&lt;li&gt;Explore possibilities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sometimes he will have several exchanges with an AI system before deciding whether an idea is worth keeping.&lt;/p&gt;
&lt;p&gt;But the final judgment remains his.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;For me, the best use of AI is not to replace human expertise, but to make that expertise more effective.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That philosophy is particularly relevant as AI becomes increasingly integrated into everyday development work.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;the-challenge-of-multi-agent-robotics&quot;&gt;The Challenge of Multi-Agent Robotics&lt;/h3&gt;
&lt;p&gt;One of the most challenging technical areas Sami has worked on is &lt;strong&gt;heterogeneous multi-agent robotics&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Imagine a humanoid robot and a tracked mobile robot working together on the same task.&lt;/p&gt;
&lt;p&gt;They may have completely different:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ways of moving&lt;/li&gt;
&lt;li&gt;Sensors&lt;/li&gt;
&lt;li&gt;Architectures&lt;/li&gt;
&lt;li&gt;Physical capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The challenge isn't simply getting them to communicate.&lt;/p&gt;
&lt;p&gt;The harder questions are:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Who should do what?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When should they do it?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How can the system take advantage of the fact that the agents are different?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Sami worked with dynamic task-allocation approaches, including auction-based mechanisms where tasks can be allocated according to the capabilities and current state of different agents.&lt;/p&gt;
&lt;p&gt;It is a problem of making different intelligent systems cooperate even though they don't necessarily experience or interact with the world in the same way.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;choosing-ai-without-following-the-hype&quot;&gt;Choosing AI Without Following the Hype&lt;/h3&gt;
&lt;p&gt;The AI ecosystem changes incredibly quickly.&lt;/p&gt;
&lt;p&gt;New models and tools appear constantly.&lt;/p&gt;
&lt;p&gt;Sami tries not to choose a model simply because it is fashionable or because everyone is talking about it.&lt;/p&gt;
&lt;p&gt;He starts with the problem.&lt;/p&gt;
&lt;p&gt;He asks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What exactly am I trying to achieve?&lt;/li&gt;
&lt;li&gt;What level of quality do I need?&lt;/li&gt;
&lt;li&gt;What latency is acceptable?&lt;/li&gt;
&lt;li&gt;How much memory do I have?&lt;/li&gt;
&lt;li&gt;Do I need privacy?&lt;/li&gt;
&lt;li&gt;Does it need to work offline?&lt;/li&gt;
&lt;li&gt;Do I need RAG?&lt;/li&gt;
&lt;li&gt;Do I need structured output?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once those constraints are clear, he tests.&lt;/p&gt;
&lt;p&gt;A smaller model with good context and a well-defined task can sometimes be more useful than a massive model used with noisy input or without a clear understanding of the problem.&lt;/p&gt;
&lt;p&gt;But Sami doesn't treat that as a universal rule.&lt;/p&gt;
&lt;p&gt;He prefers to measure.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;&quot;For me, specifications come before trends.&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-comes-next-for-local-llms-&quot;&gt;What Comes Next for Local LLMs?&lt;/h3&gt;
&lt;p&gt;Sami doesn't think the future of local LLMs is simply about making models bigger.&lt;/p&gt;
&lt;p&gt;He believes efficiency will be just as important:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Better architectures&lt;/li&gt;
&lt;li&gt;Improved quantization&lt;/li&gt;
&lt;li&gt;Better memory management&lt;/li&gt;
&lt;li&gt;Greater efficiency with fewer parameters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One example from his own experiments illustrates this.&lt;/p&gt;
&lt;p&gt;For his particular test set, Qwen3 4B matched Qwen2.5 7B on the primary complete-case writing-correction metric he was measuring.&lt;/p&gt;
&lt;p&gt;That doesn't mean the two models have the same overall reasoning capabilities.&lt;/p&gt;
&lt;p&gt;It means that for that particular workload, the larger parameter count didn't improve the main result he was measuring.&lt;/p&gt;
&lt;p&gt;That is precisely why he prefers experimentation over assumptions.&lt;/p&gt;
&lt;p&gt;He expects increasingly capable local models to continue running on ordinary consumer hardware, and that is one of the developments he finds most exciting.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;electronics-still-shapes-how-he-thinks-about-ai&quot;&gt;Electronics Still Shapes How He Thinks About AI&lt;/h3&gt;
&lt;p&gt;Despite spending much of his time working with software and AI, Sami hasn't forgotten the physical layer underneath it all.&lt;/p&gt;
&lt;p&gt;His electronics background influences the way he evaluates AI systems.&lt;/p&gt;
&lt;p&gt;He naturally thinks about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GPU architecture&lt;/li&gt;
&lt;li&gt;Memory&lt;/li&gt;
&lt;li&gt;Data movement&lt;/li&gt;
&lt;li&gt;Computational cost&lt;/li&gt;
&lt;li&gt;Latency&lt;/li&gt;
&lt;li&gt;Energy consumption&lt;/li&gt;
&lt;li&gt;Responsiveness&lt;/li&gt;
&lt;li&gt;Efficiency&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A model isn't just an abstract collection of parameters.&lt;/p&gt;
&lt;p&gt;It has to fit into memory.&lt;/p&gt;
&lt;p&gt;Data has to move through the system.&lt;/p&gt;
&lt;p&gt;The hardware has limits.&lt;/p&gt;
&lt;p&gt;Energy and latency matter.&lt;/p&gt;
&lt;p&gt;That physical view of computing is one reason local AI interests him so much.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;his-advice-to-developers-exploring-local-ai&quot;&gt;His Advice to Developers Exploring Local AI&lt;/h3&gt;
&lt;p&gt;Sami's advice is straightforward:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Start with the problem, not with the model.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;His suggested approach is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Define one clear use case.&lt;/li&gt;
&lt;li&gt;Decide what a good result actually looks like.&lt;/li&gt;
&lt;li&gt;Choose a reasonably small model.&lt;/li&gt;
&lt;li&gt;Run it locally using something accessible such as Ollama.&lt;/li&gt;
&lt;li&gt;Create representative test cases.&lt;/li&gt;
&lt;li&gt;Measure the results.&lt;/li&gt;
&lt;li&gt;Only then consider moving to a larger model.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And if the application involves RAG or external knowledge, spend time cleaning and structuring the data.&lt;/p&gt;
&lt;p&gt;Good context can make a significant difference.&lt;/p&gt;
&lt;p&gt;For Sami, a well-defined problem, a suitable model, and good-quality input can often matter more than simply choosing the largest model available.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;finding-a-technical-community&quot;&gt;Finding a Technical Community&lt;/h3&gt;
&lt;p&gt;Sami joined CoderLegion in September 2026 and has already become active in the AI, Dev Tools, and Python communities.&lt;/p&gt;
&lt;p&gt;What he appreciates most is the technical relevance of the discussions.&lt;/p&gt;
&lt;p&gt;He has received questions about the methodology behind his experiments and discussions about the technical choices he made.&lt;/p&gt;
&lt;p&gt;As an engineer, he says he is much more comfortable discussing the substance of a project than promoting himself.&lt;/p&gt;
&lt;p&gt;That makes a technically focused community a natural fit.&lt;/p&gt;
&lt;p&gt;As CoderLegion grows, he hopes it maintains that technical spirit:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;People sharing what they tested, what worked, what didn't work, and why.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For Sami, that kind of discussion is more useful than visibility for its own sake.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;looking-ahead&quot;&gt;Looking Ahead&lt;/h3&gt;
&lt;p&gt;One of Sami's current research interests is &lt;strong&gt;radio-spectrum management&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;He is exploring how computational methods, optimization, and AI can support problems such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spectrum sharing&lt;/li&gt;
&lt;li&gt;Interference analysis&lt;/li&gt;
&lt;li&gt;More efficient use of limited spectral resources&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But even here, his philosophy remains the same.&lt;/p&gt;
&lt;p&gt;He doesn't want to add AI simply because AI is available.&lt;/p&gt;
&lt;p&gt;He prefers to first understand the engineering problem and then identify where AI can provide measurable value.&lt;/p&gt;
&lt;p&gt;That philosophy connects his past and present work.&lt;/p&gt;
&lt;p&gt;From the Intel 286 that first sparked his curiosity, to robotics, artificial intelligence, multi-agent systems, and today's local LLMs, the technologies have changed dramatically.&lt;/p&gt;
&lt;p&gt;The curiosity hasn't.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;about-sami-m-&quot;&gt;About Sami M.&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Sami M.&lt;/strong&gt; is an Electronics Engineer and holds a PhD in Artificial Intelligence (2014). His interests and work span electronics, robotics, artificial intelligence, multi-agent systems, local AI, LLMs, and practical experimentation with AI tools such as Ollama.&lt;/p&gt;
&lt;p&gt;Follow Sami on &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/user/simouun&quot;&gt;CoderLegion&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;coderlegion-developer-stories&quot;&gt;CoderLegion Developer Stories&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Real developers. Real journeys. Real conversations.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Developer Stories is a CoderLegion series featuring developers, engineers, researchers, and builders sharing the experiences, challenges, ideas, and lessons behind their work.&lt;/p&gt;
&lt;p&gt;If you'd like to share your own developer journey, &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/&quot;&gt;join CoderLegion&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
</description>
<category>Dev Stories</category>
<guid isPermaLink="true">https://coderlegion.com/28464/from-electronics-to-local-ai-sami-m-s-developer-journey</guid>
<pubDate>Thu, 24 Sep 2026 11:11:33 +0000</pubDate>
</item>
<item>
<title>Qwen3 4B vs 8B vs 14B for Writing Correction: 60 Local Ollama Responses on Windows</title>
<link>https://coderlegion.com/26477/qwen3-4b-vs-8b-vs-14b-for-writing-correction-60-local-ollama-responses-on-windows</link>
<description>&lt;p&gt;I expected the larger Qwen3 model to show a clear advantage for writing correction. In this experiment, it didn't.&lt;/p&gt;
&lt;p&gt;Across 20 paired writing cases, Qwen3 8B and 14B both achieved &lt;strong&gt;19/20 complete-case corrections&lt;/strong&gt;, while Qwen3 4B reached &lt;strong&gt;18/20&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The difference became much more noticeable in local execution time: in the tested cold-start setup, the mean cold-start time for Qwen3 8B was roughly half that of Qwen3 14B.&lt;/p&gt;
&lt;p&gt;That raised a practical question:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;For a local writing assistant, how much model size do we actually need?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To explore this more systematically, I built a reproducible benchmark comparing Qwen3 4B, 8B and 14B under the same local conditions with Ollama on Windows.&lt;/p&gt;
&lt;h3 id=&quot;benchmark-setup-1&quot;&gt;Benchmark setup&lt;/h3&gt;
&lt;p&gt;The benchmark uses 20 paired writing cases, including 16 sentences with expected errors and 4 already-correct controls.&lt;/p&gt;
&lt;p&gt;Each case was evaluated with the same reference and the same evaluation framework across three locally hosted Qwen3 models:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;qwen3:4b-q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qwen3:8b-q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;qwen3:14b-q4_K_M&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This produced &lt;strong&gt;60 local responses in total&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The models were executed through &lt;strong&gt;Ollama on Windows&lt;/strong&gt; under the same test conditions. The objective was not to identify a universal “best model,” but to compare several dimensions separately:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;complete correction of the expected errors;&lt;/li&gt;
&lt;li&gt;localization of the error regions;&lt;/li&gt;
&lt;li&gt;preservation of the original meaning;&lt;/li&gt;
&lt;li&gt;compliance with the requested output structure;&lt;/li&gt;
&lt;li&gt;quality of the explanations;&lt;/li&gt;
&lt;li&gt;local execution time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the primary metric discussed here, a case was considered complete only when the expected correction requirements for that case were satisfied.&lt;/p&gt;
&lt;h3 id=&quot;results-1&quot;&gt;Results&lt;/h3&gt;
&lt;h4 id=&quot;complete-case-correction-1&quot;&gt;Complete-case correction&lt;/h4&gt;
&lt;p&gt;The primary correction results were close:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 18/20 complete cases — &lt;strong&gt;90%&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 19/20 complete cases — &lt;strong&gt;95%&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 14B:&lt;/strong&gt; 19/20 complete cases — &lt;strong&gt;95%&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On this metric alone, increasing the model size from 8B to 14B did not improve the number of complete cases in this test.&lt;/p&gt;
&lt;h4 id=&quot;local-execution-time-1&quot;&gt;Local execution time&lt;/h4&gt;
&lt;p&gt;The difference was much larger in execution time.&lt;/p&gt;
&lt;p&gt;In the tested cold-start configuration, the mean cold-start times were approximately:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B:&lt;/strong&gt; 26.6 s&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B:&lt;/strong&gt; 60.0 s&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 14B:&lt;/strong&gt; 119.4 s&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, while 8B and 14B achieved the same complete-case score, &lt;strong&gt;Qwen3 8B took about half as long as Qwen3 14B on average in this cold-start setup.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The 4B model was substantially faster again, while still completing 18 of the 20 cases.&lt;/p&gt;
&lt;p&gt;This does not mean that 8B is universally better than 14B. It means that, for this specific writing-correction workload and hardware configuration, the additional model size did not translate into a better primary correction score, while the execution-time cost increased considerably.&lt;/p&gt;
&lt;h3 id=&quot;error-localization-and-explanation-quality&quot;&gt;Error localization and explanation quality&lt;/h3&gt;
&lt;p&gt;Complete-case correction and error localization measure different aspects of model behavior.&lt;/p&gt;
&lt;p&gt;Across the 21 expected error regions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 4B&lt;/strong&gt; missed one expected region, with an error-localization F1 of &lt;strong&gt;97.6%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 8B&lt;/strong&gt; localized all 21 expected regions, reaching &lt;strong&gt;100% F1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qwen3 14B&lt;/strong&gt; missed one expected region and reported one false-positive region, resulting in &lt;strong&gt;95.2% F1&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This distinction matters for a writing coach: producing an acceptable corrected sentence does not necessarily mean that the model identified the underlying error with the same precision.&lt;/p&gt;
&lt;p&gt;Explanation quality was therefore evaluated separately from correction success.&lt;/p&gt;
&lt;p&gt;In this run, &lt;strong&gt;all 41 evaluated explanation fields produced by Qwen3 8B passed the language check&lt;/strong&gt;. Qwen3 4B showed more explanation-language and terminology issues.&lt;/p&gt;
&lt;p&gt;These automatic checks should not be interpreted as a complete measure of pedagogical quality. They cover selected language patterns and contradictions, while deeper explanation quality remains a separate area for linguistic review.&lt;/p&gt;
&lt;h3 id=&quot;what-this-means-for-local-writing-assistants-1&quot;&gt;What this means for local writing assistants&lt;/h3&gt;
&lt;p&gt;The main takeaway is not that one model is universally better than another.&lt;/p&gt;
&lt;p&gt;In this benchmark, the three Qwen3 models produced relatively similar complete-case correction results, but their local execution times differed much more substantially.&lt;/p&gt;
&lt;p&gt;For this specific workload:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;4B&lt;/strong&gt; offered the lowest execution time, with a small reduction in correction coverage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;8B&lt;/strong&gt; matched 14B on complete-case correction and achieved the strongest error-localization result in this run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;14B&lt;/strong&gt; did not improve the primary correction score over 8B, while requiring substantially more execution time in the tested configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This suggests that model selection for a local writing assistant should be treated as a &lt;strong&gt;multi-criteria decision&lt;/strong&gt;, rather than assuming that a larger model will automatically provide the best practical experience.&lt;/p&gt;
&lt;p&gt;Depending on the use case and available hardware, the relevant trade-off may involve:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;correction reliability;&lt;/li&gt;
&lt;li&gt;explanation quality;&lt;/li&gt;
&lt;li&gt;latency;&lt;/li&gt;
&lt;li&gt;memory and compute requirements;&lt;/li&gt;
&lt;li&gt;and the expected frequency of use.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a writing coach in particular, responsiveness also matters. A model that is slightly larger or theoretically more capable may not necessarily provide the best user experience if each interaction becomes significantly slower.&lt;/p&gt;
&lt;h3 id=&quot;limitations-1&quot;&gt;Limitations&lt;/h3&gt;
&lt;p&gt;This benchmark is exploratory and should be interpreted within its experimental scope.&lt;/p&gt;
&lt;p&gt;Several limitations are important:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;20 paired cases:&lt;/strong&gt; the dataset is intentionally focused and is not large enough to support a universal ranking of the models.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One language scenario:&lt;/strong&gt; the benchmark evaluates English writing correction with explanations requested in French. Results may differ for other languages or writing tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One model family:&lt;/strong&gt; only Qwen3 4B, 8B and 14B were compared. The results should not be generalized to other local model families.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One local machine:&lt;/strong&gt; execution time depends on hardware, model quantization, available memory and Ollama configuration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cold-start timing:&lt;/strong&gt; Ollama was configured with &lt;code&gt;keep_alive=0&lt;/code&gt;, meaning the model was reloaded for each response. The reported timings therefore represent this specific cold-start workflow rather than warm-start interaction latency.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reference-based evaluation:&lt;/strong&gt; outputs were compared against a frozen, versioned correction reference prepared for this study. This improves consistency across models, but it does not capture every possible acceptable linguistic formulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Explanation-quality checks:&lt;/strong&gt; automatic checks cover selected language patterns and contradictions. They should not be treated as a complete assessment of pedagogical or linguistic quality.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These limitations are also why the benchmark is presented as a controlled comparison rather than a claim about the absolute capabilities of each model.&lt;/p&gt;
&lt;h3 id=&quot;what-i-plan-to-test-next-1&quot;&gt;What I plan to test next&lt;/h3&gt;
&lt;p&gt;This first benchmark leaves several useful directions open for further evaluation.&lt;/p&gt;
&lt;p&gt;The next iterations could extend the framework in four directions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;compare additional local model families under the same evaluation protocol;&lt;/li&gt;
&lt;li&gt;examine explanation quality with deeper linguistic and human review;&lt;/li&gt;
&lt;li&gt;compare cold-start and warm-start performance;&lt;/li&gt;
&lt;li&gt;evaluate the same workflow on more constrained hardware.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A larger and more diverse test set would also help determine whether the patterns observed here remain stable beyond these 20 cases.&lt;/p&gt;
&lt;p&gt;I am particularly interested in whether the 8B/14B trade-off observed in this run persists when the task becomes more linguistically demanding.&lt;/p&gt;
&lt;h3 id=&quot;conclusion-1&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;This experiment did not produce a universal winner, but it did highlight an important practical point: &lt;strong&gt;model size alone is not a sufficient criterion for choosing a local writing model&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;For this specific workload, Qwen3 8B matched 14B on complete-case correction while its mean cold-start time was roughly half that of 14B in the tested configuration.&lt;/p&gt;
&lt;p&gt;The more useful question, therefore, may not be “Which model is the largest?” but rather:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Which model provides the best balance between correction quality, explanation quality, responsiveness, and available hardware for the intended use case?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you use local LLMs for writing assistance or other interactive tasks, I would be interested to know which trade-off matters most in your own setup: &lt;strong&gt;quality, latency, memory requirements, or something else?&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id=&quot;follow-up-benchmark&quot;&gt;Follow-up benchmark&lt;/h3&gt;
&lt;p&gt;I later extended this evaluation by comparing Qwen2.5 7B with Qwen3 4B and Qwen3 8B under the same 20-case writing-coach framework.&lt;/p&gt;
&lt;p&gt;In that follow-up, Qwen3 4B matched Qwen2.5 7B on every paired complete-case outcome while averaging &lt;strong&gt;23.99 s&lt;/strong&gt; of cold-start time versus &lt;strong&gt;54.37 s&lt;/strong&gt; for Qwen2.5 7B.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://getlinguapilot.com/research/qwen2-5-vs-qwen3-writing-coach-benchmark/&quot;&gt;Read the follow-up benchmark →&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Disclosure: AI assistance was used to refine the wording and organization of this article. The benchmark results and measurements reported here come from the documented experimental runs and were reviewed for accuracy before publication.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/26477/qwen3-4b-vs-8b-vs-14b-for-writing-correction-60-local-ollama-responses-on-windows</guid>
<pubDate>Tue, 08 Sep 2026 10:25:29 +0000</pubDate>
</item>
<item>
<title>The Paper Sketch: Budgeting 48GB of UMA</title>
<link>https://coderlegion.com/23019/the-paper-sketch-budgeting-48gb-of-uma</link>
<description>&lt;p&gt;Let's look at the physical footprints at a 4-bit (Q4) quantization. A 744B parameter model sits at roughly 370 GB cold on the NVMe drive. Because it’s a sparse Mixture of Experts, the dense backbone—the attention mechanisms and shared weights that every single token must touch—is surprisingly light: about 17B parameters, or roughly 9.9 GB.&lt;/p&gt;
&lt;p&gt;If we draw up the memory allocation inside our 48GB pool, the board looks like this:&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;48 GB (Total) - 9.9 GB (Dense Backbone) - 4 GB (OS &amp;amp; Apps) - 2 GB (KV Cache) ≈ &lt;strong&gt;32 GB Remaining&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;That leaves us a 32GB sandbox to allocate entirely to the lock-free expert ring buffer.&lt;/p&gt;
&lt;p&gt;When this model executes, it activates roughly 40B parameters per token. At Q4 precision, that requires pulling &lt;strong&gt;~11 GB of active experts&lt;/strong&gt; into memory per step. Because our ring buffer is 32GB, it has enough structural breathing room to hold 2 to 3 slots of speculatively loaded future tokens simultaneously. The memory geometry fits.&lt;/p&gt;
&lt;h2 id=&quot;calculating-the-bandwidth-reality&quot;&gt;Calculating the Bandwidth Reality&lt;/h2&gt;
&lt;p&gt;Now we look at the unyielding bottleneck: the internal Apple Silicon SSD bus, which reliably pushes a sustained read bandwidth of about 6.5 GB/s.&lt;/p&gt;
&lt;p&gt;If the engine had to blindly pull a completely fresh set of 11 GB of experts for every single token, the raw physical limit is basic arithmetic:&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Raw I/O Time Per Token = 11 GB / 6.5 GB/s ≈ 1.69 seconds ⇒ &lt;strong&gt;0.59 tokens/second&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;But we know neural routing isn't completely chaotic. Tokens traveling through a sentence exhibit temporal expert locality—the token handling a specific technical context will likely trigger some of the exact same experts used by the token right before it.&lt;/p&gt;
&lt;p&gt;If the speculative lookahead successfully exploits this, allowing us to reuse just 20% of the active experts already sitting warm in the ring buffer, the actual disk read demand drops from 11 GB down to ~8.8 GB:&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Optimized I/O Time = 8.8 GB / 6.5 GB/s ≈ 1.35 seconds ⇒ &lt;strong&gt;0.74 tokens/second&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This lands us squarely in that &lt;strong&gt;0.6 to 0.8 tokens per second&lt;/strong&gt; window.&lt;/p&gt;
&lt;h2 id=&quot;perspectives-on-speed&quot;&gt;Perspectives on Speed&lt;/h2&gt;
&lt;p&gt;Not that we are calling this fast by modern server standards, but it completely rewrites the expectations for what a local machine can do. It’s all about perspective.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;We used to wait hours just to download a single movie; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Waiting 30 or 40 seconds for a frontier-class AI to generate a deeply reasoned paragraph locally on a laptop isn't a penalty—it's a miracle.&lt;/p&gt;
&lt;p&gt;Will it hold up when the code actually executes? The ultimate variable is the &quot;Scout Fan-Out.&quot; With hundreds of potential experts per layer, the speculative engine's branch prediction has to be incredibly precise. If it misguesses too often, the pipeline will stall, waiting for synchronous disk reads.&lt;/p&gt;
&lt;p&gt;But looking at the numbers on the board right now, the physics check out. We aren't just daydreaming—this approach stands a very real chance of turning an impossible 744B paperweight into a highly capable, private asynchronous workhorse.&lt;/p&gt;
</description>
<category>Discussions</category>
<guid isPermaLink="true">https://coderlegion.com/23019/the-paper-sketch-budgeting-48gb-of-uma</guid>
<pubDate>Sun, 19 Jul 2026 14:07:16 +0000</pubDate>
</item>
<item>
<title>What I Learned Building a Local RAG Agent</title>
<link>https://coderlegion.com/19440/what-i-learned-building-a-local-rag-agent</link>
<description>&lt;h3 id=&quot;a-quick-intro&quot;&gt;A Quick Intro&lt;/h3&gt;
&lt;p&gt;I recently built a &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/vkondi/knowledge-onboarding-agent&quot;&gt;local RAG agent&lt;/a&gt; that reads a bunch of documents stored as markdown files and lets you ask questions about them in plain English. It goes through all the documents and figures out an answer based on what's actually in them.&lt;/p&gt;
&lt;h3 id=&quot;the-architecture&quot;&gt;The Architecture&lt;/h3&gt;
&lt;p&gt;Here's a high-level look at the 5-stage pipeline it uses:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Your Markdown Files
       ↓
 [1. INGESTION]    — Reads files, splits into small pieces (&quot;chunks&quot;)
       ↓
 [2. EMBEDDINGS]   — Converts each chunk into a list of numbers (a &quot;vector&quot;)
                     that captures its *meaning*
       ↓
 [3. STORAGE]      — Saves those vectors to a local database (ChromaDB)
       ↓
 [4. RETRIEVAL]    — When you ask a question, finds the most relevant chunks
       ↓
 [5. ORCHESTRATION] — Feeds those chunks to a local AI model
                      which writes a full answer
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;key-concepts-i-picked-up&quot;&gt;Key Concepts I Picked Up&lt;/h3&gt;
&lt;h4 id=&quot;1-ingestion&quot;&gt;1. Ingestion&lt;/h4&gt;
&lt;p&gt;This is the step where your files get read from disk and broken into small, meaningful pieces called &lt;strong&gt;chunks&lt;/strong&gt;, so the AI can make sense of them.&lt;/p&gt;
&lt;p&gt;It has 3 parts:&lt;/p&gt;
&lt;h5 id=&quot;part-1-the-watcher&quot;&gt;Part 1: The Watcher&lt;/h5&gt;
&lt;p&gt;This watches a folder and triggers an event whenever something changes. A library listens to the OS, and when it detects a file change at the specified path, it fires off an event like one of these:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FileEvent(path=&quot;notes/docker.md&quot;, event_type=&quot;created&quot;)
FileEvent(path=&quot;notes/docker.md&quot;, event_type=&quot;modified&quot;)
FileEvent(path=&quot;notes/docker.md&quot;, event_type=&quot;deleted&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;part-2-the-parser&quot;&gt;Part 2: The Parser&lt;/h5&gt;
&lt;p&gt;This is the reader. It takes raw file content and turns it into clean, usable text.&lt;/p&gt;
&lt;p&gt;It does a few useful things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Strips all markdown symbols (&lt;code&gt;**bold**&lt;/code&gt; → bold, &lt;code&gt;# Heading&lt;/code&gt; → Heading) so the AI gets plain text&lt;/li&gt;
&lt;li&gt;Pulls out any YAML front matter (the &lt;code&gt;---&lt;/code&gt; metadata block at the top of some files)&lt;/li&gt;
&lt;li&gt;Splits the document into sections by heading level&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;part-3-the-chunker&quot;&gt;Part 3: The Chunker&lt;/h5&gt;
&lt;p&gt;This takes each section and cuts it into chunks of roughly 512 words, with a 64-word overlap between consecutive chunks.&lt;/p&gt;
&lt;p&gt;Why overlap? Imagine a sentence that falls right at the boundary between two chunks, without overlap, you'd lose that context. With overlap, both chunks carry a little bit of their neighbour's content, so nothing important gets cut off.&lt;/p&gt;
&lt;h5 id=&quot;ingestion-in-one-line&quot;&gt;Ingestion in one line&lt;/h5&gt;
&lt;p&gt;A folder watcher detects file changes → the parser reads and cleans the text → the chunker slices it into overlapping bite-sized pieces, each tagged for change detection.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;2-embedding&quot;&gt;2. Embedding&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Take the chunks from the Ingestion phase and attach a vector (a list of numbers) to each one, so it can be stored and searched by &lt;em&gt;meaning&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Think of it like a translator, it takes human-readable text and converts it into a mathematical form that the database can actually compare.&lt;/p&gt;
&lt;p&gt;It has 2 parts:&lt;/p&gt;
&lt;h5 id=&quot;part-1-the-embedder&quot;&gt;Part 1: The Embedder&lt;/h5&gt;
&lt;p&gt;This is the worker at the translation desk. Its one job: take a list of text strings, send them to a locally running embedding model, and get back a list of vectors.&lt;/p&gt;
&lt;h5 id=&quot;part-2-the-smart-manager&quot;&gt;Part 2: The Smart Manager&lt;/h5&gt;
&lt;p&gt;This sits above the Embedder and decides &lt;em&gt;which&lt;/em&gt; chunks actually need embedding, because embedding is slow and costs compute.&lt;/p&gt;
&lt;p&gt;This is what makes repeat runs fast, if you add one new file to a folder with 200 already-indexed files, only the new file's chunks get processed.&lt;/p&gt;
&lt;h5 id=&quot;embedding-flow&quot;&gt;Embedding flow&lt;/h5&gt;
&lt;pre&gt;&lt;code&gt;List[Chunk]  (from Phase 1)
     ↓
ChunkEmbedder.embed_chunks()
     ├── check (content_hash, source_path) against known pairs
     ├── filter to only NEW chunks
     ├── call Embedder  ← in batches
     └── pair each chunk with its vector
     ↓
List[EmbeddedChunk]  (Chunk + vector, ready for storage)
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;embedding-in-one-line&quot;&gt;Embedding in one line&lt;/h5&gt;
&lt;p&gt;The smart manager skips already-seen chunks and only sends the new ones to the embedder, which calls the local model to produce float vectors, outputting &lt;code&gt;EmbeddedChunk&lt;/code&gt; objects ready for storage.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;3-storage&quot;&gt;3. Storage&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Save the &lt;code&gt;EmbeddedChunk&lt;/code&gt; objects (text + vectors) to a database so they stick around between sessions and can be searched later.&lt;/p&gt;
&lt;p&gt;A special kind of database called a &lt;strong&gt;vector database&lt;/strong&gt; is used for this.&lt;/p&gt;
&lt;p&gt;Here's what a stored record looks like:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;| Field         | Example                          |
|---------------|----------------------------------|
| id            | &quot;docker-guide:3&quot;                 |
| vector        | [0.21, -0.83, 0.44, ...]         |
| metadata      | {content, source, hash, index…}  |
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;what-s-in-the-metadata-&quot;&gt;What's in the metadata?&lt;/h5&gt;
&lt;p&gt;Every stored chunk carries this info alongside its vector:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;content&quot;:      &quot;Docker is a platform for running containers...&quot;,
  &quot;content_hash&quot;: &quot;a3f9c2...&quot;,
  &quot;source_path&quot;:  &quot;/notes/docker.md&quot;,
  &quot;chunk_index&quot;:  3,
  &quot;heading&quot;:      &quot;What is Docker?&quot;,
  &quot;word_count&quot;:   87
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;storage-in-one-line&quot;&gt;Storage in one line&lt;/h5&gt;
&lt;p&gt;The vector database saves each chunk as a (vector + metadata) record on disk, supports fast similarity lookups, and on startup returns a list of already-indexed hashes so nothing gets re-embedded unnecessarily.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;4-retrieval&quot;&gt;4. Retrieval&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; When you ask a question, find the most relevant chunks from the database, before handing anything to the AI.&lt;/p&gt;
&lt;h5 id=&quot;how-semantic-search-works&quot;&gt;How semantic search works&lt;/h5&gt;
&lt;p&gt;It's a simple two-step process:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 1: Embed the question&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Your question is just text. To compare it against stored vectors, it first needs to be turned into a vector too:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;What is Docker?&quot;  →  embed([&quot;What is Docker?&quot;])  →  [0.18, -0.71, ...]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Find the closest matches&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That query vector is compared against all stored vectors using cosine similarity to find the top-K closest ones:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;These 5 chunks are most similar to your question:&quot;
  → chunk from docker-guide.md    (score: 0.91)
  → chunk from docker-guide.md    (score: 0.87)
  → chunk from rest-api-design.md (score: 0.62)
  ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Each result comes back with a relevance score:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;RetrievedChunk:
    chunk: Chunk    # full text, source path, metadata
    score: float    # 0.0 → 1.0 — higher = more relevant
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;retrieval-in-one-line&quot;&gt;Retrieval in one line&lt;/h5&gt;
&lt;p&gt;The retriever embeds the user's question into a vector, asks the database for the top-K closest stored chunks by cosine similarity, and returns them scored and sorted, ready for the AI.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;5-orchestration&quot;&gt;5. Orchestration&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Take the relevant chunks from Retrieval and use the LLM to write a real, human-readable answer.&lt;/p&gt;
&lt;p&gt;This is the brain of the whole system, where raw retrieved text becomes an intelligent response.&lt;/p&gt;
&lt;p&gt;The top-K chunks from the Retrieval phase are passed as context to the language model, which uses them to construct an answer.&lt;/p&gt;
&lt;p&gt;The big benefit here is that it reduces hallucination. By giving the AI a focused set of chunks as context, it's nudged to base its answer on your documents rather than making things up from its general training. That said, tuning the &lt;code&gt;top_k&lt;/code&gt; value matters, too few chunks and the answer is thin, too many and the model can get confused. The sweet spot is somewhere in the middle.&lt;/p&gt;
&lt;h5 id=&quot;orchestration-in-one-line&quot;&gt;Orchestration in one line&lt;/h5&gt;
&lt;p&gt;The query engine wraps retrieval + LLM together and processes your question into a grounded, context-aware answer.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;wrapping-up&quot;&gt;Wrapping Up&lt;/h4&gt;
&lt;p&gt;Building this agent taught me more than I expected, not just about RAG, but about how these systems actually &lt;em&gt;think&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Each of the 5 stages has a very specific job, and they're all fairly simple on their own. The magic happens when you chain them together. A file changes → it gets chunked → embedded → stored → retrieved → answered.&lt;/p&gt;
&lt;p&gt;A few things I'd highlight if you're building something similar:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overlap in chunking matters more than you think.&lt;/strong&gt; Without it, you lose context at boundaries and the answers suffer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deduplication at the embedding stage is a must.&lt;/strong&gt; Re-embedding everything on every run is slow and wasteful. Track hashes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tune your &lt;code&gt;top_k&lt;/code&gt;.&lt;/strong&gt; Too small and the AI doesn't have enough to work with. Too large and it overthinks. Test it with real questions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local models are surprisingly capable.&lt;/strong&gt; You don't always need a cloud API to get useful answers from your own documents.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you're curious about RAG or local AI, this kind of project is a great starting point, it's small enough to understand fully, but complex enough to teach you the real fundamentals.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/19440/what-i-learned-building-a-local-rag-agent</guid>
<pubDate>Mon, 01 Jun 2026 20:45:43 +0000</pubDate>
</item>
<item>
<title>Everyone’s Building AI Agents. Here’s the One I Built for Myself</title>
<link>https://coderlegion.com/19195/everyones-building-ai-agents-heres-the-one-i-built-for-myself</link>
<description>&lt;p&gt;These days, everyone seems to be building AI agents.&lt;/p&gt;
&lt;p&gt;So I figured I should probably build one too.&lt;/p&gt;
&lt;p&gt;But instead of another generic demo, I wanted to solve a small problem I actually had.&lt;/p&gt;
&lt;p&gt;Over time, I had collected a bunch of blog posts and technical notes in a folder. I wanted a quick way to understand them without opening every file one by one.&lt;/p&gt;
&lt;p&gt;Questions like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What topics do I write about most?&lt;/li&gt;
&lt;li&gt;Do some posts contradict each other?&lt;/li&gt;
&lt;li&gt;Can I create a learning path from my own notes?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Uploading everything to ChatGPT did not feel right.&lt;/p&gt;
&lt;p&gt;My content. My machine.&lt;/p&gt;
&lt;p&gt;So I built a small local RAG agent.&lt;/p&gt;
&lt;h3 id=&quot;how-it-works&quot;&gt;How it works&lt;/h3&gt;
&lt;p&gt;It reads markdown files, understands their meaning, and lets me query across all of them in plain English.&lt;/p&gt;
&lt;p&gt;Under the hood, it looks something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-txt&quot;&gt;Markdown Files
      ↓
Chunking &amp;amp; Parsing
      ↓
nomic-embed-text (via Ollama)
      ↓
ChromaDB (local vector storage)
      ↓
Relevant Context Retrieval
      ↓
Mistral (via Ollama)
      ↓
Answer
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Everything runs locally on my laptop.&lt;/p&gt;
&lt;p&gt;No cloud. No external APIs. Just Python and a few focused tools.&lt;/p&gt;
&lt;h3 id=&quot;where-ai-actually-helped&quot;&gt;Where AI Actually Helped&lt;/h3&gt;
&lt;p&gt;The architecture was clear before I started coding. The “vibe coding” part was mostly using AI to speed up repetitive work like tests, boilerplate, and wiring pieces together.&lt;/p&gt;
&lt;p&gt;Idea to working CLI in about a week.&lt;/p&gt;
&lt;p&gt;I’ve open sourced the project if you want to take a look:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/vkondi/knowledge-onboarding-agent&quot;&gt;Knowledge Onboarding Agent&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-s-next&quot;&gt;What’s next&lt;/h3&gt;
&lt;p&gt;Next, I might add PDF support and a lightweight web UI.&lt;/p&gt;
&lt;p&gt;Curious to know, have you built something similar recently? If yes, what problem did you solve?&lt;/p&gt;
&lt;p&gt;Also curious, if you were building this, would you keep it fully local or use cloud APIs? What would you do differently?&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/19195/everyones-building-ai-agents-heres-the-one-i-built-for-myself</guid>
<pubDate>Fri, 29 May 2026 05:12:53 +0000</pubDate>
</item>
<item>
<title>From Manifesto to Metal: The Architecture of Local Sovereignty</title>
<link>https://coderlegion.com/18780/from-manifesto-to-metal-the-architecture-of-local-sovereignty</link>
<description>&lt;blockquote&gt;&lt;p&gt;How ANDARTIS moved from an abstract philosophical rebellion into a hardened, zero-latency reality on macOS.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my previous writing, I spoke of a dream: &lt;em&gt;The Sovereign Cortex.&lt;/em&gt; I painted a vision of a world where independent thinkers—the rogue researchers, the deep-dive clinicians, the authors, and the edge-case investigators—could divorce themselves from the rented cognition of the cloud and reclaim their intellectual privacy.&lt;/p&gt;
&lt;p&gt;But dreams are light, airy things. Hardware is heavy.&lt;/p&gt;
&lt;p&gt;When you transition from writing manifestos about private intelligence to actually compiling a local-first macOS application using NativePHP, philosophy crashes headfirst into the brutal constraints of the metal. If you have been following the development of ANDARTIS, you know that the early stages were a crucible of experimentation. We had grand ideas, but we also faced real-world bottlenecks: cold-start loading delays, memory choking, and the sheer chaos of orchestrating neural models on consumer laptops.&lt;/p&gt;
&lt;p&gt;A rebel doesn’t just need a weapon; they need a beautifully engineered mechanism that doesn’t explode in their hands.&lt;/p&gt;
&lt;p&gt;Today, the high-flying concepts have matured. The documentation is live, and the blueprint is set. Here is how we anchored the philosophy of private intelligence into the physical architecture of ANDARTIS.&lt;/p&gt;
&lt;h4 id=&quot;the-humility-of-constraints&quot;&gt;The Humility of Constraints&lt;/h4&gt;
&lt;p&gt;Building a local-first AI application sounds deeply romantic until you actually try to boot a model.&lt;/p&gt;
&lt;p&gt;In our early iterations, we ran into the harsh realities of local compute. If a user wanted to ask a quick question, they had to wait for the model weights to be read from disk and shoved into memory. It felt like trying to start a vintage diesel engine in the dead of winter. Worse, if the application tried to run an embedding process while simultaneously executing a conversational query, the Apple Neural Engine (ANE) would choke, memory would saturate, and the application would stall.&lt;/p&gt;
&lt;p&gt;We had to stop treating local AI like a cloud server wrapped in a desktop shell. We had to respect the machine.&lt;/p&gt;
&lt;p&gt;The breakthrough didn't come from chasing a bigger model or a heavier framework. It came from a humble realization: &lt;strong&gt;true speed comes from a symbiotic architecture that separates state from execution.&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;   [ User Interface (Inertia/Vue) ]
                  ▲
                  ▼
   [ Laravel &amp;amp; NativePHP Core ]  ◄───►  [ Isolated SQLite DB ]
                  ▲
                  │  (Zero-Latency JSON-RPC over STDIO)
                  ▼
   [ Persistent Python Daemon ]  ◄───►  [ Apple Neural Engine / VRAM ]

&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;the-unlikely-symbiosis-nativephp-meets-mlx&quot;&gt;The Unlikely Symbiosis: NativePHP Meets MLX&lt;/h4&gt;
&lt;p&gt;To build a sovereign tool, we chose an unorthodox, deeply rebellious stack: &lt;strong&gt;Laravel, NativePHP, and Apple's MLX engine.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To the enterprise architect, marrying a PHP backend with a Python machine learning engine inside a desktop app looks strange. But to the artisan programmer, it is pure elegance. We don't spin up heavy local web servers or open vulnerable network ports on your Mac. Instead, the NativePHP core communicates with a background Python daemon using the humblest, oldest, and most reliable medium available: &lt;strong&gt;a zero-latency JSON-RPC pipeline over standard I/O (STDIO).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This hybrid architecture splits the labor perfectly, turning your Mac into a highly optimized, dual-engine machine.&lt;/p&gt;
&lt;h5 id=&quot;1-the-persistent-daemon-ending-the-cold-start-&quot;&gt;1. The Persistent Daemon (Ending the Cold Start)&lt;/h5&gt;
&lt;p&gt;We eliminated the &quot;diesel engine&quot; delay by turning the Python side into a persistent daemon. When ANDARTIS boots, the daemon initializes once and cradles the neural weights gently in your Mac’s unified memory (VRAM). Because the weights never leave memory, the cold-start delay is obliterated. When you prompt the system, the execution is instantaneous.&lt;/p&gt;
&lt;h5 id=&quot;2-php-as-the-sequential-guardrail&quot;&gt;2. PHP as the Sequential Guardrail&lt;/h5&gt;
&lt;p&gt;While Python handles the raw mathematics of neural execution, Laravel handles the sanity of the system. PHP acts as a wise conductor. It schedules execution queues so that heavy tasks—like model fine-tuning or massive data ingestions—run sequentially. It acts as a protective guardrail, ensuring that the Apple Neural Engine is never pushed to a memory-choking panic, keeping your laptop cool and responsive.&lt;/p&gt;
&lt;h4 id=&quot;the-librarian-quietly-resonating-at-the-edge&quot;&gt;The Librarian: Quietly Resonating at the Edge&lt;/h4&gt;
&lt;p&gt;One of the greatest optimizations from our early stages is how ANDARTIS handles data ingestion. In the past, passing thousands of pages into a Large Language Model to figure out what they were about was a recipe for a thermal meltdown.&lt;/p&gt;
&lt;p&gt;Now, we deploy &lt;strong&gt;The Librarian&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The Librarian is an ultra-fast, high-fidelity ingestion pipeline that operates entirely in the background. It walks your local directories, calculates cryptographic hashes to detect modified or new files, and indexes them without breaking a sweat.&lt;/p&gt;
&lt;p&gt;But it doesn't wake up the heavy conversational model to understand your data. Instead, it uses a highly specialized global micro-model to perform what we call &lt;strong&gt;Semantic Resonance&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;By matching your raw documents against forged structural prototypes, this tiny, hyper-efficient model extracts clean JSON metadata (like dates, names, or custom keys you define via Lenses) in milliseconds. It quietly writes this structured data into an isolated &lt;code&gt;core.sqlite&lt;/code&gt; file. The main conversational brain stays completely asleep, conserving your battery and your memory, until the exact moment you ask a question.&lt;/p&gt;
&lt;h4 id=&quot;grounded-synthesis-the-speed-of-sql-the-grace-of-ai&quot;&gt;Grounded Synthesis: The Speed of SQL, the Grace of AI&lt;/h4&gt;
&lt;p&gt;When you finally query ANDARTIS, the magic of this optimized architecture comes alive.&lt;/p&gt;
&lt;p&gt;If you ask your local machine, &lt;em&gt;&quot;What was my total expenditure in March?&quot;&lt;/em&gt; across 5,000 invoices, a typical local LLM will fail. The context window will overflow, or the system will grind to a halt trying to read every word of those 5,000 files.&lt;/p&gt;
&lt;p&gt;ANDARTIS doesn't send the files to the AI. It sends a database query.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Intent Blade&lt;/strong&gt; parses your natural language query using a lightweight local model to determine what you are looking for.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It generates a clean SQL statement and hands it back to the PHP core.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The PHP core queries the isolated &lt;strong&gt;SQLite Node Core&lt;/strong&gt; in sub-milliseconds, filtering out the exact rows and numbers for March.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Only that highly distilled, absolute truth is handed to the &lt;strong&gt;Senior Analyst&lt;/strong&gt; (our local, quantized SLM) for a final synthesis pass.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The result? A fluid, hallucination-free answer delivered at the speed of a relational database, wrapped in the conversational grace of a modern language model.&lt;/p&gt;
&lt;h4 id=&quot;sovereignty-on-the-metal&quot;&gt;Sovereignty on the Metal&lt;/h4&gt;
&lt;p&gt;It is easy to write a manifesto about taking power back from big tech. It is far harder to construct a cross-runtime, memory-guarded, zero-latency ingestion pipeline that functions flawlessly while you are completely offline in a cabin in the woods.&lt;/p&gt;
&lt;p&gt;ANDARTIS is no longer just a conceptual chase for the Holy Grail of private intelligence. It is a working framework designed exclusively for macOS. It proves that we do not need to trade our privacy for utility, nor do we need a data center to achieve corporate-grade intelligence.&lt;/p&gt;
&lt;p&gt;The architecture is set. The guardrails are built. The loom is yours to own.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Forge the wisdom. Keep it local. Never look back.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Docs: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.andartis.it&quot;&gt;https://docs.andartis.it&lt;/a&gt;&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/18780/from-manifesto-to-metal-the-architecture-of-local-sovereignty</guid>
<pubDate>Sun, 24 May 2026 01:15:41 +0000</pubDate>
</item>
<item>
<title>FREYA Family — Sovereign Household AI</title>
<link>https://coderlegion.com/15842/freya-family-sovereign-household-ai</link>
<description>&lt;p&gt;swdrffghrtj&lt;/p&gt;
</description>
<category>Launches</category>
<guid isPermaLink="true">https://coderlegion.com/15842/freya-family-sovereign-household-ai</guid>
<pubDate>Sat, 25 Apr 2026 22:43:33 +0000</pubDate>
</item>
<item>
<title>FREYA Personal — Sovereign AI Assistant</title>
<link>https://coderlegion.com/15591/freya-personal-sovereign-ai-assistant</link>
<description>&lt;p&gt;Shipped my first product today after months of nights and weekends. FREYA is a personal AI assistant that runs entirely on the user's own machine — no cloud, no API calls out, no telemetry, no account required.&lt;br&gt;
Technical:&lt;/p&gt;
&lt;p&gt;Code-locked, cryptographically validated build&lt;br&gt;
Local SQLite memory database (freya_memory.db) stays on the user's disk&lt;br&gt;
Zero external calls at runtime — no heartbeat ping, no license server call-home&lt;br&gt;
One-click install for non-technical users&lt;br&gt;
Tested on hardware from mini PCs up to a 40GbE cluster&lt;/p&gt;
&lt;p&gt;Pricing:&lt;/p&gt;
&lt;p&gt;$49 one-time, Personal edition (one user, one machine)&lt;br&gt;
Family / Small Business / Enterprise editions coming&lt;/p&gt;
&lt;p&gt;Why I built it:&lt;br&gt;
Big Tech can't sell a $49 one-time local AI without cannibalizing their $20/month subscription revenue. That gap is where small shops win. Built this for the people who want ChatGPT-style help without Big Tech reading every word they type.&lt;br&gt;
Built in Idaho by Teton Data Systems LLC. Happy to answer technical questions about the architecture.&lt;/p&gt;
</description>
<category>AI &amp; Machine Learning</category>
<guid isPermaLink="true">https://coderlegion.com/15591/freya-personal-sovereign-ai-assistant</guid>
<pubDate>Sat, 25 Apr 2026 18:00:00 +0000</pubDate>
</item>
<item>
<title>Optimize each location page with unique, locally-focused content, and consistent business details.</title>
<link>https://coderlegion.com/4530/optimize-each-location-page-unique-locally-focused-content-consistent-business-details</link>
<description>&lt;h2 id=&quot;location-page-seo-in-2025-a-developer-s-guide-to-local-visibility&quot;&gt;Location Page SEO in 2025: A Developer’s Guide to Local Visibility&lt;/h2&gt;
&lt;p&gt;In 2025, local search is evolving fast—“near me” results, Google’s Local Pack, and &lt;a rel=&quot;nofollow&quot; href=&quot;https://backlinko.com/local-seo-guide&quot;&gt;map-based searches&lt;/a&gt; drive urgency and foot traffic. A well-crafted location page isn’t just helpful—it’s mission-critical for any multi-location or neighborhood-targeted site.&lt;/p&gt;
&lt;h3 id=&quot;what-makes-a-high-impact-location-page-&quot;&gt;What Makes a High-Impact Location Page?&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=888782866050969764&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;why-this-works&quot;&gt;Why This Works&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=1138821980943759584&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rank in Local Packs &amp;amp; Maps&lt;/strong&gt;: Google uses local pages &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.searchnavigators.com/the-ultimate-guide-to-local-seo-2025/&quot;&gt;to fuel its Map Pack and local snippets&lt;/a&gt;, yielding high visibility and click-through rates.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drive Local Conversions&lt;/strong&gt;: Local intent searches often translate into offline visits—optimizing location pages improves your chance of conversion.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalable &amp;amp; Sustainable&lt;/strong&gt;: With templates plus region-specific customizations, optimizing multiple locations becomes efficient without compromising SEO value.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also Read, &lt;a rel=&quot;nofollow&quot; href=&quot;https://coderlegion.com/4493/geo-and-aeo-redefine-seo-for-2025-by-structuring-content-to-be-cited-rather-than-just-ranked&quot;&gt;GEO and AEO redefine SEO for 2025 by structuring content to be cited—rather than just ranked—by AI!&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;developer-friendly-optimization-blueprint&quot;&gt;Developer-Friendly Optimization Blueprint&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Define your geo keywords and produce unique content per location.&lt;/li&gt;
&lt;li&gt;Apply structured markup and embed maps.&lt;/li&gt;
&lt;li&gt;Set localized metadata and clean, meaningful URLs.&lt;/li&gt;
&lt;li&gt;Add local visual trust elements like reviews and testimonials.&lt;/li&gt;
&lt;li&gt;Create FAQ sections tailored to each area.&lt;/li&gt;
&lt;li&gt;Link your location pages from a central “Locate Us” hub with clear naming.&lt;/li&gt;
&lt;li&gt;Test mobile performance and interaction—optimize load metrics and UX flows.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;in-conclusion&quot;&gt;In Conclusion&lt;/h3&gt;
&lt;p&gt;Well-optimized location pages bridge your business with users actively looking nearby. They're your digital storefront—relevant, trust-building, and action-ready. Delve deeper into local SEO or &lt;a rel=&quot;nofollow&quot; href=&quot;https://sadiqsaleem.com/local-seo&quot;&gt;need help creating scalable location templates&lt;/a&gt; for your brand? I’d be glad to assist.&lt;/p&gt;
</description>
<category>Freelancing</category>
<guid isPermaLink="true">https://coderlegion.com/4530/optimize-each-location-page-unique-locally-focused-content-consistent-business-details</guid>
<pubDate>Sat, 09 Aug 2025 10:41:11 +0000</pubDate>
</item>
<item>
<title>Infinite Compute Glitch - Why Local AI Matters?</title>
<link>https://coderlegion.com/1689/infinite-compute-glitch-why-local-ai-matters</link>
<description>&lt;h2 id=&quot;the-infinite-compute-glitch-why-local-ai-matters&quot;&gt;The Infinite Compute Glitch: Why Local AI Matters&lt;/h2&gt;
&lt;p&gt;In our headlong rush toward AI-powered everything, we've created an interesting paradox. Companies and individuals alike have begun to operate as if compute resources are infinite—just fire off another API call to OpenAI, Claude, or Gemini. But this mindset is creating a significant blind spot in how we approach technology, with consequences that extend far beyond our screens.&lt;/p&gt;
&lt;p&gt;I wasn't just creating another tool when I was building &lt;a rel=&quot;nofollow&quot; href=&quot;https://app.starlight-search.com&quot;&gt;Starlight&lt;/a&gt;, a desktop app that indexes and enables semantic search across your files using local models. I was making a statement about how we should approach AI in our daily lives.&lt;/p&gt;
&lt;p&gt;Starlight lets you chat with your data and find information across your files without ever sending that data to external services. Everything happens on your machine, using your compute resources. This blog explores why apps like Starlight matter and why we should not ignore local AI. &lt;/p&gt;
&lt;h3 id=&quot;the-infinite-compute-glitch&quot;&gt;The Infinite Compute Glitch&lt;/h3&gt;
&lt;p&gt;I've started calling our current approach to AI &quot;the infinite compute glitch&quot;—a collective delusion that we can just keep scaling up models and data centers without consequences.&lt;/p&gt;
&lt;p&gt;Let's look at the hard numbers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A single ChatGPT query consumes approximately 10-15x more energy than a Google search &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.rwdigital.ca/blog/how-much-energy-do-google-search-and-chatgpt-use/&quot;&gt;RW Digital&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Training GPT-4 is estimated to have used over &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.bestbrokers.com/forex-brokers/ais-power-demand-calculating-chatgpts-electricity-consumption-for-handling-over-78-billion-user-queries-every-year/&quot;&gt;62 million kilowatt-hours of electricity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;AI data centers can use between &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.scmp.com/news/china/science/article/3259230/chinas-growing-data-centres-and-ai-industry-could-strain-scarce-water-resources-according-new-report&quot;&gt;3-5 million gallons&lt;/a&gt; of water per day for cooling&lt;/li&gt;
&lt;li&gt;The carbon footprint of training a single large language model can equal that of five cars over their entire lifetimes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A 2023 study from the University of Massachusetts found that training a single transformer-based AI model can emit as much carbon as five cars over their entire lifetimes. Meanwhile, Microsoft had to limit Azure AI services in some regions due to capacity constraints, showing that even the cloud giants are hitting physical limits.&lt;/p&gt;
&lt;h3 id=&quot;why-local-first-matters&quot;&gt;Why Local First Matters&lt;/h3&gt;
&lt;h4 id=&quot;your-data-stays-home&quot;&gt;Your Data Stays Home&lt;/h4&gt;
&lt;p&gt;The most obvious benefit is privacy. When your files never leave your computer, you maintain complete control over your information. No terms of service changes, no worrying about how your data might be used to train future models.&lt;/p&gt;
&lt;p&gt;Consider this: in 2023 alone, major AI companies updated their terms of service multiple times, often expanding their rights to use user data. Samsung even had to ban employees from using generative AI tools after sensitive code was uploaded to ChatGPT and became part of its training data. With local AI, these scenarios become impossible.&lt;/p&gt;
&lt;p&gt;At ASML, we are not allowed to use AI tools because the company carries a lot of sensitive information that is also of national interest. I understand their concern, but when other less sensitive industries utilize AI to make their employees more productive, we feel stuck in the past era. This can easily be solved by empowering the employees with local AI, either on-device or on-prem.&lt;/p&gt;
&lt;h4 id=&quot;distributed-computing-is-resilient-computing&quot;&gt;Distributed Computing Is Resilient Computing&lt;/h4&gt;
&lt;p&gt;We're creating a more distributed system by leveraging the computing power already sitting on our desks and in our laps. Instead of centralizing all AI compute in massive data centers owned by a handful of companies, we're spreading the load across millions of devices.&lt;/p&gt;
&lt;p&gt;The average modern laptop now has more computing power than what was used to train early versions of BERT, one of the breakthrough language models from 2018. A typical gaming PC with a decent GPU can run models with billions of parameters. We're sitting on a vast, untapped ocean of compute power.&lt;/p&gt;
&lt;h4 id=&quot;speed-without-the-wait&quot;&gt;Speed Without the Wait&lt;/h4&gt;
&lt;p&gt;For many tasks, local processing is actually faster. No upload time, no API latency, no waiting for your request to be queued behind thousands of others. The results appear as quickly as your computer can process them.&lt;/p&gt;
&lt;p&gt;In our internal testing, Starlight's local search returned results from a 1GB document collection in under 200ms, while the equivalent cloud API call took over 2 seconds when accounting for network latency and server processing time. That's a 10x difference in speed for common queries.&lt;/p&gt;
&lt;h4 id=&quot;right-sized-solutions&quot;&gt;Right-Sized Solutions&lt;/h4&gt;
&lt;p&gt;Here's something that might surprise you: more than 80% of the AI tasks the average person needs day-to-day can be handled by smaller, local models. We don't need GPT-4 to summarize a document or help draft an email. By matching the task to the appropriate model size, we save enormous resources.&lt;/p&gt;
&lt;p&gt;Take document summarization: a 1.5 billion parameter model running locally can produce summaries nearly indistinguishable from those generated by models 100x larger for most business documents. The difference? The smaller model uses a fraction of the energy and requires no data transmission.&lt;/p&gt;
&lt;h3 id=&quot;what-is-propelling-local-ai-forward&quot;&gt;What is Propelling Local AI Forward&lt;/h3&gt;
&lt;p&gt;Here's what's making local AI happen:&lt;/p&gt;
&lt;h4 id=&quot;1-hardware-increased-processing-power&quot;&gt;1. Hardware: Increased Processing Power&lt;/h4&gt;
&lt;p&gt;It's pretty amazing how much more powerful our devices have become! Laptops, smartphones, and even smaller embedded systems now pack a serious punch with their processors and memory. This means they're not just for basic tasks anymore; they've got the muscle to handle sophisticated AI models directly. Think about it: your phone today has more computing power than entire computers from not too long ago. This increase in processing power is a huge factor in enabling local AI. With the recent release of ARM based processors on PCs, local AI has become even more plausible. The key advancements have been make CPU and GPU share an unified memory, allowing you to fit even larger models on the GPU and super efficient CPU/GPU. This is only going to improve going forward so we need to keep pushing AI on the edge to make use of this untapped compute power. &lt;/p&gt;
&lt;h4 id=&quot;2-model-architecture-and-data&quot;&gt;2. Model Architecture and Data&lt;/h4&gt;
&lt;p&gt;There is no doubt that the LLM models have become ever more intelligent. Every day a new, SOTA model is released. But even more important is that the models are getting smaller and more efficient. While companies like OpenAI are pushing toward ever more larger models which I believe is the wrong direction to move in, companies like Google, Mistral and Meta continue to surprise us with small models that are as powerful as the largest models from last year. For example Gemma3 27b, an open-source 27 billion parameter model from Google is as good as their own closed-source Gemini-1.5-pro which is believed to be over 300 billion parameters.  We can see from the below plot that both Mistral Small 3.1 and Gemma-3 are better than GPT-4o-mini which must be a very large model at this point. Even though these small models are good, they can only work well on high end computers. The user has to settle for even smaller versions of these models if they have a medium spec computer. But this is a start none the less. &lt;/p&gt;
&lt;p&gt;Several new pieces of innovations have made this possible. Introduction of KV caching, Flash Attention, Rotary Position Embedding (RoPE) are just some of the innovations that have truly reduced the gap between the performance of a small local model and a large cloud model. Also the quality of data that is used to train these models has improved over the years. Instead of training on just raw data from the internet which can be very noisy, a lot of clever preprocessing is being done to allow smaller models to learn just as well.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cms.mistral.ai/assets/7ede577c-1f94-4391-ac44-3a54af3d2962.webp?width=2102&amp;amp;height=1138&quot; alt=&quot;graph&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;3-model-serving-open-source-models-and-tools&quot;&gt;3. Model Serving: Open-Source Models and Tools&lt;/h4&gt;
&lt;p&gt;Lastly, the final piece is how are these local AI models distributed. Here, the open source community has been quite active and projects like Ollama, LlamaCPP, Candle, vLLM are making it easier to allow consumer grade hardware to run these open source models efficiently. These projects are the interface between the model weights and the the actual hardware. Making this interaction efficient is the key to making the best models run on the least amount of compute. &lt;/p&gt;
&lt;p&gt;But just serving these models isn’t enough. Tools like ChatGPT provide several more user experiences like Canvas, Web Search, Voice to Text etc, which make people use their services. Even if we made best models, available locally, people will still gravitate towards, OpenAI, Claude etc for the user experience. That’s where products like Starlight come in. The new age software has to be as much local first as possible and allow users to get the same experience that they get on ChatGPT or other similar platforms using their own local AI models. At this point, it is more about breaking the habit. Let’s say I want to summarize a research paper. The default habit that has developed over the last three years for people is to take the paper and upload it to ChatGPT and ask summarization. But this is a very easy task for local models. So how can we push software to break this habit and exploit use cases where local AI can outperform cloud AI. This is going to be a big challenge which we at Starlight strive to solve by building features that make you gravitate towards local AI rather than cloud models for most of your tasks.&lt;/p&gt;
&lt;h3 id=&quot;innovating-within-constraints&quot;&gt;Innovating Within Constraints&lt;/h3&gt;
&lt;p&gt;At Starlight, we're embracing constraints rather than ignoring them. We're finding clever ways to make smaller models more effective through better indexing, retrieval, and context management.&lt;/p&gt;
&lt;p&gt;For example, we've developed a hybrid approach that uses local embedding models to index documents and then employs efficient retrieval algorithms to find the most relevant content. This approach reduces the context window needed for generation tasks, allowing even small local models to produce high-quality results on par with much larger cloud models. Moreover, we are implementing methods like recursive summarization and graph traversal to compress large amounts of information into the constrained context of local models. Also, it's not just about context; even if the local models have a long context, usually, the hardware cannot process this context as it might not be able to fit on the memory or the computation takes just too long. &lt;/p&gt;
&lt;p&gt;This approach forces us to be more thoughtful about how we use AI. Rather than throwing compute at every problem, we ask: What's the most efficient way to solve this? How can we deliver value while minimizing resource use?&lt;/p&gt;
&lt;h3 id=&quot;a-more-balanced-future-the-hybrid-approach&quot;&gt;A More Balanced Future: The Hybrid Approach&lt;/h3&gt;
&lt;p&gt;I'm not suggesting we abandon cloud AI entirely—there are absolutely use cases where larger models are necessary. But by being intentional about when and how we use these resources, we can create a more balanced, sustainable approach to AI.&lt;/p&gt;
&lt;p&gt;Imagine a world where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your personal documents, emails, and notes are processed entirely on your devices, maintaining your privacy&lt;/li&gt;
&lt;li&gt;Basic creative tasks like drafting emails or summarizing articles happen locally, with instant response times&lt;/li&gt;
&lt;li&gt;Only specialized tasks that truly require massive models—like complex code generation or scientific research—call out to cloud services&lt;/li&gt;
&lt;li&gt;Organizations maintain their own small, specialized models trained on their data, running on local infrastructure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This isn't science fiction—all the technology exists today. What's missing is the mindset shift.&lt;/p&gt;
&lt;h3 id=&quot;taking-action&quot;&gt;Taking Action&lt;/h3&gt;
&lt;p&gt;So what can you do to be part of this shift?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Try local-first AI tools&lt;/strong&gt; like Starlight for your personal and professional needs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Be mindful of your API usage&lt;/strong&gt; when you do use cloud services&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Support open-source AI projects&lt;/strong&gt; that are making models more accessible and efficient&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The future isn't about unlimited compute—it's about smart compute. It's about knowing when a local model is sufficient and when you truly need something more powerful.&lt;/p&gt;
&lt;p&gt;So next time you're about to send that API call, ask yourself: Could this happen locally instead? Your privacy, your wallet, and our planet might thank you for it.&lt;/p&gt;
</description>
<category>Natural Language Processing</category>
<guid isPermaLink="true">https://coderlegion.com/1689/infinite-compute-glitch-why-local-ai-matters</guid>
<pubDate>Thu, 27 Mar 2025 23:15:19 +0000</pubDate>
</item>
</channel>
</rss>