LocalAI  by mudler

Open-source OpenAI alternative for local AI inference

created 2 years ago
34,230 stars

Top 1.0% on sourcepulse

GitHubView on GitHub
Project Summary

LocalAI provides a self-hosted, local-first, open-source alternative to OpenAI's API, enabling users to run various AI models (LLMs, image, audio) on consumer-grade hardware without requiring a GPU. It serves as a drop-in replacement REST API compatible with OpenAI's specifications, making advanced AI accessible for developers and researchers.

How It Works

LocalAI acts as a unified inference server, supporting multiple model architectures including GGUF, Transformers, and Diffusers. It leverages backends like llama.cpp, whisper.cpp, and stable-diffusion.cpp to efficiently run models locally. This approach allows for flexibility in model selection and deployment, offering a cost-effective and privacy-preserving solution for AI tasks.

Quick Start & Requirements

  • Installation:
    • Via script: curl https://localai.io/install.sh | sh
    • Via Docker (CPU): docker run -ti --name local-ai -p 8080:8080 localai/localai:latest-cpu
    • Via Docker (Nvidia GPU): docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-12
  • Model Loading: Use local-ai run <model_identifier> (e.g., local-ai run llama-3.2-1b-instruct:q4_k_m, local-ai run huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf).
  • Prerequisites: Docker, or a compatible OS for the installer script. GPU support requires NVIDIA drivers and CUDA 12+.
  • Documentation: https://localai.io/
  • Quickstart: https://localai.io/basics/getting_started/

Highlighted Details

  • Supports text generation, audio synthesis, speech-to-text, image generation, voice cloning, and P2P inferencing.
  • Features a built-in WebUI for model management and interaction.
  • Offers distributed and federated inference capabilities for scaling.
  • Integrates with popular tools like Langchain, Home Assistant, and various bots.

Maintenance & Community

  • Actively maintained by Ettore Di Giacinto and a community of contributors.
  • Recent updates include new backends, WebUI overhauls, and the addition of LocalAGI and LocalRecall to the stack.
  • Community support via Discord and GitHub Discussions.
  • Roadmap available: https://localai.io/roadmap/

Licensing & Compatibility

  • MIT License. Permissive for commercial use and integration into closed-source projects.

Limitations & Caveats

  • Performance is dependent on consumer-grade hardware, which may limit throughput for demanding tasks compared to cloud-based solutions.
  • While GPU is not required, performance is significantly enhanced with NVIDIA GPUs.
Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
138
Issues (30d)
61
Star History
2,169 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
5 more.

LibreChat by danny-avila

0.8%
29k
Enhanced ChatGPT clone for self-hosting
created 2 years ago
updated 1 day ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), and
13 more.

open-webui by open-webui

0.9%
105k
Self-hosted AI platform for local LLM deployment
created 1 year ago
updated 1 day ago
Feedback? Help us improve.