winglian commited on
Commit
7f7cd8a
1 Parent(s): 73fee11

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +58 -0
  2. config.json +40 -0
  3. configs/pretrain-llava-llama.yml +66 -0
  4. mm_projector.bin +3 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: NousResearch/Llama-2-7b-hf
3
+ tags:
4
+ - generated_from_trainer
5
+ model-index:
6
+ - name: out
7
+ results: []
8
+ ---
9
+
10
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
11
+ should probably proofread and complete it, then remove this comment. -->
12
+
13
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
14
+ # out
15
+
16
+ This model is a pretrained version of the llava multimodal projector for [NousResearch/Llama-2-7b-hf](https://huggingface.co/NousResearch/Llama-2-7b-hf) on the liuhaotian/LLaVA-Pretrain dataset.
17
+
18
+ ## Model description
19
+
20
+ More information needed
21
+
22
+ ## Intended uses & limitations
23
+
24
+ More information needed
25
+
26
+ ## Training and evaluation data
27
+
28
+ More information needed
29
+
30
+ ## Training procedure
31
+
32
+ ### Training hyperparameters
33
+
34
+ The following hyperparameters were used during training:
35
+ - learning_rate: 0.002
36
+ - train_batch_size: 64
37
+ - eval_batch_size: 64
38
+ - seed: 42
39
+ - distributed_type: multi-GPU
40
+ - num_devices: 2
41
+ - gradient_accumulation_steps: 2
42
+ - total_train_batch_size: 256
43
+ - total_eval_batch_size: 128
44
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
45
+ - lr_scheduler_type: cosine
46
+ - lr_scheduler_warmup_steps: 10
47
+ - num_epochs: 1
48
+
49
+ ### Training results
50
+
51
+
52
+
53
+ ### Framework versions
54
+
55
+ - Transformers 4.34.1
56
+ - Pytorch 2.0.1+cu118
57
+ - Datasets 2.14.6
58
+ - Tokenizers 0.14.1
config.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "NousResearch/Llama-2-7b-hf",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "bos_token_id": 1,
8
+ "eos_token_id": 2,
9
+ "freeze_mm_mlp_adapter": null,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 4096,
12
+ "image_aspect_ratio": "square",
13
+ "image_grid_pinpoints": null,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 11008,
16
+ "max_position_embeddings": 4096,
17
+ "mm_hidden_size": 1024,
18
+ "mm_projector_type": "mlp2x_gelu",
19
+ "mm_use_im_patch_token": false,
20
+ "mm_use_im_start_end": false,
21
+ "mm_vision_select_feature": "patch",
22
+ "mm_vision_select_layer": -2,
23
+ "mm_vision_tower": "openai/clip-vit-large-patch14",
24
+ "model_type": "llava",
25
+ "num_attention_heads": 32,
26
+ "num_hidden_layers": 32,
27
+ "num_key_value_heads": 32,
28
+ "pad_token_id": 0,
29
+ "pretraining_tp": 1,
30
+ "rms_norm_eps": 1e-05,
31
+ "rope_scaling": null,
32
+ "rope_theta": 10000.0,
33
+ "tie_word_embeddings": false,
34
+ "torch_dtype": "float16",
35
+ "transformers_version": "4.34.1",
36
+ "tune_mm_mlp_adapter": true,
37
+ "use_cache": false,
38
+ "use_mm_proj": true,
39
+ "vocab_size": 32000
40
+ }
configs/pretrain-llava-llama.yml ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ base_model: NousResearch/Llama-2-7b-hf
2
+ model_type: LlamaForCausalLM
3
+ tokenizer_type: LlamaTokenizer
4
+ is_llama_derived_model: true
5
+
6
+ # multimodal pretrain
7
+ multimodal: true
8
+ mm_vision_tower: openai/clip-vit-large-patch14
9
+ tune_mm_mlp_adapter: true
10
+ mm_freeze_backbone: true
11
+ mm_vision_select_layer: -2
12
+ mm_projector_type: mlp2x_gelu
13
+ mm_image_folder: ./llava/
14
+ mm_use_im_patch_token: false
15
+
16
+ load_in_8bit: false
17
+ load_in_4bit: false
18
+ strict: false
19
+
20
+ datasets:
21
+ - path: ./data/blip_laion_cc_sbu_558k.json
22
+ dataset_prepared_path:
23
+ val_set_size: 0.0
24
+ output_dir: ./out
25
+
26
+ sequence_len: 2048
27
+ sample_packing: false
28
+ pad_to_sequence_len: true
29
+
30
+ wandb_project: axolotl-llava
31
+ wandb_entity: oaaic
32
+ wandb_watch:
33
+ wandb_run_id:
34
+ wandb_log_model:
35
+
36
+ gradient_accumulation_steps: 2
37
+ micro_batch_size: 64
38
+ num_epochs: 1
39
+ optimizer: adamw_torch
40
+ lr_scheduler: cosine
41
+ learning_rate: 0.002
42
+
43
+ train_on_inputs: false
44
+ group_by_length: false
45
+ bf16: true
46
+ fp16: false
47
+ tf32: false
48
+
49
+ gradient_checkpointing: true
50
+ early_stopping_patience:
51
+ resume_from_checkpoint:
52
+ local_rank:
53
+ logging_steps: 1
54
+ xformers_attention:
55
+ flash_attention: true
56
+
57
+ warmup_steps: 10
58
+ eval_steps:
59
+ save_steps: 0.1
60
+ debug:
61
+ deepspeed: deepspeed/zero2.json
62
+ weight_decay: 0.0
63
+ fsdp:
64
+ fsdp_config:
65
+ special_tokens:
66
+ pad_token: "<unk>"
mm_projector.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7431876b5d53f710db1b266e3325bf8e1e090456c1fb248af2abf33afe1269bc
3
+ size 41961085