Skip to main content

用来构建大模型环境的工具

Project description

diz

目前开源的大模型项目普遍来说都有如下问题:

  1. 安装环境复杂,需要安装大量依赖包,而且依赖包版本之间有冲突,导致安装失败
  2. 模型往往存放在 huggeface 上,下载速度慢,且不符合国情,使用 git lfs 也不方便

本项目重点解决上述 2 个问题,提供一个简单的模型下载和使用的框架,方便大家快速使用。 总结一句话来说就是:目标就是干出一个大模型的 homebrew。

安装

pip install diz

系统依赖:

  1. tmux
  2. git
  3. git lfs

使用

使用 install 来安装模型

diz install ChatGLM2-6B --path /root/autodl-tmp/chatglm2

当前支持对的模型有:

  • ChatGLM2-6B

--path 如果不填写,程序会提醒你输入,如果填写了,程序会自动创建目录

使用 setup 来使用自定义配置安装模型

diz setup

根据提示输入你要安装的目录和配置文件的 url 即可 配置文件写法可参考:ChatGLM2-6B

也可以一句话安装:

diz setup --path /root/autodl-tmp/chatglm2 --pkg https://gist.githubusercontent.com/mjason/a616dcb8f9fd09fb2c7fb18ff3bb6279/raw/bb530a7d4101edf8aa474883d1f54a6aef58bc44/chatglm2-6b.yml

使用 venv 来进入虚拟环境

diz venv
  1. 检查当前目录是否存在 venv 目录存在就进入

虚拟环境

  • diz shell 进入虚拟环境,如果使用 diz shell --auto-venv 进入的同时会执行 diz venv 进入虚拟环境
  • diz shell --mode o 退出虚拟环境,环境进入后台
  • diz shell --mode k 退出虚拟环境,环境进入后台,且 kill 掉原来的进程

你也可以使用 Ctrl + b d 来退出虚拟tmux环境,让任务在后台运行

路线图

  • 提供 install 命令,统一安装源
  • 提供 venv 指令,快速进入对应的虚拟环境
  • 提供 generate 命令,根据生成本地模型调用代码

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diz-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diz-1.0.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file diz-1.0.0.tar.gz.

File metadata

  • Download URL: diz-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for diz-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f3f2effcd8d4bcf91558c29198b2092ff7261c4ecfdac1c463f205e1e900c5c9
MD5 8065b48db681851813fdca03a319fe75
BLAKE2b-256 6093f852e7b886239fcbedb32e0e042c2fb46358e311b494ba32b39fedfe73b3

See more details on using hashes here.

File details

Details for the file diz-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: diz-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for diz-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5d96464c0f66188fa2636461dd1190c84f018dd91a33edd4b9cd76b4d54118e
MD5 7b90e9cd040562ce4455cccc2a863ba9
BLAKE2b-256 3f9772cb7473d7fcd9faf228b3b16aac5ecb5f7002595c82edf7f213a49fde97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page