<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Balzabu | Blog</title>
    <link>https://blog.balzabu.io/tags/lm-studio/</link>
    <description>Recent content on Balzabu | Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 01 Feb 2024 16:03:53 +0100</lastBuildDate>
    <atom:link href="https://blog.balzabu.io/tags/lm-studio/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LM Studio &#43; Continue: A Free Alternative to GitHub Copilot</title>
      <link>https://blog.balzabu.io/posts/lmstudio_continue/</link>
      <pubDate>Thu, 01 Feb 2024 16:03:53 +0100</pubDate>
      <guid>https://blog.balzabu.io/posts/lmstudio_continue/</guid>
      <description>&lt;hr&gt;
&lt;blockquote&gt;
&lt;p&gt;Updated on 2025-01-29&lt;/p&gt;
&lt;p&gt;I stopped using LM Studio and switched over Ollama.
You can read the shiny and brand new post here: &lt;a href=&#34;https://blog.balzabu.io/posts/deepseek-ollama-continue/&#34;&gt;&lt;em&gt;Ollama + Continue: Open-Source is Always Better!&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The realm of technology is constantly in the pursuit of innovation. Among the latest advancements, LM (Language Model) tools have revolutionized programming, making tasks seemingly effortless. But why shell out for them when these capabilities can be accessed for free? Discover LM Studio and Continue, which offer a local solution with unparalleled advantages.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<hr>
<blockquote>
<p>Updated on 2025-01-29</p>
<p>I stopped using LM Studio and switched over Ollama.
You can read the shiny and brand new post here: <a href="https://blog.balzabu.io/posts/deepseek-ollama-continue/"><em>Ollama + Continue: Open-Source is Always Better!</em></a></p>
</blockquote>
<p>The realm of technology is constantly in the pursuit of innovation. Among the latest advancements, LM (Language Model) tools have revolutionized programming, making tasks seemingly effortless. But why shell out for them when these capabilities can be accessed for free? Discover LM Studio and Continue, which offer a local solution with unparalleled advantages.</p>
<h3 id="the-advantages-of-local-lm-models">The Advantages of Local LM Models</h3>
<p>Embracing a local LM model comes with a host of benefits:</p>
<ul>
<li><strong>Cost-free</strong>: No subscription fees; use it at no extra cost.</li>
<li><strong>Complete Offline Access</strong>: Work seamlessly even without an internet connection.</li>
<li><strong>Full Prompt Control</strong>: Customize prompts to tailor results to your exact needs.</li>
</ul>
<p>Of course, it&rsquo;s essential to weigh the drawbacks alongside the perks:</p>
<ul>
<li><strong>Hardware Requirements</strong>: Consider the computing power needed to run these models effectively.</li>
<li><strong>Model Variability</strong>: Not all models are created in the same way; some may lack the sophistication of their proprietary counterparts.</li>
</ul>
<h3 id="lm-studio-configuration">LM Studio Configuration</h3>
<p>Configuring LM Studio is a breeze.
<br>Begin by downloading a preferred build from the official LM Studio website <a href="https://lmstudio.ai/">lmstudio.ai</a>.
<br>
After installation, launch the application manually to access the Home screen.</p>
<p><img src="../../images/lmstudio_continue/home_lmstudio.png" alt="LM Home"></p>
<p>Utilize the search bar at the center of the Home screen to locate desired models.
<br>
To make it all easier, Meta&rsquo;s Code LLama model is <strong>recommended</strong>.</p>
<p>Searching for <code>Code LLama</code> will yield various results, as LM Studio can search and download available models from platforms like Hugging Face.</p>
<p><img src="../../images/lmstudio_continue/code_llama_lmstudio.png" alt="Code LLama Search"></p>
<p>Each model offers different quantizations to compress its size.
<br>
<strong>Always verify model details on Hugging Face before selecting based on your hardware</strong>.
<br>In this case, we&rsquo;ll use the <a href="https://huggingface.co/TheBloke/CodeLlama-13B-Instruct-GGUF">Code LLama 13B</a> model.</p>
<p>Once downloaded, navigate to the <code>AI Chat</code> section of LM Studio to load the model. Additionally, LM Studio can be configured to use it as a server.</p>
<p>Choosing the right model is crucial, considering hardware capabilities. Opt for a model that runs smoothly on your system to avoid performance issues.</p>
<p><img src="../../images/lmstudio_continue/chat_ai_lmstudio.png" alt="AI Chat"></p>
<p>As you can see from my screenshot, it&rsquo;s possible to configure LM Studio to offload operations to the GPU, though optimal settings may vary.
Experiment with different configurations to find the most efficient setup for your hardware.
<strong>Remember that LM Studio will run on 4 CPU cores by default.</strong></p>
<p>After configuring parameters, start the Local Server via the &ldquo;Local Server&rdquo; section of LM Studio. Specify a port and other parameters, <strong>but note</strong> that <strong>changing the default port</strong> may cause issues with the Visual Studio Code extension we&rsquo;ll use later.</p>
<p><img src="../../images/lmstudio_continue/local_server_lmstudio.png" alt="Local Server"></p>
<h3 id="visual-studio-code-configuration">Visual Studio Code Configuration</h3>
<p>With a local model ready and waiting, it&rsquo;s time to connect using the open-source <code>Continue</code> extension in Visual Studio Code.</p>
<p><img src="../../images/lmstudio_continue/continue_vs_extension.png" alt="Continue Extension"></p>
<p>After installation, configure the extension to use your LM Studio server by editing the <code>config.json</code> file. This file is typically found at:</p>
<ul>
<li>Windows: <code>C:/Users/{user}/.continue/config.json</code></li>
<li>Linux/Mac: <code>~/.continue/config.json</code></li>
</ul>
<p><img src="../../images/lmstudio_continue/continue_original_config.png" alt="Original config.json"></p>
<p>Add your local model to the <code>models</code> array, ensuring to include <code>title</code>, <code>provider</code>, and <code>model</code> parameters.
<br>
<strong>Set <code>allowAnonymousTelemetry</code> to <code>false</code></strong>.</p>
<p><img src="../../images/lmstudio_continue/continue_custom_config.png" alt="Original config.json"></p>
<p>Save the file, and you&rsquo;re ready to generate code locally in Visual Studio Code using your LM Studio model!</p>
<p><img src="../../images/lmstudio_continue/continue_test.png" alt="Extension test"></p>
<p>For a comprehensive understanding of the extension&rsquo;s features, refer to the official project wiki <a href="https://continue.dev/docs/how-to-use-continue">here</a>.</p>
<h3 id="conclusion">Conclusion</h3>
<p>Wrapping up our dive into LM Studio and Continue, we&rsquo;ve found a whole new way to rock coding without breaking the bank. These local models give you all the power without any subscription fees. And with easy setup in Visual Studio Code, you&rsquo;re ready to roll.</p>
<p>So, let&rsquo;s get coding!</p>
<h3 id="contacts">Contacts</h3>
<p>For questions or suggestions, contact: <a href="mailto:noc@balzabu.io">noc@balzabu.io</a>.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
