llm-ls  by huggingface

LSP server for LLM-powered code completion

Created 2 years ago
820 stars

Top 43.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an LLM-powered Language Server Protocol (LSP) server designed to enhance code completion and development workflows. It targets developers seeking intelligent, context-aware code suggestions within their IDEs, abstracting the complexities of LLM interaction for IDE extension developers.

How It Works

llm-ls acts as a central hub for LLM-driven code intelligence. It leverages the current file's content to construct context-aware prompts, supporting "fill-in-the-middle" capabilities and managing tokenization to respect model context windows. The server parses code Abstract Syntax Trees (ASTs) to intelligently determine the type of completion needed (single-line, multi-line, or none).

Quick Start & Requirements

  • Install: pip install llm-ls
  • Prerequisites: Python 3.8+, compatible LLM backend (Hugging Face Inference API, text-generation-inference, ollama, OpenAI-compatible APIs).
  • Docs: https://github.com/huggingface/llm-ls

Highlighted Details

  • Supports multiple LLM backends including Hugging Face Inference API, TGI, Ollama, and OpenAI-compatible APIs.
  • AST parsing for intelligent completion type determination.
  • Context window management via tokenization.
  • Telemetry for potential model retraining (data stored locally).

Maintenance & Community

  • Actively developed by Hugging Face.
  • Roadmap includes multi-file context, prompt tuning, and filtering bad suggestions.

Licensing & Compatibility

  • License: Apache 2.0.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

This project is explicitly marked as a work in progress, with the potential for broken functionality. Support for Jupyter integration is currently missing.

Health Check
Last Commit

3 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
1
Star History
16 stars in the last 30 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP AI at Vercel; Founder of Turborepo; Author of Formik, TSDX), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
8 more.

llm-vscode by huggingface

0.1%
1k
VSCode extension for LLM-powered code development
Created 2 years ago
Updated 1 year ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
15 more.

codellama by meta-llama

0.0%
16k
Inference code for CodeLlama models
Created 2 years ago
Updated 1 year ago
Feedback? Help us improve.