<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Sheeraz</title>
    <description>The latest articles on DEV Community by Muhammad Sheeraz (@sheeraz07).</description>
    <link>https://dev.to/sheeraz07</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4215086%2Fe4e745ca-f6d6-451c-a35a-56b9dae93b80.jpg</url>
      <title>DEV Community: Muhammad Sheeraz</title>
      <link>https://dev.to/sheeraz07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sheeraz07"/>
    <language>en</language>
    <item>
      <title>Self-hosted LLM on Hostinger KVM2: under 10s responses, 2 CPU cores, no GPU. Here's how!</title>
      <dc:creator>Muhammad Sheeraz</dc:creator>
      <pubDate>Thu, 29 Oct 2026 11:22:42 +0000</pubDate>
      <link>https://dev.to/sheeraz07/self-hosted-llm-on-hostinger-kvm2-under-10s-responses-2-cpu-cores-no-gpu-heres-how-26g6</link>
      <guid>https://dev.to/sheeraz07/self-hosted-llm-on-hostinger-kvm2-under-10s-responses-2-cpu-cores-no-gpu-heres-how-26g6</guid>
      <description>&lt;h1&gt;
  
  
  Optimizing a Local RAG Chatbot for CPU Inference
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Tags:&lt;/strong&gt; &lt;code&gt;#ai&lt;/code&gt; &lt;code&gt;#llm&lt;/code&gt; &lt;code&gt;#rag&lt;/code&gt; &lt;code&gt;#python&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Building a local RAG chatbot is not just about choosing an LLM. It requires balancing response quality, retrieval accuracy, inference speed, and resource utilization.&lt;/p&gt;

&lt;p&gt;Here are the key optimizations I explored and implemented:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Model Quantization
&lt;/h3&gt;

&lt;p&gt;Used a small, 4-bit quantized Qwen Instruct model to reduce memory requirements and make CPU-based inference more practical.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Retrieval Optimization
&lt;/h3&gt;

&lt;p&gt;Improved document chunk quality and evaluated query-to-context similarity to retrieve more relevant information and reduce unnecessary context.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Similarity Threshold Tuning
&lt;/h3&gt;

&lt;p&gt;Fine-tuned retrieval thresholds to balance relevance and recall, filtering weak matches without unnecessarily discarding useful information.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Controlled Generation
&lt;/h3&gt;

&lt;p&gt;Kept the LLM temperature around &lt;strong&gt;0.2&lt;/strong&gt; to encourage consistent, focused, and natural responses. Factual grounding remained dependent on retrieval quality and prompt design.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. CPU Inference Optimization
&lt;/h3&gt;

&lt;p&gt;Experimented with CPU-oriented &lt;code&gt;llama.cpp&lt;/code&gt; configurations and OpenVINO-based optimization to improve resource utilization and inference efficiency.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Concurrency and Traffic Management
&lt;/h3&gt;

&lt;p&gt;Used rate limiting, parallel inference instances, and load balancing strategies to manage concurrent requests while considering CPU contention and memory constraints.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaway
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A production-ready RAG chatbot is a system, not just a model.&lt;/strong&gt; Retrieval quality, quantization, inference configuration, and concurrency management must work together to deliver reliable performance on limited hardware.&lt;/p&gt;

&lt;p&gt;I'm continuing to explore ways to make local AI applications more efficient, scalable, and cost-effective.&lt;/p&gt;

&lt;p&gt;Does Anyone have questions, or suggestion then do share them without hesitation.&lt;/p&gt;

&lt;p&gt;Developed by Muhammad Sheeraz&lt;br&gt;
below is my professional portfolio:&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://muhammadsheeraz.vercel.app/" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmuhammadsheeraz.vercel.app%2Fimages%2Fprofile_pic.png" height="630" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://muhammadsheeraz.vercel.app/" rel="noopener noreferrer" class="c-link"&gt;
            Muhammad Sheeraz | AI &amp;amp; Computer Vision Engineer | Agentic AI &amp;amp; LLMs | Muhammad Sheeraz
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            Explore projects, engineering experience, skills, and certifications of Muhammad Sheeraz: AI &amp;amp; Computer Vision Engineer, Agentic AI Developer, and IoT Innovator.
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmuhammadsheeraz.vercel.app%2Ficon%3F7f9c6ef5b6a62f83" width="32" height="32"&gt;
          muhammadsheeraz.vercel.app
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>backend</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
