[![PyPI version](https://badge.fury.io/py/lmft.svg)](https://badge.fury.io/py/lmft)
[![Downloads](https://pepy.tech/badge/lmft)](https://pepy.tech/project/lmft)
[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![GitHub contributors](https://img.shields.io/github/contributors/shibing624/lmft.svg)](https://github.com/shibing624/lmft/graphs/contributors)
[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
[![python_version](https://img.shields.io/badge/Python-3.8%2B-green.svg)](requirements.txt)
[![GitHub issues](https://img.shields.io/github/issues/shibing624/lmft.svg)](https://github.com/shibing624/lmft/issues)
[![Wechat Group](http://vlog.sfyc.ltd/wechat_everyday/wxgroup_logo.png?imageView2/0/w/60/h/20)](#Contact)
# LMFT: Language Model Fine-Tuning
Language Model Fine-Tuning, for ChatGLM, BELLE, LLaMA fine-tuning.
**lmft**实现了ChatGLM-6B的模型FineTune。
**Guide**
- [Feature](#Feature)
- [Evaluation](#Evaluation)
- [Demo](#Demo)
- [Install](#install)
- [Usage](#usage)
- [Contact](#Contact)
- [Reference](#reference)
# Feature
### ChatGLM
#### [THUDM/chatglm-6b](https://huggingface.co/THUDM/chatglm-6b) 模型的Finetune训练
[THUDM/ChatGLM-6B](https://github.com/THUDM/ChatGLM-6B)放出的默认模型,模型以 FP16 精度加载,模型运行需要 13GB 显存,训练需要 22GB 显存(batch_size=2)。
# Evaluation
### 纠错能力比较
### 对话能力比较
# Demo
HuggingFace Demo: https://huggingface.co/spaces/shibing624/lmft
![](docs/hf.png)
run example: [examples/gradio_demo.py](examples/gradio_demo.py) to see the demo:
```shell
python examples/gradio_demo.py
```
# Install
```shell
pip install -U lmft
```
or
```shell
pip install -r requirements.txt
git clone https://github.com/shibing624/lmft.git
cd lmft
pip install --no-deps .
```
# Usage
## Use LoRA model
release lora model:
1. 中文拼写纠错(CSC)模型 [shibing624/chatglm-6b-csc-zh-lora](https://huggingface.co/shibing624/chatglm-6b-csc-zh-lora)
```python
from lmft import ChatGlmModel
model = ChatGlmModel("chatglm", "THUDM/chatglm-6b", lora_name="shibing624/chatglm-6b-csc-zh-lora")
r = model.predict(["对下面中文拼写纠错:\n少先队员因该为老人让坐。\n答:"])
print(r) # ['少先队员应该为老人让座。\n错误字:因,坐']
```
## 训练ChatGLM-6B模型
支持自定义数据集,数据集格式参考[examples/data/test.tsv](examples/data/test.tsv)。
example: [examples/training_chatglm_demo.py](examples/training_chatglm_demo.py)
```python
import sys
sys.path.append('..')
from lmft import ChatGlmModel
def finetune_demo():
m = ChatGlmModel('chatglm', "THUDM/chatglm-6b", args={'use_lora': True})
m.train_model(train_data='shibing624/alpaca-zh')
r = m.predict(['给出三个保持健康的秘诀。', '描述原子的结构。'])
print(r)
response, history = m.chat("你好", history=[])
print(response)
response, history = m.chat("晚上睡不着应该怎么办", history=history)
print(response)
def origin_chat_demo():
m = ChatGlmModel('chatglm', "THUDM/chatglm-6b", args={'use_lora': False})
response, history = m.chat("你好", history=[])
print(response)
response, history = m.chat("晚上睡不着应该怎么办", history=history)
print(response)
if __name__ == '__main__':
origin_chat_demo()
finetune_demo()
```
output:
```
问:你好
答:你好
[Round 1]
问:晚上睡不着应该怎么办
答: 想要在晚上入睡,但并不容易,可以参考下述技巧:
1. 睡前放松:尝试进行一些放松的活动,如冥想、深呼吸或瑜伽,帮助放松身心,减轻压力和焦虑。
2. 创造一个舒适的睡眠环境:保持房间安静、黑暗和凉爽,使用舒适的床垫和枕头,确保床铺干净整洁。
3. 规律的睡眠时间表:保持规律的睡眠时间表,尽可能在同一时间上床,并创造一个固定的起床时间。
4. 避免刺激性食物和饮料:避免在睡前饮用含咖啡因的饮料,如咖啡、茶和可乐,以及吃辛辣、油腻或难以消化的食物。
5. 避免过度使用电子设备:避免在睡前使用电子设备,如手机、电视和电脑。这些设备会发出蓝光,干扰睡眠。
如果尝试了这些技巧仍然无法入睡,建议咨询医生或睡眠专家,获取更专业的建议和帮助。
```
## Dataset
1. 50万条中文ChatGPT指令数据集:[BelleGroup/train_0.5M_CN](https://huggingface.co/datasets/BelleGroup/train_0.5M_CN)
2. 100万条中文ChatGPT指令数据集:[BelleGroup/train_1M_CN](https://huggingface.co/datasets/BelleGroup/train_1M_CN)
3. 5万条英文ChatGPT指令数据集:[50k English Stanford Alpaca dataset](https://github.com/tatsu-lab/stanford_alpaca#data-release)
4. 2万条中文ChatGPT指令数据集:[shibing624/alpaca-zh](https://huggingface.co/datasets/shibing624/alpaca-zh)
5. 69万条中文指令数据集(Belle50万条+Guanaco19万条):[Chinese-Vicuna/guanaco_belle_merge_v1.0](https://huggingface.co/datasets/Chinese-Vicuna/guanaco_belle_merge_v1.0)
## FAQ
1. 问:为啥没有`int4`量化模型的Finetune训练?
答:THUDM放出了2个int4量化模型,分别是 [THUDM/chatglm-6b-int4](https://huggingface.co/THUDM/chatglm-6b-int4) 和
[THUDM/chatglm-6b-int4-qe](https://huggingface.co/THUDM/chatglm-6b-int4-qe) 模型,是基于
[THUDM/ChatGLM-6B](https://github.com/THUDM/ChatGLM-6B) 的int4并对Embedding量化后的模型,模型运行仅需要 4.3GB 显存。
训练方法参考官方给出的[P-tuning方法](https://github.com/THUDM/ChatGLM-6B/blob/main/ptuning/README.md),INT4 量化模型的训练最低只需 6.7G 显存。
# Contact
- Issue(建议):[![GitHub issues](https://img.shields.io/github/issues/shibing624/lmft.svg)](https://github.com/shibing624/lmft/issues)
- 邮件我:xuming: xuming624@qq.com
- 微信我:加我*微信号:xuming624, 备注:姓名-公司-NLP* 进NLP交流群。
<img src="docs/wechat.jpeg" width="200" />
# Citation
如果你在研究中使用了lmft,请按如下格式引用:
APA:
```latex
Xu, M. lmft: Lanauge Model Fine-Tuning toolkit (Version 1.1.2) [Computer software]. https://github.com/shibing624/lmft
```
BibTeX:
```latex
@misc{lmft,
author = {Xu, Ming},
title = {lmft: Language Model Fine-Tuning toolkit},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/shibing624/lmft}},
}
```
# License
lmft授权协议为 [The Apache License 2.0](LICENSE),可免费用做商业用途。请在产品说明中附加lmft的链接和授权协议。
- ChatGLM-6B的模型权重仅限学术研究用,具体见[MODEL_LICENSE](https://github.com/THUDM/ChatGLM-6B/blob/main/MODEL_LICENSE)
- LLAMA的模型权重仅限学术研究用,具体见[LICENSE](https://huggingface.co/decapoda-research/llama-13b-hf/blob/main/LICENSE)
# Contribute
项目代码还很粗糙,如果大家对代码有所改进,欢迎提交回本项目,在提交之前,注意以下两点:
- 在`tests`添加相应的单元测试
- 使用`python -m pytest -v`来运行所有单元测试,确保所有单测都是通过的
之后即可提交PR。
# Reference
- [LianjiaTech/BELLE](https://github.com/LianjiaTech/BELLE)
- [tatsu-lab/stanford_alpaca](https://github.com/tatsu-lab/stanford_alpaca)
- [huggingface/peft](https://github.com/huggingface/peft)
Raw data
{
"_id": null,
"home_page": "https://github.com/shibing624/lmft",
"name": "lmft",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7.0",
"maintainer_email": "",
"keywords": "lmft,GPT2,transformers,pytorch,language model",
"author": "XuMing",
"author_email": "xuming624@qq.com",
"download_url": "https://files.pythonhosted.org/packages/7a/2f/02a3244d3deb94e461c1df0affbd99aca5abcf76f991e2ea4f655b41e511/lmft-0.2.5.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/lmft.svg)](https://badge.fury.io/py/lmft)\n[![Downloads](https://pepy.tech/badge/lmft)](https://pepy.tech/project/lmft)\n[![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md)\n[![GitHub contributors](https://img.shields.io/github/contributors/shibing624/lmft.svg)](https://github.com/shibing624/lmft/graphs/contributors)\n[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)\n[![python_version](https://img.shields.io/badge/Python-3.8%2B-green.svg)](requirements.txt)\n[![GitHub issues](https://img.shields.io/github/issues/shibing624/lmft.svg)](https://github.com/shibing624/lmft/issues)\n[![Wechat Group](http://vlog.sfyc.ltd/wechat_everyday/wxgroup_logo.png?imageView2/0/w/60/h/20)](#Contact)\n\n# LMFT: Language Model Fine-Tuning\nLanguage Model Fine-Tuning, for ChatGLM, BELLE, LLaMA fine-tuning.\n\n\n**lmft**\u5b9e\u73b0\u4e86ChatGLM-6B\u7684\u6a21\u578bFineTune\u3002\n\n\n**Guide**\n- [Feature](#Feature)\n- [Evaluation](#Evaluation)\n- [Demo](#Demo)\n- [Install](#install)\n- [Usage](#usage)\n- [Contact](#Contact)\n- [Reference](#reference)\n\n\n# Feature\n### ChatGLM\n#### [THUDM/chatglm-6b](https://huggingface.co/THUDM/chatglm-6b) \u6a21\u578b\u7684Finetune\u8bad\u7ec3\n\n[THUDM/ChatGLM-6B](https://github.com/THUDM/ChatGLM-6B)\u653e\u51fa\u7684\u9ed8\u8ba4\u6a21\u578b\uff0c\u6a21\u578b\u4ee5 FP16 \u7cbe\u5ea6\u52a0\u8f7d\uff0c\u6a21\u578b\u8fd0\u884c\u9700\u8981 13GB \u663e\u5b58\uff0c\u8bad\u7ec3\u9700\u8981 22GB \u663e\u5b58(batch_size=2)\u3002\n\n\n# Evaluation\n\n### \u7ea0\u9519\u80fd\u529b\u6bd4\u8f83\n\n### \u5bf9\u8bdd\u80fd\u529b\u6bd4\u8f83\n\n# Demo\n\nHuggingFace Demo: https://huggingface.co/spaces/shibing624/lmft\n\n![](docs/hf.png)\n\nrun example: [examples/gradio_demo.py](examples/gradio_demo.py) to see the demo:\n```shell\npython examples/gradio_demo.py\n```\n\n# Install\n```shell\npip install -U lmft\n```\n\nor\n\n```shell\npip install -r requirements.txt\n\ngit clone https://github.com/shibing624/lmft.git\ncd lmft\npip install --no-deps .\n```\n\n# Usage\n## Use LoRA model\nrelease lora model: \n1. \u4e2d\u6587\u62fc\u5199\u7ea0\u9519\uff08CSC\uff09\u6a21\u578b [shibing624/chatglm-6b-csc-zh-lora](https://huggingface.co/shibing624/chatglm-6b-csc-zh-lora)\n\n\n```python\nfrom lmft import ChatGlmModel\nmodel = ChatGlmModel(\"chatglm\", \"THUDM/chatglm-6b\", lora_name=\"shibing624/chatglm-6b-csc-zh-lora\")\nr = model.predict([\"\u5bf9\u4e0b\u9762\u4e2d\u6587\u62fc\u5199\u7ea0\u9519\uff1a\\n\u5c11\u5148\u961f\u5458\u56e0\u8be5\u4e3a\u8001\u4eba\u8ba9\u5750\u3002\\n\u7b54\uff1a\"])\nprint(r) # ['\u5c11\u5148\u961f\u5458\u5e94\u8be5\u4e3a\u8001\u4eba\u8ba9\u5ea7\u3002\\n\u9519\u8bef\u5b57\uff1a\u56e0\uff0c\u5750']\n```\n\n## \u8bad\u7ec3ChatGLM-6B\u6a21\u578b\n\n\u652f\u6301\u81ea\u5b9a\u4e49\u6570\u636e\u96c6\uff0c\u6570\u636e\u96c6\u683c\u5f0f\u53c2\u8003[examples/data/test.tsv](examples/data/test.tsv)\u3002\n\n\nexample: [examples/training_chatglm_demo.py](examples/training_chatglm_demo.py)\n\n```python\nimport sys\n\nsys.path.append('..')\nfrom lmft import ChatGlmModel\n\n\ndef finetune_demo():\n m = ChatGlmModel('chatglm', \"THUDM/chatglm-6b\", args={'use_lora': True})\n m.train_model(train_data='shibing624/alpaca-zh')\n r = m.predict(['\u7ed9\u51fa\u4e09\u4e2a\u4fdd\u6301\u5065\u5eb7\u7684\u79d8\u8bc0\u3002', '\u63cf\u8ff0\u539f\u5b50\u7684\u7ed3\u6784\u3002'])\n print(r)\n response, history = m.chat(\"\u4f60\u597d\", history=[])\n print(response)\n response, history = m.chat(\"\u665a\u4e0a\u7761\u4e0d\u7740\u5e94\u8be5\u600e\u4e48\u529e\", history=history)\n print(response)\n\n\ndef origin_chat_demo():\n m = ChatGlmModel('chatglm', \"THUDM/chatglm-6b\", args={'use_lora': False})\n response, history = m.chat(\"\u4f60\u597d\", history=[])\n print(response)\n response, history = m.chat(\"\u665a\u4e0a\u7761\u4e0d\u7740\u5e94\u8be5\u600e\u4e48\u529e\", history=history)\n print(response)\n\n\nif __name__ == '__main__':\n origin_chat_demo()\n finetune_demo()\n```\n\noutput:\n```\n\u95ee:\u4f60\u597d\n\u7b54:\u4f60\u597d\n\n[Round 1]\n\u95ee:\u665a\u4e0a\u7761\u4e0d\u7740\u5e94\u8be5\u600e\u4e48\u529e\n\u7b54: \u60f3\u8981\u5728\u665a\u4e0a\u5165\u7761,\u4f46\u5e76\u4e0d\u5bb9\u6613,\u53ef\u4ee5\u53c2\u8003\u4e0b\u8ff0\u6280\u5de7:\n1. \u7761\u524d\u653e\u677e:\u5c1d\u8bd5\u8fdb\u884c\u4e00\u4e9b\u653e\u677e\u7684\u6d3b\u52a8,\u5982\u51a5\u60f3\u3001\u6df1\u547c\u5438\u6216\u745c\u4f3d,\u5e2e\u52a9\u653e\u677e\u8eab\u5fc3,\u51cf\u8f7b\u538b\u529b\u548c\u7126\u8651\u3002\n2. \u521b\u9020\u4e00\u4e2a\u8212\u9002\u7684\u7761\u7720\u73af\u5883:\u4fdd\u6301\u623f\u95f4\u5b89\u9759\u3001\u9ed1\u6697\u548c\u51c9\u723d,\u4f7f\u7528\u8212\u9002\u7684\u5e8a\u57ab\u548c\u6795\u5934,\u786e\u4fdd\u5e8a\u94fa\u5e72\u51c0\u6574\u6d01\u3002\n3. \u89c4\u5f8b\u7684\u7761\u7720\u65f6\u95f4\u8868:\u4fdd\u6301\u89c4\u5f8b\u7684\u7761\u7720\u65f6\u95f4\u8868,\u5c3d\u53ef\u80fd\u5728\u540c\u4e00\u65f6\u95f4\u4e0a\u5e8a,\u5e76\u521b\u9020\u4e00\u4e2a\u56fa\u5b9a\u7684\u8d77\u5e8a\u65f6\u95f4\u3002\n4. \u907f\u514d\u523a\u6fc0\u6027\u98df\u7269\u548c\u996e\u6599:\u907f\u514d\u5728\u7761\u524d\u996e\u7528\u542b\u5496\u5561\u56e0\u7684\u996e\u6599,\u5982\u5496\u5561\u3001\u8336\u548c\u53ef\u4e50,\u4ee5\u53ca\u5403\u8f9b\u8fa3\u3001\u6cb9\u817b\u6216\u96be\u4ee5\u6d88\u5316\u7684\u98df\u7269\u3002\n5. \u907f\u514d\u8fc7\u5ea6\u4f7f\u7528\u7535\u5b50\u8bbe\u5907:\u907f\u514d\u5728\u7761\u524d\u4f7f\u7528\u7535\u5b50\u8bbe\u5907,\u5982\u624b\u673a\u3001\u7535\u89c6\u548c\u7535\u8111\u3002\u8fd9\u4e9b\u8bbe\u5907\u4f1a\u53d1\u51fa\u84dd\u5149,\u5e72\u6270\u7761\u7720\u3002\n\u5982\u679c\u5c1d\u8bd5\u4e86\u8fd9\u4e9b\u6280\u5de7\u4ecd\u7136\u65e0\u6cd5\u5165\u7761,\u5efa\u8bae\u54a8\u8be2\u533b\u751f\u6216\u7761\u7720\u4e13\u5bb6,\u83b7\u53d6\u66f4\u4e13\u4e1a\u7684\u5efa\u8bae\u548c\u5e2e\u52a9\u3002\n```\n\n\n## Dataset\n1. 50\u4e07\u6761\u4e2d\u6587ChatGPT\u6307\u4ee4\u6570\u636e\u96c6\uff1a[BelleGroup/train_0.5M_CN](https://huggingface.co/datasets/BelleGroup/train_0.5M_CN)\n2. 100\u4e07\u6761\u4e2d\u6587ChatGPT\u6307\u4ee4\u6570\u636e\u96c6\uff1a[BelleGroup/train_1M_CN](https://huggingface.co/datasets/BelleGroup/train_1M_CN)\n3. 5\u4e07\u6761\u82f1\u6587ChatGPT\u6307\u4ee4\u6570\u636e\u96c6\uff1a[50k English Stanford Alpaca dataset](https://github.com/tatsu-lab/stanford_alpaca#data-release)\n4. 2\u4e07\u6761\u4e2d\u6587ChatGPT\u6307\u4ee4\u6570\u636e\u96c6\uff1a[shibing624/alpaca-zh](https://huggingface.co/datasets/shibing624/alpaca-zh)\n5. 69\u4e07\u6761\u4e2d\u6587\u6307\u4ee4\u6570\u636e\u96c6(Belle50\u4e07\u6761+Guanaco19\u4e07\u6761)\uff1a[Chinese-Vicuna/guanaco_belle_merge_v1.0](https://huggingface.co/datasets/Chinese-Vicuna/guanaco_belle_merge_v1.0)\n\n## FAQ\n1. \u95ee\uff1a\u4e3a\u5565\u6ca1\u6709`int4`\u91cf\u5316\u6a21\u578b\u7684Finetune\u8bad\u7ec3\uff1f\n\n\u7b54\uff1aTHUDM\u653e\u51fa\u4e862\u4e2aint4\u91cf\u5316\u6a21\u578b\uff0c\u5206\u522b\u662f [THUDM/chatglm-6b-int4](https://huggingface.co/THUDM/chatglm-6b-int4) \u548c \n[THUDM/chatglm-6b-int4-qe](https://huggingface.co/THUDM/chatglm-6b-int4-qe) \u6a21\u578b\uff0c\u662f\u57fa\u4e8e\n[THUDM/ChatGLM-6B](https://github.com/THUDM/ChatGLM-6B) \u7684int4\u5e76\u5bf9Embedding\u91cf\u5316\u540e\u7684\u6a21\u578b\uff0c\u6a21\u578b\u8fd0\u884c\u4ec5\u9700\u8981 4.3GB \u663e\u5b58\u3002\n\n\u8bad\u7ec3\u65b9\u6cd5\u53c2\u8003\u5b98\u65b9\u7ed9\u51fa\u7684[P-tuning\u65b9\u6cd5](https://github.com/THUDM/ChatGLM-6B/blob/main/ptuning/README.md)\uff0cINT4 \u91cf\u5316\u6a21\u578b\u7684\u8bad\u7ec3\u6700\u4f4e\u53ea\u9700 6.7G \u663e\u5b58\u3002\n\n\n# Contact\n\n- Issue(\u5efa\u8bae)\uff1a[![GitHub issues](https://img.shields.io/github/issues/shibing624/lmft.svg)](https://github.com/shibing624/lmft/issues)\n- \u90ae\u4ef6\u6211\uff1axuming: xuming624@qq.com\n- \u5fae\u4fe1\u6211\uff1a\u52a0\u6211*\u5fae\u4fe1\u53f7\uff1axuming624, \u5907\u6ce8\uff1a\u59d3\u540d-\u516c\u53f8-NLP* \u8fdbNLP\u4ea4\u6d41\u7fa4\u3002\n\n<img src=\"docs/wechat.jpeg\" width=\"200\" />\n\n\n# Citation\n\n\u5982\u679c\u4f60\u5728\u7814\u7a76\u4e2d\u4f7f\u7528\u4e86lmft\uff0c\u8bf7\u6309\u5982\u4e0b\u683c\u5f0f\u5f15\u7528\uff1a\n\nAPA:\n```latex\nXu, M. lmft: Lanauge Model Fine-Tuning toolkit (Version 1.1.2) [Computer software]. https://github.com/shibing624/lmft\n```\n\nBibTeX:\n```latex\n@misc{lmft,\n author = {Xu, Ming},\n title = {lmft: Language Model Fine-Tuning toolkit},\n year = {2023},\n publisher = {GitHub},\n journal = {GitHub repository},\n howpublished = {\\url{https://github.com/shibing624/lmft}},\n}\n```\n\n# License\n\n\nlmft\u6388\u6743\u534f\u8bae\u4e3a [The Apache License 2.0](LICENSE)\uff0c\u53ef\u514d\u8d39\u7528\u505a\u5546\u4e1a\u7528\u9014\u3002\u8bf7\u5728\u4ea7\u54c1\u8bf4\u660e\u4e2d\u9644\u52a0lmft\u7684\u94fe\u63a5\u548c\u6388\u6743\u534f\u8bae\u3002\n\n- ChatGLM-6B\u7684\u6a21\u578b\u6743\u91cd\u4ec5\u9650\u5b66\u672f\u7814\u7a76\u7528\uff0c\u5177\u4f53\u89c1[MODEL_LICENSE](https://github.com/THUDM/ChatGLM-6B/blob/main/MODEL_LICENSE)\n- LLAMA\u7684\u6a21\u578b\u6743\u91cd\u4ec5\u9650\u5b66\u672f\u7814\u7a76\u7528\uff0c\u5177\u4f53\u89c1[LICENSE](https://huggingface.co/decapoda-research/llama-13b-hf/blob/main/LICENSE)\n\n# Contribute\n\u9879\u76ee\u4ee3\u7801\u8fd8\u5f88\u7c97\u7cd9\uff0c\u5982\u679c\u5927\u5bb6\u5bf9\u4ee3\u7801\u6709\u6240\u6539\u8fdb\uff0c\u6b22\u8fce\u63d0\u4ea4\u56de\u672c\u9879\u76ee\uff0c\u5728\u63d0\u4ea4\u4e4b\u524d\uff0c\u6ce8\u610f\u4ee5\u4e0b\u4e24\u70b9\uff1a\n\n - \u5728`tests`\u6dfb\u52a0\u76f8\u5e94\u7684\u5355\u5143\u6d4b\u8bd5\n - \u4f7f\u7528`python -m pytest -v`\u6765\u8fd0\u884c\u6240\u6709\u5355\u5143\u6d4b\u8bd5\uff0c\u786e\u4fdd\u6240\u6709\u5355\u6d4b\u90fd\u662f\u901a\u8fc7\u7684\n\n\u4e4b\u540e\u5373\u53ef\u63d0\u4ea4PR\u3002\n\n# Reference\n- [LianjiaTech/BELLE](https://github.com/LianjiaTech/BELLE)\n- [tatsu-lab/stanford_alpaca](https://github.com/tatsu-lab/stanford_alpaca)\n- [huggingface/peft](https://github.com/huggingface/peft)",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Language Model Fine-tuning Toolkit (LMFT)",
"version": "0.2.5",
"split_keywords": [
"lmft",
"gpt2",
"transformers",
"pytorch",
"language model"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7a2f02a3244d3deb94e461c1df0affbd99aca5abcf76f991e2ea4f655b41e511",
"md5": "237e4b5127249ad6d26768a4ad6c53b6",
"sha256": "613673f29425c81df6ee88f23f8de6acf41caee3d924c160bbb0623ef11f4c7c"
},
"downloads": -1,
"filename": "lmft-0.2.5.tar.gz",
"has_sig": false,
"md5_digest": "237e4b5127249ad6d26768a4ad6c53b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7.0",
"size": 30174,
"upload_time": "2023-04-06T12:51:54",
"upload_time_iso_8601": "2023-04-06T12:51:54.595957Z",
"url": "https://files.pythonhosted.org/packages/7a/2f/02a3244d3deb94e461c1df0affbd99aca5abcf76f991e2ea4f655b41e511/lmft-0.2.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-06 12:51:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "shibing624",
"github_project": "lmft",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "loguru",
"specs": []
},
{
"name": "transformers",
"specs": [
[
">=",
"4.27.1"
]
]
},
{
"name": "datasets",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "cpm_kernels",
"specs": []
},
{
"name": "peft",
"specs": []
},
{
"name": "gradio",
"specs": []
}
],
"lcname": "lmft"
}