diz
目前开源的大模型项目普遍来说都有如下问题:
- 安装环境复杂,需要安装大量依赖包,而且依赖包版本之间有冲突,导致安装失败
- 模型往往存放在 huggeface 上,下载速度慢,且不符合国情,使用 git lfs 也不方便
本项目重点解决上述 2 个问题,提供一个简单的模型下载和使用的框架,方便大家快速使用。 总结一句话来说就是:目标就是干出一个大模型的 homebrew。
安装
pip install diz
系统依赖:
- tmux
- git
- 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
- 检查当前目录是否存在
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 命令,根据生成本地模型调用代码
Metadata
Release files for diz 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diz-1.0.2.tar.gz | 7.6 kB | Without provenance | Details for diz-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diz-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for diz-1.0.2-py3-none-any.whl |
Total release size: 17.2 kB
Release files / diz-1.0.2.tar.gz
| Download URL | diz-1.0.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
122122d15d5dad2212ebc5c06889c17f57468170fcd0661df6e24674209983c3
|
|
BLAKE2b-256 checksum How to use checksums |
88b7a017b70979cc2c04587bd1d9dadd1fba8ebb3f2c76fcdb34bb8632dccb78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / diz-1.0.2-py3-none-any.whl
| Download URL | diz-1.0.2-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd077502ee65d9673431ee3b58bea564fbd9ae2c46f631e905ae9c2f71e0daa4
|
|
BLAKE2b-256 checksum How to use checksums |
f1ec3bff5175edbd87b684358bf9d899646a1e0022eeae090268f91c31c11d94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for diz 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.