当前位置:   article > 正文

【LocalAI】(3):LocalAI本地使用Model gallery,对qwen模型进行配置,使用modescope源下载,本地运行速度快。特别简单!_localai下载慢

localai下载慢

1,关于localai

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配置说明

2,使用 qwen 的配置,使用modescope源

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|>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/Li_阴宅/article/detail/798773
推荐阅读
相关标签
  

闽ICP备14008679号