返回指南
推理服务 / 中等

LocalAI

One OpenAI-compatible endpoint for text, vision, speech and image models, GPU optional

一手来源
用你的硬件检查这个运行时的适配模型选设备或显卡,只显示该运行时在这台机器上的适配路径。
难度中等安装难度
平台5cpu · apple · nvidia · amd · intel
APIOpenAI + Anthropic + ElevenLabs-compatible:8080
01 / 安装与运行

安装方式取决于操作系统。以下命令是示例或模板,请先替换占位符并核对量化版本、文件格式、驱动和运行时支持;内存适配不保证部署成功。

  1. 1
    安装docker run -ti --name local-ai -p 8080:8080 localai/localai:latest
  2. 2
    启动模型local-ai run <verified-gallery-or-Hugging-Face-model-name>
  3. 3
    接入你的应用

    OpenAI + Anthropic + ElevenLabs-compatible · :8080. 除非添加认证与网络访问控制,否则请将服务绑定到 localhost。

注意

Backends are separate images pulled on demand, so the first run needs network access and disk. Pick the image tag for your accelerator; the CPU image does not silently enable a GPU. On Apple silicon, v4.10.0 (2026-09-17) is the minimum practical build: its release notes list a startup crash on Apple M5 as fixed.

02 / 兼容模型

代表性开放权重模型

Alibaba Qwen

Qwen3.6 27B

27BQ4 / NVFP4 estimate
估算内存
~18.5 GB
上下文
262K native
Alibaba Qwen

Qwen3.8 27B

27BQ4 estimate
估算内存
~19.5 GB
上下文
262K native
Alibaba Qwen

Qwen3.6 35B-A3B

35B3B active · Q4 / NVFP4 MoE
估算内存
~25 GB
上下文
262K native
DeepSeek

DeepSeek V4 Flash

284B13B active · Official FP4 + FP8 mixed
估算内存
~176 GB
上下文
1M native
Google

Gemma 3 1B

1BINT4 / GGUF Q4
估算内存
~1.4 GB
上下文
32K
Meta

Llama 3.2 3B

3BGGUF Q4
估算内存
~2.8 GB
上下文
128K