欢迎来到 Xinference!#

Xorbits Inference (Xinference) 是一个开源平台,用于简化各种 AI 模型的运行和集成。借助 Xinference,您可以使用任何开源 LLM、嵌入模型和多模态模型在云端或本地环境中运行推理,并创建强大的 AI 应用。

使用 Xinference 开发真实场景的 AI 应用#

from xinference.client import Client

client = Client("http://localhost:9997")
model = client.get_model("MODEL_UID")

# Chat to LLM
model.chat(
   prompt="What is the largest animal?",
   system_prompt="You are a helpful assistant",
   generate_config={"max_tokens": 1024}
)

# Chat to VL model
model.chat(
   chat_history=[
     {
        "role": "user",
        "content": [
           {"type": "text", "text": "What’s in this image?"},
           {
              "type": "image_url",
              "image_url": {
                 "url": "http://i.epochtimes.com/assets/uploads/2020/07/shutterstock_675595789-600x400.jpg",
              },
           },
        ],
     }
  ],
  generate_config={"max_tokens": 1024}
)

入门指南#

安装 Xinference

在 Linux、Windows 和 macOS 上安装 Xinference。

立即体验!

首先在本地计算机上运行 Xinference。

探索模型

探索 Xinference 支持的各种模型。

注册你自己的模型

注册模型权重,并转化为 API

探索 API#

聊天 & 生成

学习如何在 Xinference 中与 LLM聊天。

工具

学习如何将 LLM 与外部工具连接起来。

嵌入

学习如何在 Xinference 中创建文本嵌入。

重排序

学习如何在 Xinference 中使用重排序模型。

图像

学习如何使用Xinference生成图像。

视觉

学习如何使用 LLM 处理图像。

音频

学习如何使用 Xinference 将音频转换为文本或将文本转换为音频。

参与我们#

最新资讯

在 Twitter 上关注我们

阅读知乎博客

寻求帮助

微信社区

Slack 社区

在 Github 上提 issue

贡献

在 Github 上提 PR