Local LLMs (Experimental)

SmartCursorX supports running quantized GGUF models locally using a bundled llama-server binary. This enables fully offline AI inference with no API costs and no data leaving your machine.

Quick Start

  1. Open Settings → Local LLMs (Exp)
  2. Search for a GGUF model on HuggingFace
  3. Click Browse files on a model repo
  4. Click Download on a GGUF file
  5. Click Run next to the downloaded model
  6. Chat using the local provider

The built-in HuggingFace search lets you find GGUF models:

HuggingFace Token (Experimental)

Some models (Llama, Mistral, etc.) are gated and require authentication:

  1. Get a token at huggingface.co/settings/tokens
  2. Enter it in the HuggingFace Token (Exp) field in the Search section
  3. Token is stored securely via secureStore
  4. Automatically passed as Authorization: Bearer header on download

Downloading Models

Server Setup

The bundled llama-server binary powers local inference:

Binary Location

The download script (download-llama-server.ps1) installs to:

%APPDATA%\smart-cursor-x\bin\llama-srv.exe

The server searches in this order:

  1. %APPDATA%\smart-cursor-x\bin\llama-srv.exe
  2. %APPDATA%\smart-cursor-x\bin\llama-server.exe
  3. resources\llama-srv.exe (packaged app)
  4. resources\llama-server.exe (packaged app)

Server Parameters

When started, the server runs with:

Starting & Stopping

Provider

The local provider routes chat requests to http://localhost:8080/v1/chat/completions (OpenAI-compatible format):

Architecture

User Chat → AIService.createLanguageModel('local')
  → createOpenAICompatible({ baseURL: 'http://localhost:8080/v1' })
    → llama-server on 127.0.0.1:8080
      → GGUF model file

Troubleshooting

Antivirus False Positives

Norton and Windows Defender may flag llama-server.exe as IDP.Generic. The binary is renamed to llama-srv.exe to minimize this, but exclusions may still be needed.

Missing Binary

If findLlamaServer() returns null, the server binary may be missing or quarantined. Run npm run fetch:llama or check antivirus quarantine.

Server Won't Start

Chat Fails with ECONNREFUSED

The server isn't running or crashed. Check if the green "Server Active" indicator is visible. If not, click Run next to your model.