Skip to content

Commit 00ab93b

Browse files
authored
【开源实习】blip模型微调 (#1896)
1 parent 72425c2 commit 00ab93b

File tree

3 files changed

+1124
-0
lines changed

3 files changed

+1124
-0
lines changed

llm/finetune/blip/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# FineTune BLIP
2+
- reference [repo](https://github.com/eeshashetty/captionary-api)
3+
4+
## Requirements
5+
- python 3.9
6+
- mindspore 2.3.1
7+
- mindnlp 0.4.1
8+
9+
## args for training the model
10+
- args.device_target : Ascend
11+
- args.device_id
12+
- args.model_name_or_path : 'Salesforce/blip-image-captioning-base' or the path to the model
13+
- args.dataset_name_or_path : 'eeshclusive/captionary-dataset' or the path to the data directory
14+
- args.batch_size : batch size
15+
- args.max_eps : maximum number of epochs
16+
- args.save_path : path to save the model, if not provided the model will not be saved, such as './outputs/'
17+
18+
## Results
19+
### my results on mindspore
20+
20 epochs:
21+
- train loss: 0.0132
22+
- val loss: 0.0126
23+
24+
requirements:
25+
- Ascend 910B
26+
- Python 3.9
27+
- MindSpore 2.3.1
28+
- MindNLP 0.4.1
29+
30+
### my results on pytorch
31+
10 epochs:
32+
- train loss: 0.0135
33+
- val loss: 0.0125
34+
35+
requirements:
36+
- GPU 1080ti
37+
- CUDA 11.1.1
38+
- Python 3.9
39+
- Pytorch 1.10.2
40+
- Transformers 4.45.2
41+
42+
### Original results from the repo
43+
20 epochs:
44+
- train loss: 1.3579
45+
- val loss: 1.3584
46+
47+
### 其他
48+
- 训练loss可视化见results_visible.ipynb文件
49+
- 愿仓库的损失不知为何特别高,复现时训练参数保持一致,但pytorch开启了混合精度,而mindnlp暂不支持,所以pytorch训练收敛的更快一些

0 commit comments

Comments
 (0)