<?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: Marcus Vance | Signal Matrix AI</title>
    <description>The latest articles on DEV Community by Marcus Vance | Signal Matrix AI (@signalmatrixai).</description>
    <link>https://dev.to/signalmatrixai</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%2F4179579%2Fa48c0e9a-5cb6-4817-91a1-f0b2e9d9c1e9.jpg</url>
      <title>DEV Community: Marcus Vance | Signal Matrix AI</title>
      <link>https://dev.to/signalmatrixai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/signalmatrixai"/>
    <language>en</language>
    <item>
      <title>Reverse Engineer Anything: AI-Powered Binary Analysis</title>
      <dc:creator>Marcus Vance | Signal Matrix AI</dc:creator>
      <pubDate>Tue, 13 Oct 2026 13:09:59 +0000</pubDate>
      <link>https://dev.to/signalmatrixai/reverse-engineer-anything-ai-powered-binary-analysis-138m</link>
      <guid>https://dev.to/signalmatrixai/reverse-engineer-anything-ai-powered-binary-analysis-138m</guid>
      <description>&lt;h1&gt;
  
  
  Reverse Engineer Anything: AI-Powered Binary Analysis
&lt;/h1&gt;

&lt;p&gt;Stop guessing how that app works—let your AI agent decompile it for you. &lt;/p&gt;

&lt;p&gt;Every software engineer has encountered the "black box" problem. You are integrating a third-party library, debugging a legacy binary, or trying to replicate a feature from an Electron app, but there is no documentation. Traditionally, you would spend days manually navigating Ghidra or IDA, struggling to map assembly instructions to high-level logic. &lt;/p&gt;

&lt;p&gt;That manual grind is over. Meet &lt;strong&gt;REA (Reverse Engineer Anything)&lt;/strong&gt;, an MCP-based toolset that turns your AI agent into a senior reverse engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is REA?
&lt;/h2&gt;

&lt;p&gt;REA is a bridge between raw machine code and human-readable logic. By leveraging the Model Context Protocol (MCP), REA allows your AI agent to inspect native binaries, JavaScript, Electron applications, and .NET assemblies directly from your terminal. &lt;/p&gt;

&lt;p&gt;Because REA runs locally, your proprietary code and sensitive binaries never leave your machine. It provides evidence-based explanations, citing specific binary offsets or code blocks, so you aren't just getting a "guess" from an LLM—you are getting a verifiable analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Get It (Official Links)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/morluto/rea" rel="noopener noreferrer"&gt;https://github.com/morluto/rea&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Official Website &amp;amp; Guides:&lt;/strong&gt; &lt;a href="https://rea.tools/" rel="noopener noreferrer"&gt;https://rea.tools/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;npm Package Registry:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/rea-agents" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/rea-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Discord Community:&lt;/strong&gt; &lt;a href="https://discord.gg/GkcryMnJDM" rel="noopener noreferrer"&gt;https://discord.gg/GkcryMnJDM&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Install &amp;amp; Setup
&lt;/h2&gt;

&lt;p&gt;REA is designed for immediate integration into your development workflow. To get started, ensure you have Node.js installed on your system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install the package globally:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; rea-agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the setup command:&lt;/strong&gt;
This command registers the REA tools with your local AI agent configuration (such as the Claude Desktop app or other MCP-compliant clients).
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npx rea-agents setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify installation:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   rea-agents &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you plan to analyze native binaries, ensure you have a decompiler like &lt;strong&gt;Ghidra&lt;/strong&gt;, &lt;strong&gt;Hopper&lt;/strong&gt;, or &lt;strong&gt;IDA Pro&lt;/strong&gt; installed on your machine. REA will leverage these engines to perform the heavy lifting.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use It in Real Life (Step-by-Step Walkthrough)
&lt;/h2&gt;

&lt;p&gt;Let’s say you are trying to understand how a specific authentication flow is implemented in a legacy Windows binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Connect the Agent
&lt;/h3&gt;

&lt;p&gt;Open your MCP-compatible AI client (e.g., Claude Desktop). Check your available tools; you should now see the &lt;code&gt;rea&lt;/code&gt; toolset listed. If you are using a custom MCP client, ensure the &lt;code&gt;rea-agents&lt;/code&gt; server is added to your configuration file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Provide the Target
&lt;/h3&gt;

&lt;p&gt;Point your agent to the binary or directory you want to analyze. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Prompt:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I need to understand the authentication logic in this binary: &lt;code&gt;/path/to/target_app.exe&lt;/code&gt;. Please use REA to decompile the relevant function and explain how it validates the user token."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 3: Review the Evidence
&lt;/h3&gt;

&lt;p&gt;Your agent will now trigger the REA tool. It will interact with your local decompiler, extract the pseudo-code, and provide a breakdown. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expected Agent Output:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I have analyzed the binary at &lt;code&gt;/path/to/target_app.exe&lt;/code&gt; using Ghidra. The authentication logic is located at offset &lt;code&gt;0x4012A0&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The function &lt;code&gt;validate_token&lt;/code&gt; performs the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It pulls the header from the request buffer.&lt;/li&gt;
&lt;li&gt;It performs an XOR operation with a static key found at &lt;code&gt;0x405000&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It compares the result against the hardcoded string 'AUTH_SUCCESS'.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the decompiled snippet for your reference: [Code Block]"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By providing the exact offset, the agent allows you to verify its work instantly in your decompiler of choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why REA Changes the Game
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Evidence-Based:&lt;/strong&gt; The agent doesn't hallucinate logic; it cites the exact binary offsets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy-First:&lt;/strong&gt; Since the analysis happens locally, you can safely inspect proprietary software without fear of leaking intellectual property to the cloud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow Integration:&lt;/strong&gt; No more context switching between your IDE and a separate reverse engineering suite. Your AI agent brings the insights directly to your chat window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whether you are a security researcher, a developer trying to replicate a feature, or an engineer dealing with legacy code, REA provides the clarity you need to move faster. Stop struggling with the black box and start building.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>Reverse Engineer Anything: AI-Powered Binary Analysis</title>
      <dc:creator>Marcus Vance | Signal Matrix AI</dc:creator>
      <pubDate>Tue, 13 Oct 2026 08:56:48 +0000</pubDate>
      <link>https://dev.to/signalmatrixai/reverse-engineer-anything-ai-powered-binary-analysis-14fp</link>
      <guid>https://dev.to/signalmatrixai/reverse-engineer-anything-ai-powered-binary-analysis-14fp</guid>
      <description>&lt;h1&gt;
  
  
  Reverse Engineer Anything: AI-Powered Binary Analysis
&lt;/h1&gt;

&lt;p&gt;Stop guessing how that app works—let your AI agent decompile it for you. &lt;/p&gt;

&lt;p&gt;Every software engineer has encountered the "black box" problem. You are integrating a third-party library, debugging a legacy binary, or trying to replicate a feature from an Electron app, but there is no documentation. Traditionally, you would spend days manually navigating Ghidra or IDA, struggling to map assembly instructions to high-level logic. &lt;/p&gt;

&lt;p&gt;That manual grind is over. Meet &lt;strong&gt;REA (Reverse Engineer Anything)&lt;/strong&gt;, an MCP-based toolset that turns your AI agent into a senior reverse engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is REA?
&lt;/h2&gt;

&lt;p&gt;REA is a bridge between raw machine code and human-readable logic. By leveraging the Model Context Protocol (MCP), REA allows your AI agent to inspect native binaries, JavaScript, Electron applications, and .NET assemblies directly from your terminal. &lt;/p&gt;

&lt;p&gt;Because REA runs locally, your proprietary code and sensitive binaries never leave your machine. It provides evidence-based explanations, citing specific binary offsets or code blocks, so you aren't just getting a "guess" from an LLM—you are getting a verifiable analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Get It (Official Links)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/morluto/rea" rel="noopener noreferrer"&gt;https://github.com/morluto/rea&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Official Website &amp;amp; Guides:&lt;/strong&gt; &lt;a href="https://rea.tools/" rel="noopener noreferrer"&gt;https://rea.tools/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;npm Package Registry:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/rea-agents" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/rea-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Discord Community:&lt;/strong&gt; &lt;a href="https://discord.gg/GkcryMnJDM" rel="noopener noreferrer"&gt;https://discord.gg/GkcryMnJDM&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Install &amp;amp; Setup
&lt;/h2&gt;

&lt;p&gt;REA is designed for immediate integration into your development workflow. To get started, ensure you have Node.js installed on your system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install the package globally:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; rea-agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the setup command:&lt;/strong&gt;
This command registers the REA tools with your local AI agent configuration (such as the Claude Desktop app or other MCP-compliant clients).
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npx rea-agents setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify installation:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   rea-agents &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you plan to analyze native binaries, ensure you have a decompiler like &lt;strong&gt;Ghidra&lt;/strong&gt;, &lt;strong&gt;Hopper&lt;/strong&gt;, or &lt;strong&gt;IDA Pro&lt;/strong&gt; installed on your machine. REA will leverage these engines to perform the heavy lifting.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use It in Real Life (Step-by-Step Walkthrough)
&lt;/h2&gt;

&lt;p&gt;Let’s say you are trying to understand how a specific authentication flow is implemented in a legacy Windows binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Connect the Agent
&lt;/h3&gt;

&lt;p&gt;Open your MCP-compatible AI client (e.g., Claude Desktop). Check your available tools; you should now see the &lt;code&gt;rea&lt;/code&gt; toolset listed. If you are using a custom MCP client, ensure the &lt;code&gt;rea-agents&lt;/code&gt; server is added to your configuration file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Provide the Target
&lt;/h3&gt;

&lt;p&gt;Point your agent to the binary or directory you want to analyze. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Prompt:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I need to understand the authentication logic in this binary: &lt;code&gt;/path/to/target_app.exe&lt;/code&gt;. Please use REA to decompile the relevant function and explain how it validates the user token."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 3: Review the Evidence
&lt;/h3&gt;

&lt;p&gt;Your agent will now trigger the REA tool. It will interact with your local decompiler, extract the pseudo-code, and provide a breakdown. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expected Agent Output:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I have analyzed the binary at &lt;code&gt;/path/to/target_app.exe&lt;/code&gt; using Ghidra. The authentication logic is located at offset &lt;code&gt;0x4012A0&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The function &lt;code&gt;validate_token&lt;/code&gt; performs the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It pulls the header from the request buffer.&lt;/li&gt;
&lt;li&gt;It performs an XOR operation with a static key found at &lt;code&gt;0x405000&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It compares the result against the hardcoded string 'AUTH_SUCCESS'.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the decompiled snippet for your reference: [Code Block]"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By providing the exact offset, the agent allows you to verify its work instantly in your decompiler of choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why REA Changes the Game
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Evidence-Based:&lt;/strong&gt; The agent doesn't hallucinate logic; it cites the exact binary offsets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy-First:&lt;/strong&gt; Since the analysis happens locally, you can safely inspect proprietary software without fear of leaking intellectual property to the cloud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow Integration:&lt;/strong&gt; No more context switching between your IDE and a separate reverse engineering suite. Your AI agent brings the insights directly to your chat window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whether you are a security researcher, a developer trying to replicate a feature, or an engineer dealing with legacy code, REA provides the clarity you need to move faster. Stop struggling with the black box and start building.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>google/embeddinggemma-2 on Hugging Face: How to Download &amp; Run Multimodal Embeddings</title>
      <dc:creator>Marcus Vance | Signal Matrix AI</dc:creator>
      <pubDate>Mon, 12 Oct 2026 16:21:23 +0000</pubDate>
      <link>https://dev.to/signalmatrixai/googleembeddinggemma-2-on-hugging-face-how-to-download-run-multimodal-embeddings-3mga</link>
      <guid>https://dev.to/signalmatrixai/googleembeddinggemma-2-on-hugging-face-how-to-download-run-multimodal-embeddings-3mga</guid>
      <description>&lt;p&gt;... markdown ...&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>Unsloth + Ollama: Fine-Tune and Run Local LLMs</title>
      <dc:creator>Marcus Vance | Signal Matrix AI</dc:creator>
      <pubDate>Mon, 12 Oct 2026 14:36:13 +0000</pubDate>
      <link>https://dev.to/signalmatrixai/unsloth-ollama-fine-tune-and-run-local-llms-3p78</link>
      <guid>https://dev.to/signalmatrixai/unsloth-ollama-fine-tune-and-run-local-llms-3p78</guid>
      <description>&lt;h1&gt;
  
  
  Unsloth + Ollama: Fine-Tune Open-Source LLMs 2x Faster and Run Them Locally
&lt;/h1&gt;

&lt;p&gt;Stop burning thousands of dollars on cloud LLM API tokens. Fine-tuning an 8B parameter model no longer requires a cluster of enterprise A100 GPUs or endless cloud compute budgets. By pairing &lt;strong&gt;Unsloth&lt;/strong&gt; with &lt;strong&gt;Ollama&lt;/strong&gt;, you can perform QLoRA local fine tuning on a consumer GPU using under 8GB of VRAM, convert the model directly to GGUF format, and serve it on your local machine with a single CLI command.&lt;/p&gt;

&lt;p&gt;Here is how to set up the entire end-to-end pipeline in under 30 minutes.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Unsloth + Ollama?
&lt;/h2&gt;

&lt;p&gt;Standard Hugging Face pipelines often encounter CUDA Out-Of-Memory (OOM) crashes on 16GB or 24GB GPUs when training 8B parameter models. Unsloth rewrites PyTorch attention layers and cross-entropy loss functions into hand-crafted OpenAI Triton kernels. &lt;/p&gt;

&lt;p&gt;This optimization yields concrete advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2x Faster Training:&lt;/strong&gt; Bypasses PyTorch autograd overhead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;70% to 80% Less VRAM:&lt;/strong&gt; Train Llama 3 8B or Mistral 7B in 6.6GB to 8GB VRAM with QLoRA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Conversion Overhead:&lt;/strong&gt; Exports directly to quantized GGUF format and auto-generates the Ollama &lt;code&gt;Modelfile&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero API Bills:&lt;/strong&gt; Serve your proprietary tuned model locally on macOS, Linux, or Windows via Ollama.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Where to Get It (Official Links, GitHub &amp;amp; Hugging Face)
&lt;/h2&gt;

&lt;p&gt;Before starting, bookmark and pull resources from the official repositories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unsloth GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/unslothai/unsloth" rel="noopener noreferrer"&gt;https://github.com/unslothai/unsloth&lt;/a&gt; — Core training framework and Triton kernels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unsloth Official Documentation:&lt;/strong&gt; &lt;a href="https://unsloth.ai/docs" rel="noopener noreferrer"&gt;https://unsloth.ai/docs&lt;/a&gt; — Setup guides, memory benchmarks, and architecture details.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unsloth Hugging Face Hub:&lt;/strong&gt; &lt;a href="https://huggingface.co/unsloth" rel="noopener noreferrer"&gt;https://huggingface.co/unsloth&lt;/a&gt; — Official 4-bit pre-quantized base models (Llama 3, Mistral, Qwen, Gemma).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama Download:&lt;/strong&gt; &lt;a href="https://ollama.com/download" rel="noopener noreferrer"&gt;https://ollama.com/download&lt;/a&gt; — Standalone installers for macOS, Linux, and Windows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ollama GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/ollama/ollama" rel="noopener noreferrer"&gt;https://github.com/ollama/ollama&lt;/a&gt; — Open-source local runtime repository.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Quick Install &amp;amp; Setup
&lt;/h2&gt;

&lt;p&gt;Set up Ollama and an isolated Python virtual environment on your Linux/WSL2 system with CUDA installed.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install Ollama Runtime
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ollama.com/install.sh | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Configure Python Virtual Environment
&lt;/h3&gt;

&lt;p&gt;Create a dedicated environment and install Unsloth alongside PyTorch dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; venv finetune-env
&lt;span class="nb"&gt;source &lt;/span&gt;finetune-env/bin/activate
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--upgrade&lt;/span&gt; pip
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s1"&gt;'unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git'&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--no-deps&lt;/span&gt; trl peft accelerate bitsandbytes datasets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  How to Use It in Real Life (Step-by-Step Walkthrough)
&lt;/h2&gt;

&lt;p&gt;In this walkthrough, we will fine-tune Llama 3 8B Instruct on a customer support dataset, export it to GGUF, and query it locally via Ollama.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Initialize Model and Adapters
&lt;/h3&gt;

&lt;p&gt;Create a training script named &lt;code&gt;train.py&lt;/code&gt;. Load the pre-quantized 4-bit model directly from Hugging Face and inject LoRA parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;unsloth&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastLanguageModel&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;datasets&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;load_dataset&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;trl&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SFTTrainer&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;TrainingArguments&lt;/span&gt;

&lt;span class="n"&gt;max_seq_length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2048&lt;/span&gt;
&lt;span class="n"&gt;dtype&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt; &lt;span class="c1"&gt;# Auto-detect Float16 / Bfloat16
&lt;/span&gt;&lt;span class="n"&gt;load_in_4bit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;

&lt;span class="c1"&gt;# 1. Load 4-bit base model
&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokenizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;FastLanguageModel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_pretrained&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;unsloth/llama-3-8b-Instruct-bnb-4bit&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_seq_length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;max_seq_length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;dtype&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dtype&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;load_in_4bit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;load_in_4bit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Attach LoRA adapters
&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;FastLanguageModel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_peft_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;target_modules&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;q_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;k_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;v_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;o_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                      &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;gate_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;up_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;down_proj&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;lora_alpha&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;lora_dropout&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;bias&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;none&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;use_gradient_checkpointing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;unsloth&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;random_state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3407&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Format Data and Train
&lt;/h3&gt;

&lt;p&gt;Train on instruction-response pairs using &lt;code&gt;SFTTrainer&lt;/code&gt; for 60 steps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 3. Format dataset using Llama 3 template
&lt;/span&gt;&lt;span class="n"&gt;prompt_template&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'''&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;|start_header_id|&amp;gt;system&amp;lt;|end_header_id|&amp;gt;
You are a specialized internal support bot.&amp;lt;|eot_id|&amp;gt;&amp;lt;|start_header_id|&amp;gt;user&amp;lt;|end_header_id|&amp;gt;
{}&amp;lt;|eot_id|&amp;gt;&amp;lt;|start_header_id|&amp;gt;assistant&amp;lt;|end_header_id|&amp;gt;
{}&amp;lt;|eot_id|&amp;gt;&lt;/span&gt;&lt;span class="sh"&gt;'''&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;formatting_prompts_func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;texts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;instruction&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;examples&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;output&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]):&lt;/span&gt;
        &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prompt_template&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instruction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;texts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;texts&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;dataset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_dataset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;philschmid/dolly-15k-oai-style&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;train[:1000]&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;dataset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;formatting_prompts_func&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;batched&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;trainer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SFTTrainer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tokenizer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;train_dataset&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dataset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;dataset_text_field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_seq_length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;max_seq_length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;dataset_num_proc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;packing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;args&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TrainingArguments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;per_device_train_batch_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;gradient_accumulation_steps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;warmup_steps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;max_steps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;learning_rate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;2e-4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;fp16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cuda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_bf16_supported&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="n"&gt;bf16&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cuda&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_bf16_supported&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="n"&gt;logging_steps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;optim&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;adamw_8bit&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;weight_decay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;lr_scheduler_type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;linear&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;seed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3407&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;output_dir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;outputs&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;trainer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;train&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3: Export to GGUF and Ollama
&lt;/h3&gt;

&lt;p&gt;Unsloth eliminates manual &lt;code&gt;llama.cpp&lt;/code&gt; compilation. Export directly to 4-bit Medium Quantization (&lt;code&gt;q4_k_m&lt;/code&gt;) at the end of &lt;code&gt;train.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# 4. Export directly to GGUF
&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save_pretrained_gguf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;custom_model&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokenizer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;quantization_method&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;q4_k_m&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the training file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python train.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This writes the quantized GGUF weights and an automatically configured &lt;code&gt;Modelfile&lt;/code&gt; into the &lt;code&gt;./custom_model&lt;/code&gt; directory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Register and Run in Ollama
&lt;/h3&gt;

&lt;p&gt;Point Ollama to the generated folder and launch the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 5. Build and serve inside Ollama&lt;/span&gt;
ollama create my-assistant &lt;span class="nt"&gt;-f&lt;/span&gt; ./custom_model/Modelfile
ollama run my-assistant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example Interaction:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; How do I reset my company VPN token?
To reset your company VPN token:
1. Open the Okta Verify dashboard on your mobile device.
2. Navigate to Settings &amp;gt; Enrolled Factors &amp;gt; VPN Gateway.
3. Click 'Regenerate Token' and confirm your biometric prompt.
Your new session token will be active within 60 seconds.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Combining Unsloth and Ollama creates a self-contained local fine-tuning workflow: train locally in 15–30 minutes, eliminate external API dependencies, and keep all proprietary data within your own infrastructure.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>Reverse Engineer Anything: AI-Powered Binary Analysis</title>
      <dc:creator>Marcus Vance | Signal Matrix AI</dc:creator>
      <pubDate>Mon, 12 Oct 2026 14:36:12 +0000</pubDate>
      <link>https://dev.to/signalmatrixai/reverse-engineer-anything-ai-powered-binary-analysis-3a8e</link>
      <guid>https://dev.to/signalmatrixai/reverse-engineer-anything-ai-powered-binary-analysis-3a8e</guid>
      <description>&lt;h1&gt;
  
  
  Reverse Engineer Anything: AI-Powered Binary Analysis
&lt;/h1&gt;

&lt;p&gt;Stop guessing how that app works—let your AI agent decompile it for you. &lt;/p&gt;

&lt;p&gt;Every software engineer has encountered the "black box" problem. You are integrating a third-party library, debugging a legacy binary, or trying to replicate a feature from an Electron app, but there is no documentation. Traditionally, you would spend days manually navigating Ghidra or IDA, struggling to map assembly instructions to high-level logic. &lt;/p&gt;

&lt;p&gt;That manual grind is over. Meet &lt;strong&gt;REA (Reverse Engineer Anything)&lt;/strong&gt;, an MCP-based toolset that turns your AI agent into a senior reverse engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is REA?
&lt;/h2&gt;

&lt;p&gt;REA is a bridge between raw machine code and human-readable logic. By leveraging the Model Context Protocol (MCP), REA allows your AI agent to inspect native binaries, JavaScript, Electron applications, and .NET assemblies directly from your terminal. &lt;/p&gt;

&lt;p&gt;Because REA runs locally, your proprietary code and sensitive binaries never leave your machine. It provides evidence-based explanations, citing specific binary offsets or code blocks, so you aren't just getting a "guess" from an LLM—you are getting a verifiable analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Get It (Official Links)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/morluto/rea" rel="noopener noreferrer"&gt;https://github.com/morluto/rea&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Official Website &amp;amp; Guides:&lt;/strong&gt; &lt;a href="https://rea.tools/" rel="noopener noreferrer"&gt;https://rea.tools/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;npm Package Registry:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/rea-agents" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/rea-agents&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Discord Community:&lt;/strong&gt; &lt;a href="https://discord.gg/GkcryMnJDM" rel="noopener noreferrer"&gt;https://discord.gg/GkcryMnJDM&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Install &amp;amp; Setup
&lt;/h2&gt;

&lt;p&gt;REA is designed for immediate integration into your development workflow. To get started, ensure you have Node.js installed on your system.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Install the package globally:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; rea-agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Run the setup command:&lt;/strong&gt;
This command registers the REA tools with your local AI agent configuration (such as the Claude Desktop app or other MCP-compliant clients).
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npx rea-agents setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify installation:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   rea-agents &lt;span class="nt"&gt;--help&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you plan to analyze native binaries, ensure you have a decompiler like &lt;strong&gt;Ghidra&lt;/strong&gt;, &lt;strong&gt;Hopper&lt;/strong&gt;, or &lt;strong&gt;IDA Pro&lt;/strong&gt; installed on your machine. REA will leverage these engines to perform the heavy lifting.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Use It in Real Life (Step-by-Step Walkthrough)
&lt;/h2&gt;

&lt;p&gt;Let’s say you are trying to understand how a specific authentication flow is implemented in a legacy Windows binary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Connect the Agent
&lt;/h3&gt;

&lt;p&gt;Open your MCP-compatible AI client (e.g., Claude Desktop). Check your available tools; you should now see the &lt;code&gt;rea&lt;/code&gt; toolset listed. If you are using a custom MCP client, ensure the &lt;code&gt;rea-agents&lt;/code&gt; server is added to your configuration file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Provide the Target
&lt;/h3&gt;

&lt;p&gt;Point your agent to the binary or directory you want to analyze. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input Prompt:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I need to understand the authentication logic in this binary: &lt;code&gt;/path/to/target_app.exe&lt;/code&gt;. Please use REA to decompile the relevant function and explain how it validates the user token."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 3: Review the Evidence
&lt;/h3&gt;

&lt;p&gt;Your agent will now trigger the REA tool. It will interact with your local decompiler, extract the pseudo-code, and provide a breakdown. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expected Agent Output:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I have analyzed the binary at &lt;code&gt;/path/to/target_app.exe&lt;/code&gt; using Ghidra. The authentication logic is located at offset &lt;code&gt;0x4012A0&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;The function &lt;code&gt;validate_token&lt;/code&gt; performs the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It pulls the header from the request buffer.&lt;/li&gt;
&lt;li&gt;It performs an XOR operation with a static key found at &lt;code&gt;0x405000&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It compares the result against the hardcoded string 'AUTH_SUCCESS'.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the decompiled snippet for your reference: [Code Block]"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By providing the exact offset, the agent allows you to verify its work instantly in your decompiler of choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why REA Changes the Game
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Evidence-Based:&lt;/strong&gt; The agent doesn't hallucinate logic; it cites the exact binary offsets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy-First:&lt;/strong&gt; Since the analysis happens locally, you can safely inspect proprietary software without fear of leaking intellectual property to the cloud.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workflow Integration:&lt;/strong&gt; No more context switching between your IDE and a separate reverse engineering suite. Your AI agent brings the insights directly to your chat window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Whether you are a security researcher, a developer trying to replicate a feature, or an engineer dealing with legacy code, REA provides the clarity you need to move faster. Stop struggling with the black box and start building.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
  </channel>
</rss>
