Guluji
官方使用文档

LocalAI README

mudler/LocalAI · MIT · 源码版本 0a40b3b4

上手导读

安装与准备

按硬件选择安装方式,从一个模型开始。

试用示例

团队已有使用兼容接口的应用时,可尝试把其中一个请求接到本地服务,逐步替换聊天、语音等后端。

官方 READMEREADME.md

LocalAI: your own AI, on your own hardware. Agents, documents and every kind of model, for you and your team. The LocalAI llama mascot wears sunglasses.

Latest release MIT license Join the LocalAI Discord

Documentation | Quick start | Discord | FAQ | Blog

LocalAI runs open models for chat, images, speech and video on your own machines. The API speaks the OpenAI and Anthropic formats. Your team gets chats, files and documents on top, and the assistant can write and run code. It runs on a laptop, a server, in a container or on Kubernetes, and a distributed mode spreads models over several machines. No GPU needed, though a GPU makes it faster.

  • Chats, agents, Projects and a team: chats and saved agents that use tools, MCP servers, files, Knowledge collections and skills. Projects group chats, files, notes and agents around one piece of work. Users, roles, quotas and shared folders for a team (development builds).
  • Add-ons: an admin installs add-ons from a library: Office, Sandbox, Tables, chat apps, mail, calendar and more.
  • Every kind of model, one API: text, vision, speech to text, text to speech, images, video, music and sound, embeddings and reranking, in the OpenAI and Anthropic formats (with ElevenLabs-compatible text to speech and sound generation), with more than 80 backends. Each backend is its own image, pulled only when a model needs it.
  • Your hardware: NVIDIA, AMD, Intel, Apple Silicon, Vulkan, NVIDIA Jetson or CPU only. The server, the models and your files stay on your own machines.

LocalAI is a small core with an API, chats and agents, files, collections, team sharing, a model gallery and an MCP client and server for agent tools. Backends such as llama.cpp, vLLM, MLX and whisper.cpp plug in on one side, add-ons such as Office, Sandbox, Tables and chat apps on the other. It runs on CPU, NVIDIA, AMD, Intel, Apple Silicon and Vulkan.

Created by Ettore Di Giacinto and maintained by the LocalAI team.

Quick start

Download for macOS (DMG, Apple silicon) Download for Linux (AppImage, x86-64) Download for Linux (AppImage, ARM64) Download for Windows (installer, x64, experimental)

The buttons download the desktop app from the latest release. For other ways to install, see Install LocalAI.

Script (Linux, and macOS on Apple Silicon): it downloads the release binary for your machine and checks it against the release checksums.

curl -sSL https://localai.io/install.sh | sh
local-ai
# open http://localhost:8080 and install a model from there

The script installs the program and does not start it; local-ai starts the server. To run a model directly, name it, for example local-ai run gemma-4-e2b-it-qat-q4_0, a small Google Gemma 4 model for CPUs (4.3 GB to download: 3.35 GB for the model and 0.99 GB for the image projector).

Container (Docker, podman, ...):

docker run -ti --name local-ai -p 8080:8080 localai/localai:latest

Desktop app: it installs, updates, starts and stops the server for you and shows the web interface in its own window, on macOS and Linux (Windows is experimental). Use the download buttons above. See the desktop app guide.

The install script and the latest image give 5.0.0.

Then open http://localhost:8080. To restart an existing container, use docker start -i local-ai. More ways to install: Install LocalAI.

GPU images (NVIDIA, AMD, Intel, Vulkan)
# NVIDIA, CUDA 13
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-13

# NVIDIA, CUDA 12
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-gpu-nvidia-cuda-12

# NVIDIA Jetson ARM64 (CUDA 12, for AGX Orin and similar)
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-nvidia-l4t-arm64

# NVIDIA Jetson ARM64 (CUDA 13, for DGX Spark)
docker run -ti --name local-ai -p 8080:8080 --gpus all localai/localai:latest-nvidia-l4t-arm64-cuda-13

# AMD (ROCm)
docker run -ti --name local-ai -p 8080:8080 --device=/dev/kfd --device=/dev/dri --group-add=video localai/localai:latest-gpu-hipblas

# Intel (oneAPI)
docker run -ti --name local-ai -p 8080:8080 --device=/dev/dri/card1 --device=/dev/dri/renderD128 localai/localai:latest-gpu-intel

# Vulkan
docker run -ti --name local-ai -p 8080:8080 localai/localai:latest-gpu-vulkan

LocalAI detects your GPU and downloads the matching backend. See GPU Acceleration.

Load a model:

# From the model gallery (list it with `local-ai models list` or on the Models page of the web UI)
local-ai run gemma-4-e2b-it-qat-q4_0
# From Hugging Face
local-ai run huggingface://TheBloke/phi-2-GGUF/phi-2.Q8_0.gguf
# From the Ollama OCI registry
local-ai run ollama://gemma:2b
# From a standard OCI registry (for example Docker Hub)
local-ai run oci://localai/phi-2:latest

To talk to a running server from the terminal, start the built-in agent in another shell. It asks you to approve anything that changes state. See the Terminal agent docs.

local-ai chat --model gemma-4-e2b-it-qat-q4_0

More in the Quickstart.

What you can do

Area What it gives you
Chats Conversations the server keeps, with saved agents that use tools, MCP, skills and files, triggers, and chat apps
Add-ons Office, Sandbox, Tables, chat apps, mail, calendar and more install from a library and run beside the server
Text generation llama.cpp, transformers, vllm ... and more, with an OpenAI-compatible tools API and constrained grammars
Music and sound Make music and sound effects from a text prompt with /v1/sound-generation. See text to audio
Speech Text to audio, audio to text, voice activity detection (Silero-VAD) and the Realtime API for speech-to-speech
Images, video and vision Image generation, video generation, the Vision API and object detection
Search Embeddings and a reranker
Operations API key auth, user quotas and roles, distributed mode (PostgreSQL + NATS) and P2P
Models and backends Models from Hugging Face and a Backend Gallery to install or remove backends on the fly, plus the integrated web UI

LocalAI has more than 80 backends. Hardware acceleration covers NVIDIA (CUDA 12 and 13), AMD (ROCm), Intel (oneAPI/SYCL), Apple Silicon (Metal), Vulkan and NVIDIA Jetson (L4T). See the Backend and Model Compatibility Table.

Backends we build

Most backends wrap an upstream engine such as llama.cpp or vLLM. We wrote 18 of them ourselves: native C, C++ and GGML engines with no Python at inference.

Backend What it does
vllm.cpp From-scratch C++20 port of vLLM for text generation: paged KV cache, continuous batching, prefix caching, safetensors + GGUF loading, engine-enforced structured output, on CPU, CUDA, Metal and Vulkan. Also serves MiniMax-H3 joint video+audio generation
parakeet.cpp C++/GGML port of NVIDIA NeMo Parakeet ASR (tdt/ctc/rnnt/hybrid), with cache-aware streaming transcription
moss-transcribe.cpp C++/GGML port of OpenMOSS MOSS-Transcribe-Diarize: joint long-form transcription, speaker diarization and timestamping in a single pass
moss-tts.cpp C++/GGML port of the OpenMOSS MOSS-TTS family: text-to-speech (MOSS-TTS-Local v1.5, 48 kHz stereo) with reference-audio voice cloning, through the MOSS-Audio-Tokenizer neural codec
magpie-tts.cpp C++/GGML port of NVIDIA's Magpie TTS Multilingual 357M: 22.05 kHz mono text-to-speech in 5 voices and 9+ languages, with the NanoCodec neural codec and tokenizer/G2P embedded in a single GGUF
ced.cpp C++/GGML port of the CED audio-tagging models: sound-event classification (527-class AudioSet) over REST and the realtime API for live recognition
voice-detect.cpp Speaker recognition and voice analysis (ECAPA-TDNN, WeSpeaker, ERes2Net, CAM++, wav2vec2 age/gender/emotion), replacing the Python speaker-recognition backend
vibevoice.cpp Native port of Microsoft VibeVoice for TTS (voice cloning) and long-form ASR with speaker diarization
rf-detr.cpp Native RF-DETR object detection and instance segmentation
locate-anything.cpp Open-vocabulary object detection and visual grounding (LocateAnything-3B)
depth-anything.cpp Depth Anything 3 monocular metric depth + camera pose estimation
face-detect.cpp Face detection, recognition, demographics and anti-spoofing (SCRFD/ArcFace, YuNet/SFace), replacing the Python insightface backend
timestral.cpp Mistral Timestral time-series forecasting: quantile forecasts with covariates, on the CPU
trellis2.cpp C++/GGML port of Microsoft TRELLIS.2: single-image to textured 3D mesh (GLB with PBR materials)
gem-x.cpp Live human motion capture with SOMA and SMPL pose streams (CPU/Vulkan)
kimodo.cpp C++/GGML text-to-motion on CPU and Vulkan, exported as animated skeleton GLB
privacy-filter.cpp Standalone GGML PII/NER token-classification engine powering LocalAI's PII redaction tier
LocalVQE Joint acoustic echo cancellation, noise suppression, and dereverberation

The team also ships a vector store, local-store, in the main tree, and maintains apex-quant, a per-tensor, per-layer quantization recipe for Mixture-of-Experts models that exploits their structural sparsity to produce GGUFs matching or beating Q8_0 quality. They run out of the box on stock llama.cpp.

Latest news

  • November 2026: LocalAI 5.0: Projects, a desktop app for macOS and Linux, Office and Sandbox add-ons, a Files page, team sharing and Pages. Release post · Release notes

  • October 2026: LocalAI 4.12.1: A security fix for the policy on URLs that users give. Redirect targets are now checked on every hop. Release notes

  • October 2026: LocalAI 4.12.0: A redesigned web UI, streaming voice answers, decision routing with the /v1/decisions API, image upscaling in Studio and Qdrant stores. Release notes

  • October 2026: LocalAI 4.11.0: Audio scenes with transcription, speaker labels, and sound detection. Also the Decisions API (/v1/systemone), model failover chains, signed OCI galleries, and Kimodo text-to-animation. Release notes

  • September 2026: LocalAI 4.10.0: A fleet operations dashboard, one credentials file for private model sources, and local-ai benchmark for measuring model latency and throughput. Release notes

  • August 2026: LocalAI 4.9.0: Deny-by-default authentication, opt-in chat context compression, unified model and backend management, and MiniMax-H3 video generation with audio. Release notes

Older news and the full release notes: GitHub Releases and the blog.

Resources

Team

LocalAI is maintained by a small team of humans, together with the wider community of contributors.

A huge thank you to everyone who contributes code, reviews PRs, files issues, and helps users in Discord. See the full contributors list.

Sponsors

Support the project by becoming a backer or sponsor. A huge thank you to our sponsors, who cover CI expenses, and to the individual sponsors listed on GitHub and buymeacoffee. Special shout out to drikster80.

License

MIT. LocalAI is created by Ettore Di Giacinto and maintained by the LocalAI team. The LocalAI name, logo and mascot art are not covered by the MIT license: all rights reserved. See BRAND-USAGE.md for what you may do with them.

Citation and acknowledgements
@misc{localai,
  author = {Ettore Di Giacinto},
  title = {LocalAI: the open source AI engine},
  year = {2026},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/mudler/LocalAI}},
}

LocalAI couldn't have been built without the help of great software already available from the community: llama.cpp, stanford_alpaca, llama-go, alpaca.cpp, Stable-Diffusion-NCNN, whisper.cpp, piper and exo (MLX distributed auto-parallel sharding).

Contributors
配套文档BRAND-USAGE.md

Using the LocalAI name, logo and mascot

The LocalAI code is MIT licensed. The LocalAI name, the logo and the mascot art are not part of that license: all rights reserved. The code and the art live in the same repository, but each keeps its own terms. This page says what you may do with the logo and the mascot without asking.

You may

  • Show the logo or the mascot in an article, a blog post, a talk, a slide, a video or a community post that is about LocalAI or that mentions it.
  • Link to LocalAI with the logo, for example in a list of tools you use.
  • Use the files as they are: the original colors, the original proportions, and a clear space around them.
  • Make the logo smaller or larger, in one ratio only.

You may not

  • Change the logo or the mascot. No recoloring, stretching, rotating, outlines, shadows, glows or redrawing.
  • Use them in a way that suggests that LocalAI made, approved or sponsors your product, service or event.
  • Put them on products, merchandise or app icons without written permission.
  • Use them in a name, a domain, a package name or the logo of another project.
  • Use them in anything misleading, hateful, illegal or unrelated to LocalAI.
  • Train or fine-tune a model to copy the mascot, or sell the art.

The code

Nothing on this page limits what the MIT license allows for the code. You can fork, modify and redistribute the code under that license. If you ship a fork under a different name, use your own name and your own logo.

Ask first

For anything outside this page, such as merchandise, a partner logo wall, a press kit, or a product that bundles LocalAI, open an issue or write to the maintainers and wait for a yes.

原作者与许可证

文档来自 mudler/LocalAI 的上述提交,保留原文并调整了站内排版与链接。

查看仓库许可证原文 ↗
MIT License

Copyright (c) 2023-2025 Ettore Di Giacinto (mudler@localai.io)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
返回 LocalAI 项目分析