tuanio commited on
Commit
e13052e
β€’
1 Parent(s): 61e297b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - Vi-VLM/Vista
5
+ language:
6
+ - vi
7
+ ---
8
+
9
+ - Deploying Gradio: Going to MoE-LLaVA serving tutorial and follow, or quickly, can use πŸ‘‡πŸ‘‡πŸ‘‡
10
+ ```bash
11
+ deepspeed --include localhost:0 moellava/serve/gradio_web_server.py \
12
+ --model-path="tuanio/moe-llava-qwen1.5-0.5b-vista_reasoning-2ep"
13
+ ```
14
+
15
+ Or CLI:
16
+ ```bash
17
+ deepspeed --include localhost:0 moellava/serve/cli.py \
18
+ --model-path "tuanio/moe-llava-qwen1.5-0.5b-vista_reasoning-2ep" \
19
+ --image-file "data/llm_data/coco2017/train2017/000000391895.jpg"
20
+ ```
21
+
22
+ ---
23
+
24
+ - Training script:
25
+ ```bash
26
+ moe_mode="sparse"
27
+ num_experts=4
28
+ top_k_experts=2
29
+ use_residual=False
30
+ router_aux_loss_coef=0.01
31
+
32
+ ROOT_DATA=data/llm_data
33
+
34
+ WANDB_PROJECT=chart-vision-llm CUDA_VISIBLE_DEVICES=0,1,2,3,4 deepspeed --include localhost:2,3,4 moellava/train/train_mem.py \
35
+ --moe_enable True --num_experts ${num_experts} --top_k_experts ${top_k_experts} --capacity_factor 1.5 \
36
+ --moe_mode ${moe_mode} --use_residual ${use_residual} --router_aux_loss_coef ${router_aux_loss_coef} \
37
+ --train_modules mlp.gate_proj mlp.up_proj mlp.down_proj wg \
38
+ --deepspeed ./scripts/zero2.json \
39
+ --model_name_or_path ./checkpoints/ft-llava-qwen1.5-0.5b-vista_llava-merged-2ep \
40
+ --version qwen \
41
+ --data_path $ROOT_DATA/json_files/vista_reasoning.json \
42
+ --image_folder $ROOT_DATA/coco2017/train2017 \
43
+ --image_tower google/siglip-base-patch16-256-multilingual \
44
+ --image_projector_type mlp2x_gelu \
45
+ --mm_vision_select_layer -2 \
46
+ --mm_use_im_start_end False \
47
+ --mm_use_im_patch_token False \
48
+ --image_aspect_ratio pad \
49
+ --group_by_modality_length True \
50
+ --bf16 True \
51
+ --output_dir ./checkpoints/ft-moe-llava-qwen1.5-0.5b-vista_reasoning-2ep \
52
+ --num_train_epochs 1 \
53
+ --per_device_train_batch_size 8 \
54
+ --per_device_eval_batch_size 4 \
55
+ --gradient_accumulation_steps 2 \
56
+ --evaluation_strategy "no" \
57
+ --save_strategy "steps" \
58
+ --save_steps 24000 \
59
+ --save_total_limit 1 \
60
+ --learning_rate 2e-5 \
61
+ --weight_decay 0. \
62
+ --warmup_ratio 0.03 \
63
+ --lr_scheduler_type "cosine" \
64
+ --logging_steps 50 \
65
+ --tf32 True \
66
+ --model_max_length 2048 \
67
+ --gradient_checkpointing True \
68
+ --dataloader_num_workers 8 \
69
+ --lazy_preprocess True \
70
+ --report_to wandb \
71
+ --cache_dir "./cache_dir" \
72
+ --run_name ft-moe-llava-qwen1.5-0.5b-vista_reasoning-2ep
73
+ ```