llama.vscode

llama.vscode

VS Code extension for local LLM-assisted code/text completion

Stars: 367

Visit
 screenshot

llama.vscode is a local LLM-assisted text completion extension for Visual Studio Code. It provides auto-suggestions on input, allows accepting suggestions with shortcuts, and offers various features to enhance text completion. The extension is designed to be lightweight and efficient, enabling high-quality completions even on low-end hardware. Users can configure the scope of context around the cursor and control text generation time. It supports very large contexts and displays performance statistics for better user experience.

README:

llama.vscode

Local LLM-assisted text completion extension for VS Code

image


llama vscode-swift0

Features

  • Auto-suggest on input
  • Accept a suggestion with Tab
  • Accept the first line of a suggestion with Shift + Tab
  • Accept the next word with Ctrl/Cmd + Right
  • Toggle the suggestion manually by pressing Ctrl + L
  • Control max text generation time
  • Configure scope of context around the cursor
  • Ring context with chunks from open and edited files and yanked text
  • Supports very large contexts even on low-end hardware via smart context reuse
  • Display performance stats

Installation

VS Code extension setup

Install the llama-vscode extension from the VS Code extension marketplace:

image

llama.cpp setup

The plugin requires a llama.cpp server instance to be running at the configured endpoint:

image

Mac OS

brew install llama.cpp

Any other OS

Either use the latest binaries or build llama.cpp from source. For more information how to run the llama.cpp server, please refer to the Wiki.

llama.cpp settings

Here are recommended settings, depending on the amount of VRAM that you have:

  • More than 16GB VRAM:

    llama-server \
        -hf ggml-org/Qwen2.5-Coder-7B-Q8_0-GGUF \
        --port 8012 -ngl 99 -fa -ub 1024 -b 1024 \
        --ctx-size 0 --cache-reuse 256
  • Less than 16GB VRAM:

    llama-server \
        -hf ggml-org/Qwen2.5-Coder-3B-Q8_0-GGUF \
        --port 8012 -ngl 99 -fa -ub 1024 -b 1024 \
        --ctx-size 0 --cache-reuse 256
  • Less than 8GB VRAM:

    llama-server \
        -hf ggml-org/Qwen2.5-Coder-1.5B-Q8_0-GGUF \
        --port 8012 -ngl 99 -fa -ub 1024 -b 1024 \
        --ctx-size 0 --cache-reuse 256

You can use any other FIM-compatible model that your system can handle. By default, the models downloaded with the -hf flag are stored in:

  • Mac OS: ~/Library/Caches/llama.cpp/
  • Linux: ~/.cache/llama.cpp
  • Windows: LOCALAPPDATA

Recommended LLMs

The plugin requires FIM-compatible models: HF collection

Examples

TODO: add examples

Implementation details

The extension aims to be very simple and lightweight and at the same time to provide high-quality and performant local FIM completions, even on consumer-grade hardware.

Other IDEs

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for llama.vscode

Similar Open Source Tools

For similar tasks

For similar jobs