<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>witchcraft — LowEndSpirit</title>
        <link>https://lowendspirit.com/index.php?p=/</link>
        <pubDate>Fri, 05 Jun 2026 21:44:16 +0000</pubDate>
        <language>en</language>
            <description>witchcraft — LowEndSpirit</description>
    <atom:link href="https://lowendspirit.com/index.php?p=/discussions/tagged/witchcraft/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Local code completion - TabbyML</title>
        <link>https://lowendspirit.com/index.php?p=/discussion/7085/local-code-completion-tabbyml</link>
        <pubDate>Wed, 27 Dec 2023 18:57:49 +0000</pubDate>
        <category>Technical</category>
        <dc:creator>havoc</dc:creator>
        <guid isPermaLink="false">7085@/index.php?p=/discussions</guid>
        <description><![CDATA[<p>Another quick &amp; dirty notes write-up an AI topic...</p>

<p>Code completion in vscode similar to GitHub CoPilot - except local and free.</p>

<p>You'll need a windows PC capable of running WSL and a vaguely modern nvidia graphics card (a weak one is fine just can't be ancient). I'm using Win11 but Win10 should work too</p>

<ol>
<li><p>Install nvidia driver (just the normal gaming one), install vscode.</p></li>
<li><p>WSL2</p></li>
</ol>

<p>Follow <a rel="nofollow" href="https://learn.microsoft.com/en-us/windows/wsl/install">MS instructions on this</a>. If it complains about virtualisation not being enabled - check your bios to enable the right option VT-x, VT-d, AMD-V or whatever applies to your board.</p>

<p>At this stage you should be able to spin up a basic ubuntu WSL instance. We don't actually need it - we just want to know if WSL2 works fine. Type Ubuntu into windows search and set that up. Might take a bit of time. Confirm that you're running WSL 2 in powershell:</p>

<pre><code>PS C:\Users\havoc&gt; wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
</code></pre>

<p>WSL comes in 1 and 2 flavour. We need 2.</p>

<ol start="3">
<li><p>Install docker desktop - when it asks select WSL not hyperV</p></li>
<li><p>Restart</p></li>
<li><p>Go to powershell and run "docker run hello-world" - just to confirm that we've got docker up and running</p></li>
<li><p>Next we want to know if docker can talk to our GFX via CUDA. This command should show details about your card if all is well.</p></li>
</ol>

<p><code>docker run --rm --gpus all nvcr.io/nvidia/cuda:latest nvidia-smi</code></p>

<ol start="8">
<li><p>Confirm that you've got nothing running on port 8080 like ahem sabnzbd. If you do move the other thing. Moving TabbyML to another port seems a little flakey</p></li>
<li><p>Run the Tabby docker image command off here</p></li>
</ol>

<p><code>https://tabby.tabbyml.com/docs/installation/docker/</code></p>

<ol start="9">
<li><p>Open browser navigate to <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> - if top left says Swagger then you're good</p></li>
<li><p>Back to VS code, install extension TabbyML</p></li>
<li><p>Bottom right the Tabby icon should be black/system colour instead of orange. You may need to point it at <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> in the extension settings but probably not</p></li>
<li><p>Set up a main.py and see if it code completes. e.g. given green comment it suggests the grey</p></li>
</ol>

<p><img src="https://i.imgur.com/JDe67F1.png" alt="" title="" /></p>

<p>Default model is the smallest / lightest so depending on card you may won't to select another (in step 8). I'd suggest sticking to 7B models or smaller even if you have a 3000/4000 generation card. Completion speed matters for experience.</p>

<p>You may also want to delete all the random images we pulled for testing. Use docker images to list them docker rmi [ImageID] to remove. You may need to stop &amp; remove the container before removing image. docker ps -a command shows all containers, running or not</p>

<p>WSL seems pretty fragile &amp; not immediately apparently how to unfk it with the terrible W11 UI so including that too:</p>

<p>Search for "optional features" (think it's add features in W10). Look for the search box that says "Installed features". Type gibberish in there. That reveals (?!?) a "More Windows features" button. Click that. Untick Hyper-V, Virtual Machine Platform, Windows Hypervisor Platform, Windows Subsystem for Linux. Apply &amp; restart. Now do same except adding them back &amp; restart. Unsure if all 4 are needed for WSL - probably not but that's what worked for me. WSL is based on hyperV so flushing both seemed safer</p>
]]>
        </description>
    </item>
   </channel>
</rss>
