AIKit

AIKit AIKit AIKit ,、、(LLMs)。: (Inference):AIKit LocalAI,。LocalAI OpenAI API REST API...

2 分钟阅读

AIKit

AIKit 简介

AIKit 是一个一站式平台,旨在快速启动和托管、部署、构建和微调大型语言模型(LLMs)。它主要提供两个核心功能:

  1. 推理(Inference) :AIKit 利用 LocalAI,支持广泛的推理能力和格式。LocalAI 提供一个与 OpenAI API 兼容的替代 REST API,因此您可以使用任何兼容 OpenAI API 的客户端,例如 Kubectl AIChatbot-UI,发送请求到开源的 LLMs!

  2. 微调(Fine Tuning) :AIKit 提供了一个可扩展的微调接口。它支持 Unsloth,提供快速、内存高效和易于使用的微调体验。

👉 完整文档请见 AIKit 网站

特性

使用场景

AIKit 主要用于以下场景:

  • 推理应用 :可以在本地或云环境中使用 AIKit 提供的预制模型进行推理,无需额外的GPU。
  • 微调模型 :根据具体应用需要,使用 AIKit 微调接口定制模型。
  • 兼容性 :与 OpenAI API 兼容,可以与任何兼容 OpenAI API 的应用或工具集成。
  • 多模态支持 :处理和生成多模态数据,例如文本和图像。
  • 容器化部署 :通过 Docker 和 Kubernetes 容易部署和管理模型。

快速开始示例

以下是一个在本地机器上快速启动的示例:

docker run -d –rm -p 8080:8080 ghcr.io/sozercan/llama3:8b

发送请求进行推理:

curl http://localhost:8080/v1/chat/completions -H “Content-Type: application/json” -d ‘{ “model”: “llama-3-8b-instruct”, “messages”: [{“role”: “user”, “content”: “explain kubernetes in a sentence”}] }’

返回结果示例:

{“created”:1713494426,“object”:“chat.completion”,“id”:“fce01ee0-7b5a-452d-8f98-b6cb406a1067”,“model”:“llama-3-8b-instruct”,“choices”:[{“index”:0,“finish_reason”:“stop”,“message”:{“role”:“assistant”,“content”:“Kubernetes is an open-source container orchestration system that automates the deployment, scaling, and management of applications and services, allowing developers to focus on writing code rather than managing infrastructure.”}}],“usage”:{“prompt_tokens”:0,“completion_tokens”:0,“total_tokens”:0}}

更多信息和详细使用指南请访问 AIKit 网站