Skip to content

Commit

Permalink
repo templete
Browse files Browse the repository at this point in the history
  • Loading branch information
pppppM committed Jul 11, 2023
1 parent f342759 commit 786b0a9
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,7 @@ work_dirs/
# Pytorch
*.pth
*.py~
*.sh~
*.sh~

# mim
*.mim
2 changes: 1 addition & 1 deletion .pre-commit-config-zh-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ repos:
rev: v3.0.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
args: ["--py36-plus"]
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# MMChat

### Installation

1. 安装 Pytorch (https://pytorch.org/get-started/locally/)
2. 安装 MMChat

```
pip install -r requirements.txt
pip install -e .
```

### TODO

##### 基础功能

- [x] MMEngine 加载 HF Dataset
- [x] MMEngine 加载 HF Model & Tokenizer
- [ ] DeepSpeed Config
- [ ] FSDP Config
- [ ] MMLU 评测
- [ ] PTH -> HF Checkpoint 转换脚本
- [ ] Attention Score 可视化

##### 算法

- [x] SFT
- [ ] Alpaca SFT Setting & 精度对齐
- [x] QLora SFT
- [ ] QLora SFT Setting & 精度对齐
- [ ] QLora RLHF
- [ ] Distill Finetune
12 changes: 9 additions & 3 deletions mmchat/registry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) OpenMMLab. All rights reserved.
"""mmchat provides 21 registry nodes to support using modules across
projects. Each node is a child of the root registry in MMEngine.
"""mmchat provides 21 registry nodes to support using modules across projects.
Each node is a child of the root registry in MMEngine.
More details can be found at
https://mmengine.readthedocs.io/en/latest/tutorials/registry.html.
Expand Down Expand Up @@ -160,6 +160,12 @@
locations=['mmchat.models'],
)

# Large Language Model
LLM = Registry(
'llm',
locations=['mmchat.models'],
)

#######################################################################
# mmchat.evaluation #
#######################################################################
Expand Down Expand Up @@ -192,4 +198,4 @@
'vis_backend',
parent=MMENGINE_VISBACKENDS,
locations=['mmchat.visualization'],
)
)
2 changes: 1 addition & 1 deletion mmchat/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def parse_version_info(version_str):
return tuple(version_info)


version_info = parse_version_info(__version__)
version_info = parse_version_info(__version__)
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bitsandbytes==0.39.1
mmengine==0.8.1
peft==0.4.0.dev0
transformers==4.30.2

0 comments on commit 786b0a9

Please sign in to comment.