星火人设工具 —— 代码优化版
自我认知工具链是一个基于讯飞星火开源13B大模型做的场景训练方案,iflytekspark-13B模型已深度优化人设的数据适应,能在1000条数据上达到模型自身通用人设的覆盖及变更。
本工具作为我的修改版主要有以下增强:
- 代码优化,很多代码不合理的地方进行了修改
- 性能增强,调用大模型使用了异步 io
- 引入了 dotenv 来处理环境变量问题
- 惯例优于配置,处理了命令行体验问题
- 作为独立的 pip 包来发放而不是作为代码仓进行发放
- 支持断点续传
还没有做的:
- 目前没有兼容星火官方 websocket api,我使用了一个代理用来处理,保持和 OpenAI 的兼容性(主要是不想造轮子,后续有可能推动转换项目开源和为了更好处理异步 io
- 本工具最终目标是给星火开放平台的 train 平台做人设工具数据生成,推荐采用开放平台的 lora 来进行设定改进
python 版本要求 3.10 以上
使用说明
- 安装
pip install yany - 初始化项目
yany init - prompt 生成
yany g p - dataset 生成
yany g qa
注意,一定要修改项目目录的 .env 文件,填入自己的 key
一般来说一个项目需要进入你要的文件夹,然后执行 2、3、4 步。训练有问题请联系讯飞云平台,如果你是用开源的讯飞模型那么请自行解决。
开源协议
MIT
Metadata
Release files for yany 0.3.0
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 |
|---|---|---|---|---|
| yany-0.3.0.tar.gz | 63.2 kB | Without provenance | Details for yany-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yany-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for yany-0.3.0-py3-none-any.whl |
Total release size: 127.5 kB
Release files / yany-0.3.0.tar.gz
| Download URL | yany-0.3.0.tar.gz |
|---|---|
| Size | 63.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8904c71263472f531f4c977e2ad51465ea783fc7c1c20bb76bed624ab3bc7262
|
|
BLAKE2b-256 checksum How to use checksums |
ecdadcb69de83a47baa786ce0ce706d81eb21c2382398328347f60ebe67be743
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / yany-0.3.0-py3-none-any.whl
| Download URL | yany-0.3.0-py3-none-any.whl |
|---|---|
| Size | 64.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ef7231a68c0fb5ff31315d09960d12cf2282292fb9f3322646dcba8c24ef537
|
|
BLAKE2b-256 checksum How to use checksums |
9d93723ec979587a11fc46a4bfe578695d9dbf1c48aaa4ccef2033b071bd83a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for yany 0.3.0
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.