Views
No views yet

| Model | HF Link | Training Log |
|---|---|---|
| LLaVA-OV-1.5-4B-Instruct | 🤗 HF / 4B-Instruct | 📈 Tensorboard |
| LLaVA-OV-1.5-8B-Instruct | 🤗 HF / 8B-Instruct | 📈 Tensorboard |
| LLaVA-OV-1.5-4B-Base | 🤗 HF / 4B-Base | 📈 Tensorboard |
| LLaVA-OV-1.5-8B-Base | 🤗 HF / 8B-Base | Uploading… |

| Description | Link | Status |
|---|---|---|
| LLaVA-OV-1.5-Mid-Training-85M | 🤗HF / Mid-Training 85M | Uploading… |
| LLaVA-OV-1.5-Instruct | 🤗HF / Insturct-Data | Uploading… |

1from transformers import AutoTokenizer, AutoProcessor, AutoModelForCausalLM
2from qwen_vl_utils import process_vision_info
3model_path = "lmms-lab/LLaVA-OneVision-1.5-8B-Instruct"
4
5# default: Load the model on the available device(s)
6model = AutoModelForCausalLM.from_pretrained(
7 model_path, torch_dtype="auto", device_map="auto", trust_remote_code=True
8)
9
10# default processer
11processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
12
13messages = [
14 {
15 "role": "user",
16 "content": [
17 {
18 "type": "image",
19 "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
20 },
21 {"type": "text", "text": "Describe this image."},
22 ],
23 }
24]
25
26# Preparation for inference
27text = processor.apply_chat_template(
28 messages, tokenize=False, add_generation_prompt=True
29)
30image_inputs, video_inputs = process_vision_info(messages)
31inputs = processor(
32 text=[text],
33 images=image_inputs,
34 videos=video_inputs,
35 padding=True,
36 return_tensors="pt",
37)
38inputs = inputs.to("cuda")
39
40# Inference: Generation of the output
41generated_ids = model.generate(**inputs, max_new_tokens=1024)
42generated_ids_trimmed = [
43 out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
44]
45output_text = processor.batch_decode(
46 generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
47)
48print(output_text)
49# pip install git+https://github.com/EvolvingLMMs-Lab/lmms-eval.git
accelerate launch --num_processes=8 --main_process_port 12399 -m lmms_eval \
--model=llava_onevision1_5 \
--model_args=pretrained=lmms-lab/LLaVA-OneVision-1.5-8B-Instruct,attn_implementation=flash_attention_2,max_pixels=3240000 \
--tasks=mmmu_val,mmmu_pro_standard,mmbench_en_test,mmerealworld,mmerealworld_cn,ai2d,ai2d_no_mask,vstar_bench,chartqa,charxiv,docvqa_test,mathvista_testmini,mmstar,scienceqa \
--batch_size=11# Clone repository
2git clone https://github.com/EvolvingLMMs-Lab/LLaVA-OneVision-1.5
3cd LLaVA-OneVision-1.5
4
5docker build -t llava_megatron:25.04 .
6
7# Run container with -w to set working directory directly to the mounted volume
8docker run -it --gpus all \
9 --ipc host --net host --privileged --cap-add IPC_LOCK \
10 --ulimit memlock=-1 --ulimit stack=67108864 --rm \
11 -v $(pwd):/workspace/LLaVA-OneVision-1.5 \
12 -w /workspace/LLaVA-OneVision-1.5 \
13 --name "llava_megatron_container" \
14 llava_megatron:25.04 /bin/bashLLaVA-OneVision-1.5-4B-stage0 model directly from HuggingFace.1python ds/merge_model.py \
2--vit_path DeepGlint-AI/rice-vit-large-patch14-560 \
3--llm_path Qwen/Qwen3-4B-Instruct-2507 \
4--output LLaVA-OneVision-1.5-4B-stage01AIAK_TRAINING_PATH=/workspace/LLaVA-OneVision-1.5 bash examples/llava_ov_1_5/convert/convert_4b_hf_to_mcore.sh \
2LLaVA-OneVision-1.5-4B-stage0 \
3LLaVA-OneVision-1.5-4B-stage0_mcore_tp1_pp1 \
41 11# ============================================================
2# Required environment variables:
3# AIAK_TRAINING_PATH Root directory of the AIAK-Training-LLM project
4# DATA_PATH Directory with WebDataset shards (.tar) for pretraining
5# TOKENIZER_PATH Hugging Face tokenizer directory
6# CHECKPOINT_PATH Megatron-formatted checkpoint directory (e.g., mcore TP1/PP1)
7# SAVE_CKPT_PATH Output directory for saving training checkpoints
8AIAK_TRAINING_PATH=/workspace/LLaVA-OneVision-1.5 \
9DATA_PATH=LLaVA-558K-Webdataset \
10TOKENIZER_PATH=LLaVA-OneVision-1.5-4B-stage0 \
11CHECKPOINT_PATH=LLaVA-OneVision-1.5-4B-stage0_mcore_tp1_pp1 \
12bash examples/llava_ov_1_5/quick_start/stage_1_alignment_llava_ov_4b.sh1# ============================================================
2# Convert model to release format
3bash examples/llava_ov_1_5/convert/convert_4b_mcore_to_release.sh \
4stage_1_alignment_llava_ov_4b/iter_0002500/ \
5stage_1_alignment_llava_ov_4b_release 1 1
6# ============================================================
7# Launch
8AIAK_TRAINING_PATH=/workspace/LLaVA-OneVision-1.5 \
9DATA_PATH=LLaVA-OneVision-1.5-Mid-Training-Quick-Start-3M-Webdataset \
10TOKENIZER_PATH=LLaVA-OneVision-1.5-4B-stage0 \
11CHECKPOINT_PATH=stage_1_alignment_llava_ov_4b_release \
12bash examples/llava_ov_1_5/quick_start/stage_1.5_mid_training_llava_ov_4b.sh1# ============================================================
2# Convert model to release format
3bash examples/llava_ov_1_5/convert/convert_4b_mcore_to_release.sh \
4stage_1.5_mid_training_llava_ov_4b/iter_0020000/ \
5stage_1.5_mid_training_llava_ov_4b_release 1 1
6# ============================================================
7# # Launch
8AIAK_TRAINING_PATH=/workspace/LLaVA-OneVision-1.5 \
9DATA_PATH=LLaVA-NeXT-780k-Webdataset \
10TOKENIZER_PATH=LLaVA-OneVision-1.5-4B-stage0 \
11CHECKPOINT_PATH=stage_1.5_mid_training_llava_ov_4b_release \
12bash examples/llava_ov_1_5/quick_start/stage_2_instruct_llava_ov_4b.sh1AIAK_TRAINING_PATH=/workspace/LLaVA-OneVision-1.5 \
2bash examples/llava_ov_1_5/convert/convert_4b_mcore_to_hf.sh \
3stage_2_instruct_llava_ov_4b/iter_0003500 \
4LLaVA-OneVision-1.5-4B-3M-Mid-Training-780K-Instruct \
51 1
6# Copy non-model files (e.g., tokenizer config) to the new directory
7find LLaVA-OneVision-1.5-4B-stage0/ -type f -not -iname '*safetensors*' -exec cp {} LLaVA-OneVision-1.5-4B-3M-Mid-Training-780K-Instruct/ ';'1# pip install git+https://github.com/EvolvingLMMs-Lab/lmms-eval.git
2CUDA_VISIBLE_DEVICES=4,5,6,7 accelerate launch \
3--num_processes=4 --main_process_port 12399 -m lmms_eval --model=llava_onevision1_5 --batch_size=1 --tasks=mme \
4--model_args=pretrained=/workspace/LLaVA-OneVision-1.5/LLaVA-OneVision-1.5-4B-3M-Mid-Training-780K-Instruct,max_pixels=3240000[!TIP] More detailed reproduction steps for the complete process will be provided after the dataset upload is completed.
|
fdcp |
anxiangsir |
yiyexy |
wideyard |
chengzheng345 |
killTheHostage |
mathCrazyy |
yunglechao |
|
RobitYadda |
@inproceedings{LLaVA-OneVision-1.5,
title={LLaVA-OneVision-1.5: Fully Open Framework for Democratized Multimodal Training},
author={An, Xiang and Xie, Yin and Yang, Kaicheng and Zhang, Wenkang and Zhao, Xiuwei and Cheng, Zheng and Wang, Yirui and Xu, Songcen and Chen, Changrui and Wu, Chunsheng and Tan, Huajie and Li, Chunyuan and Yang, Jing and Yu, Jie and Wang, Xiyao and Qin, Bin and Wang, Yumeng and Yan, Zizhen and Feng, Ziyong and Liu, Ziwei and Li, Bo and Deng, Jiankang},
booktitle={arxiv},
year={2025}
}
@inproceedings{xie2025region,
title={Region-based Cluster Discrimination for Visual Representation Learning},
author={Xie, Yin and Yang, Kaicheng and An, Xiang and Wu, Kun and Zhao, Yongle and Deng, Weimo and Ran, Zimin and Wang, Yumeng and Feng, Ziyong and Miles, Roy and Elezi, Ismail and Deng, Jiankang},
booktitle={ICCV},
year={2025}
}
@article{lillava,
title={LLaVA-OneVision: Easy Visual Task Transfer},
author={Li, Bo and Zhang, Yuanhan and Guo, Dong and Zhang, Renrui and Li, Feng and Zhang, Hao and Zhang, Kaichen and Zhang, Peiyuan and Li, Yanwei and Liu, Ziwei and Li, Chunyuan},
journal={Transactions on Machine Learning Research}
year={2024}
}To get full AIAK support, you can contact Baidu Cloud.