StarCycle commited on
Commit
bebf664
β€’
1 Parent(s): 593a09f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -0
README.md CHANGED
@@ -1,3 +1,85 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ ## Model
5
+ llava-clip-internlm2-1_8b-pretrain-v1 is a LLaVA checkpoint finetuned from pinternlm2-chat-1_8b](https://huggingface.co/internlm/internlm2-chat-1_8b) and [CLIP-ViT-Large-patch14-336](https://huggingface.co/openai/clip-vit-large-patch14-336) with [LLaVA-Pretrain](liuhaotian/LLaVA-Pretrain) by [Xtuner](https://github.com/InternLM/xtuner).
6
+
7
+ #### I just finished the pretrain phase of the model. I will release the full finetuned model soon. You can also finetune your own version based on the checkpoint here.
8
+
9
+ ## Installation
10
+ ```
11
+ git clone https://github.com/InternLM/xtuner
12
+ pip install -e ./xtuner[deepspeed]
13
+ ```
14
+
15
+ ## Common Errors
16
+ 1.
17
+ ```
18
+ command error: 'libGL.so.1: cannot open shared object file: No such file or directory'!
19
+ ```
20
+ You can solve it by
21
+ ```
22
+ # For Ubuntu
23
+ sudo apt-get update
24
+ sudo apt-get install libgl1-mesa-glx
25
+
26
+ # For CentOS and Fedora
27
+ sudo yum install mesa-libGL
28
+ ```
29
+
30
+ 2.
31
+ ```
32
+ Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.
33
+ Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.
34
+ ```
35
+ You can solve it by reinstall numpy.
36
+
37
+ 3.
38
+ ```
39
+ ImportError:
40
+ InternLM2Converter requires the protobuf library but it was not found in your environment. Checkout the instructions on the
41
+ ```
42
+ You just need
43
+ ```
44
+ pip install protobuf
45
+ ```
46
+ 4.
47
+ To use tensorboard to visualize the training loss curve:
48
+ ```
49
+ pip install future tensorboard
50
+ ```
51
+
52
+ ## Data prepration
53
+ 1. File structure
54
+
55
+ ```
56
+ ./data/llava_data
57
+ β”œβ”€β”€ LLaVA-Pretrain
58
+ Β Β  β”œβ”€β”€ blip_laion_cc_sbu_558k.json
59
+ Β Β  β”œβ”€β”€ blip_laion_cc_sbu_558k_meta.json
60
+ Β Β  └── images
61
+
62
+ ```
63
+
64
+ 2. Pretrain Data
65
+
66
+ LLaVA-Pretrain
67
+
68
+ ```shell
69
+ # Make sure you have git-lfs installed (https://git-lfs.com)
70
+ git lfs install
71
+ git clone https://huggingface.co/datasets/liuhaotian/LLaVA-Pretrain --depth=1
72
+ ```
73
+
74
+ 3. Finetune Data
75
+ Please check the final release version
76
+
77
+ ## Cheers! Now train your own model!
78
+ 1. Alignment module pretraining
79
+ ```
80
+ NPROC_PER_NODE=8 xtuner train ./llava_internlm2_chat_7b_dinov2_e1_gpu8_pretrain.py --deepspeed deepspeed_zero2
81
+ ```
82
+ The checkpoint and tensorboard logs are saved by default in ./work_dirs/. I only train it for 1 epoch to be same as the original LLaVA paper. Some researches also report that training for multiple epochs will make the model overfit the training dataset and perform worse in other domains.
83
+
84
+ 2. Instruction following fine-tuning
85
+ Please check the final release version