<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Wasif Mehmood on Medium]]></title>
        <description><![CDATA[Stories by Wasif Mehmood on Medium]]></description>
        <link>https://medium.com/@wasifmehmood?source=rss-47ae5329225e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3OQ8H0lCEx-PDYsu3nsGCQ.png</url>
            <title>Stories by Wasif Mehmood on Medium</title>
            <link>https://medium.com/@wasifmehmood?source=rss-47ae5329225e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 11:54:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wasifmehmood/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploy Your LLM in 2 Minutes Using Runpod And VLLM]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.gopenai.com/deploy-your-llm-in-2-minutes-using-runpod-and-vllm-76dd9f79dc0b?source=rss-47ae5329225e------2"><img src="https://cdn-images-1.medium.com/max/2048/1*dVdr6hsn_6LpNedIOPbNJw.jpeg" width="2048"></a></p><p class="medium-feed-snippet">Most easy way of deploying your OpenAI-compatible llm in 2 minutes using runpod as infrastructure and vllm for inferencing.</p><p class="medium-feed-link"><a href="https://blog.gopenai.com/deploy-your-llm-in-2-minutes-using-runpod-and-vllm-76dd9f79dc0b?source=rss-47ae5329225e------2">Continue reading on GoPenAI »</a></p></div>]]></description>
            <link>https://blog.gopenai.com/deploy-your-llm-in-2-minutes-using-runpod-and-vllm-76dd9f79dc0b?source=rss-47ae5329225e------2</link>
            <guid isPermaLink="false">https://medium.com/p/76dd9f79dc0b</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[llama-3]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[vllm]]></category>
            <dc:creator><![CDATA[Wasif Mehmood]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 07:06:31 GMT</pubDate>
            <atom:updated>2025-06-04T13:37:29.517Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[LLAMA.CPP Guide for Creating GGUFs]]></title>
            <link>https://medium.com/@wasifmehmood/llama-cpp-guide-for-creating-ggufs-ec380568e8fb?source=rss-47ae5329225e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec380568e8fb</guid>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[quantization]]></category>
            <category><![CDATA[llama-cpp]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Wasif Mehmood]]></dc:creator>
            <pubDate>Sun, 01 Jun 2025 07:51:44 GMT</pubDate>
            <atom:updated>2025-06-02T18:12:36.855Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Turn Hugging Face models into efficient, quantized LLMs using Llama.cpp</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*verRpMuEtdeWMY2hR30JgQ.png" /><figcaption>credits: <a href="https://github.com/ggml-org/llama.cpp/tree/master">https://github.com/ggml-org/llama.cpp/tree/master</a></figcaption></figure><h3>Introduction</h3><h4>GGUF</h4><p><strong>GGUF</strong> (General GGML Universal Format) is a specialized file format used to store optimized, quantized versions of large language models (LLMs). GGUF files are designed for <strong>efficiency and portability</strong>, enabling large transformer models to run smoothly even on <strong>CPUs, laptops, and edge devices</strong> with limited resources without significantly sacrificing performance.</p><p>This is achieved through <strong>quantization</strong>, a process that compresses model weights (e.g., from 16-bit or 32-bit floats down to 2–8 bits). This compression results in faster inference times, lower memory usage, and broader hardware compatibility.</p><p>GGUFs are especially useful for:</p><ul><li><strong>Deploying LLMs locally</strong> without GPUs</li><li><strong>Running AI on low-cost cloud instances</strong> (e.g., RunPod, Colab)</li><li><strong>Sharing lightweight, efficient models</strong> on platforms like Hugging Face</li><li><strong>Optimizing production applications</strong> where speed and resource efficiency are critical</li></ul><h4><a href="https://github.com/ggml-org/llama.cpp">LLAMA.CPP</a></h4><p>Llama.cpp is one of the most powerful and crucial frameworks in the AI and LLM space. One of its main use cases is <strong>quantization</strong> and creating <strong>GGUF</strong> (General GGML Universal Format) files—optimized formats for running large models efficiently, even on CPUs or low-resource environments.</p><p>Unfortunately, due to a lack of structured documentation, beginners often struggle with using this framework effectively. This guide is designed to walk you through the entire process — from setup to uploading your GGUF models — so you can confidently create and share quantized models.</p><h3>Setup</h3><h3>Environment</h3><p>For all tasks related to GGUFs, I personally use <a href="https://www.runpod.io/">RunPod</a> — it’s user-friendly, cost-effective, and provides the necessary compute power easily.</p><h3>Installations</h3><p>Begin by installing the required Python libraries:</p><pre>pip install huggingface_hub numpy transformers</pre><h3>Building llama.cpp</h3><p>In this guide, we’ll focus on building for <strong>CPU</strong> (you can find other build types <a href="https://github.com/ggml-org/llama.cpp/blob/master/docs/build.md">here</a>):</p><p><strong>Note:</strong></p><p>If you are using runpod then first run these commands for installation of cmake and libcurl4-openssl-dev</p><pre>apt-get update<br>apt-get install -y cmake<br>apt-get install -y libcurl4-openssl-dev</pre><p>and then run the commands below</p><pre>git clone https://github.com/ggml-org/llama.cpp<br>cd llama.cpp<br>cmake -B build<br>cmake --build build --config Release<br>pip install -r requirements.txt<br>cd ..</pre><p>Running these commands will compile all the necessary executables.</p><h3>Downloading Your Model</h3><p>Log in to the Hugging Face Hub and download your desired model:</p><pre>from huggingface_hub import login<br>login()</pre><pre>from huggingface_hub import snapshot_download<br>MODEL_ID= &quot;meta-llama/Llama-3.2-3B-Instruct&quot;<br>model_path = snapshot_download(<br>    repo_id=MODEL_ID,<br>    local_dir=MODEL_ID<br>)</pre><h3>GGUF Quantization Options</h3><p>Here are the available GGUF formats you can create:</p><p><strong>. Q2_K</strong>: 2-bit quantization (~2.6 bits/weight)</p><p><strong>. Q3_K_M</strong>: 3-bit medium (~3.4 bits/weight)</p><p><strong>. Q4_K_M</strong>: 4-bit medium (~4.5 bits/weight)</p><p><strong>. Q5_K_M</strong>: 5-bit medium (~5.5 bits/weight)</p><p><strong>. Q6_K</strong>: 6-bit quantization (~6.6 bits/weight)</p><p><strong>. Q8_0</strong>: 8-bit legacy format (8 bits/weight)</p><h3>Step 1: Convert Model to FP16</h3><p>Before creating quantized GGUFs, you need to convert the Hugging Face model into <strong>FP16 format</strong> using the provided script.</p><pre>mkdir fp16<br>python llama.cpp/convert_hf_to_gguf.py [MODEL_PATH] --outtype f16 --outfile [OUTPUT_FILE]</pre><p>In my case it will be like below where <strong>MODEL_PATH </strong>is <em>meta-llama/Llama-3.2-3B-Instruct</em> and <strong>OUTPUT_FILE </strong>is <em>fp16/Llama-3.2-3B-Instruct-fp16.gguf</em>:</p><pre>mkdir fp16<br>python llama.cpp/convert_hf_to_gguf.py meta-llama/Llama-3.2-3B-Instruct --outtype f16 --outfile fp16/Llama-3.2-3B-Instruct-fp16.gguf</pre><p>This command will generate:</p><pre>fp16/Llama-3.2-3B-Instruct-fp16.gguf</pre><h3>Step 2: Create Quantized GGUF (e.g., Q4_K_M)</h3><p>Next, use the llama-quantize binary to generate a quantized GGUF file. Here, we’ll create a <strong>Q4_K_M</strong> quantized version:</p><pre>mkdir q4<br>./llama.cpp/build/bin/llama-quantize [INPUT_FILE] [OUTPUT_FILE] [QUANTIZATION_METHOD]</pre><p>In my case <strong>INPUT_FILE</strong> will be <em>fp16/Llama-3.2-3B-Instruct-fp16.gguf </em>(the fp16 file we generated) and <strong>OUTPUT_FILE</strong> will be <em>q4/Llama-3.2-3B-Instruct-q4_k_m.gguf</em> and <strong>QUANTIZATION_METHOD </strong>will be <em>Q4_K_M</em></p><pre>mkdir q4<br>./llama.cpp/build/bin/llama-quantize fp16/Llama-3.2-3B-Instruct-fp16.gguf q4/Llama-3.2-3B-Instruct-q4_k_m.gguf Q4_K_M</pre><p>This will output your 4-bit GGUF at:</p><pre>q4/Llama-3.2-3B-Instruct-q4_k_m.gguf</pre><h3>Step 3: Shard Large Models (Optional)</h3><p>If your model is very large (e.g., 70B+), uploading it in a single file may be impractical. In such cases, <strong>sharding</strong> splits the file into smaller parts:</p><pre>mkdir splits<br>./llama.cpp/build/bin/llama-gguf-split --split --split-max-tensors [MAX_TENSORS] [MODEL_PATH] [OUTPUT_PATH]</pre><p>in my case <strong>MAX_TENSORS </strong>will be <em>256</em>, <strong>MODEL_PATH </strong>will be <em>q4/Llama-3.2-3B-Instruct-q4_k_m.gguf</em> and <strong>OUTPUT_PATH</strong> will be <em>splits/Llama-3.2–3B-Instruct-q4_k_m</em></p><pre>mkdir splits<br>./llama.cpp/build/bin/llama-gguf-split --split --split-max-tensors 256 q4/Llama-3.2-3B-Instruct-q4_k_m.gguf splits/Llama-3.2-3B-Instruct-q4_k_m</pre><h3>Step 4: Upload to Hugging Face</h3><p>To upload the quantized model to Hugging Face, use:</p><pre>cd q4<br>huggingface-cli upload [HUGGINGFACE_MODEL_ID] .</pre><p>In my case <strong>HUGGINGFACE_MODEL_ID </strong>is <em>wasifis/Llama-3.2–3B-Instruct-q4_k_m</em> and the . is for uploading the content of current directory you are in.</p><pre>cd q4<br>huggingface-cli upload wasifis/Llama-3.2-3B-Instruct-q4_k_m .</pre><h3>💬 Questions or want to connect?</h3><ul><li>💬 Drop a comment below</li><li>🔗 Connect with me on <a href="#">LinkedIn</a></li><li>📧 Email me at <strong>wasifismcontact@gmail.com</strong></li></ul><p>Always happy to support and connect with fellow AI builders!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec380568e8fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finetuning LLMs Using Axolotl with QLora]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.gopenai.com/finetuning-llms-using-axolotl-with-qlora-9e0188866bab?source=rss-47ae5329225e------2"><img src="https://cdn-images-1.medium.com/max/1280/0*gCPzawGLqBBJmRq7" width="1280"></a></p><p class="medium-feed-snippet">A detailed guide om finetuning LLMs using Axolotl</p><p class="medium-feed-link"><a href="https://blog.gopenai.com/finetuning-llms-using-axolotl-with-qlora-9e0188866bab?source=rss-47ae5329225e------2">Continue reading on GoPenAI »</a></p></div>]]></description>
            <link>https://blog.gopenai.com/finetuning-llms-using-axolotl-with-qlora-9e0188866bab?source=rss-47ae5329225e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e0188866bab</guid>
            <dc:creator><![CDATA[Wasif Mehmood]]></dc:creator>
            <pubDate>Sat, 17 Aug 2024 15:56:15 GMT</pubDate>
            <atom:updated>2025-06-04T13:37:14.181Z</atom:updated>
        </item>
    </channel>
</rss>