赞
踩
LocalAI 是一个用于本地推理的,与 OpenAI API 规范兼容的 REST API。
它允许您在本地使用消费级硬件运行 LLM(不仅如此),支持与 ggml 格式兼容的多个模型系列。支持CPU硬件/GPU硬件。
模型启动方法:
https://localai.io/models/
项目地址:
https://gitee.com/fly-llm/localai-run-llm
【LocalAI】(3):超级简单!在linux上使用一个二进制文件,成功运行embeddings和qwen-1.5大模型,速度特别快,有gitee配置说明
modelscope.cn 进行下载,速度会更快。
参考了一个人家的问题,支持qwen大模型:
https://github.com/mudler/LocalAI/issues/1110
本身localai的后端实现就是 llama.cpp ,所以也可以支持qwen大模型。
支持gguf的量化版本。
# https://github.com/mudler/LocalAI/issues/1110
# Model name.
# The model name is used to identify the model in the API calls.
name: "qwen-1.5-1.8b"
description: |
qwen-1.5-1.8b
license: "Apache 2.0"
urls:
- https://github.com/QwenLM/Qwen1.5
- https://modelscope.cn/models/qwen/Qwen1.5-1.8B-Chat-GGUF/summary
config_file: |
backend: llama
parameters:
model: qwen1_5-0_5b-chat-q4_0.gguf
top_k: 80
temperature: 1
top_p: 0.7
context_size: 1024
template:
completion: qwen-1.5-completion
chat: qwen-1.5-chat
chat-message: qwen-1.5-chat-message
files:
- filename: "qwen1_5-0_5b-chat-q4_0.gguf"
sha256: "46a9de8316739892e2721fdc49f8353155e4c1bcfa0b17867cb590d2dfdf1d99"
uri: "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-0.5B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-0_5b-chat-q4_0.gguf"
prompt_templates:
- name: "qwen-1.5-completion"
content: |
{{.Input}}
- name: "qwen-1.5-chat"
content: |
{{.Input}}
<|im_start|>assistant
- name: "qwen-1.5-chat-message"
content: |
<|im_start|>{{if eq .RoleName "assistant"}}assistant{{else if eq .RoleName "system"}}system{{else if eq .RoleName "user"}}user{{end}}
{{if .Content}}{{.Content}}{{end}}
<|im_end|>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。