1xbq1/FedMLLM

47

stars

36

commits

Python

primary language

Jun 4, 2026

updated

README

FedMLLM

FedMLLM: Federated Fine-tuning MLLM on Multimodal Heterogeneity Data arXiv

Wide ImageNarrow Image

YOCO

You Only Communicate Once: One-shot Federated Learning for Multimodal Large Language Models

πŸ† Accepted at NeurIPS 2025

YOCO idea

YOCO Overview

TODO

Directory Structure

Click to expand / collapse
.
└── root/
    β”œβ”€β”€ data/
    β”‚   β”œβ”€β”€ hateful_memes/
    β”‚   β”‚   β”œβ”€β”€ minicpmv_data/
    β”‚   β”‚   β”‚   β”œβ”€β”€ modality-missing/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ mrate-0.3/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ mrate-0.4/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   └── mrate-0.5/
    β”‚   β”‚   β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ modality-single/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ image-3/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ image-5/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   └── image-7/
    β”‚   β”‚   β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ modality-mix/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ qrate-0.2/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ qrate-0.3/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   └── qrate-0.4/
    β”‚   β”‚   β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ partition-alpha5.0-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ partition-alpha1.0-clt10
    β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   └── raw_data/ # Extracted files of the downloaded dataset
    β”‚   β”‚       β”œβ”€β”€ partition-alpha5.0-clt10
    β”‚   β”‚       β”œβ”€β”€ partition-alpha1.0-clt10
    β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   └── crisis-mmd # Consistent with the *hateful_memes* folder structure.
    └── code/
        β”œβ”€β”€ data_gen/
        β”‚   β”œβ”€β”€ data_partition_crisismmd.py
        β”‚   β”œβ”€β”€ data_partition_hateful.py
        β”‚   β”œβ”€β”€ data_process_medalpaca.py
        β”‚   β”œβ”€β”€ data_process_vqarad.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_missing_aug.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_missing.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_mix_aug.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_mix.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_single_aug.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_single.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd.py
        β”‚   β”œβ”€β”€ gen_data_hateful_missing_aug.py
        β”‚   β”œβ”€β”€ gen_data_hateful_missing.py
        β”‚   β”œβ”€β”€ gen_data_hateful_mix_aug.py
        β”‚   β”œβ”€β”€ gen_data_hateful_mix.py
        β”‚   β”œβ”€β”€ gen_data_hateful_single_aug.py
        β”‚   β”œβ”€β”€ gen_data_hateful_single.py
        β”‚   β”œβ”€β”€ gen_data_hateful.py
        β”‚   β”œβ”€β”€ gen_data_medical_vtqa_single.py
        β”‚   └── gen_data_medical_vtqa_mix.py
        β”œβ”€β”€ finetune/
        β”‚   β”œβ”€β”€ federated_learning/
        β”‚   β”‚   β”œβ”€β”€ __init__.py
        β”‚   β”‚   β”œβ”€β”€ fed_global.py
        β”‚   β”‚   └── fed_utils.py
        β”‚   β”œβ”€β”€ __init__.py
        β”‚   β”œβ”€β”€ dataset.py
        β”‚   β”œβ”€β”€ finetune_lora.sh
        β”‚   β”œβ”€β”€ finetune.py
        β”‚   └── trainer.py
        β”œβ”€β”€ eval_crisismmd_aug.py
        β”œβ”€β”€ eval_crisismmd.py
        β”œβ”€β”€ eval_hateful_aug.py
        β”œβ”€β”€ eval_hateful.py
        β”œβ”€β”€ eval_medical_gpt_slake.py
        β”œβ”€β”€ eval_medical_gpt.py
        β”œβ”€β”€ eval_medical_slake.py
        β”œβ”€β”€ eval_medical.py
        β”œβ”€β”€ vqa_eval_slake.py
        β”œβ”€β”€ vqa_eval.py
        β”œβ”€β”€ vqa_slake.py
        β”œβ”€β”€ vqa.py
        └── start.sh

Install

conda create -n FedMLLM python=3.10 -y
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt

Dataset

Download dataset

  1. Hateful-Memes download
  2. CrisisMMD download
  3. VQA-RAD download
  4. MedAlpaca download
  5. SLAKE download

Dataset processing

cd data_gen/

python data_partition_crisismmd.py
python gen_data_crisismmd.py # aligned modal scenario
python gen_data_crisismmd_missing.py # missing modal scenario
python gen_data_crisismmd_missing_aug.py # missing modal scenario with prompt strategy
python gen_data_crisismmd_single.py # cross modal scenario
python gen_data_crisismmd_mix.py # hybrid modal scenario

python data_process_medalpaca.py
python data_process_vqarad.py
python gen_data_medical_vtqa_mix.py
python gen_data_medical_vtqa_single.py

Training and Testing

sh start.sh

Citation

@article{xu2024fedmllm,
  title={FedMLLM: Federated Fine-tuning MLLM on Multimodal Heterogeneity Data},
  author={Xu, Binqian and Shu, Xiangbo and Mei, Haiyang and Xie, Guosen and Fernando, Basura and Tang, Jinhui},
  journal={arXiv preprint arXiv:2411.14717},
  year={2024}
}

@inproceedings{xu2025you,
  title={You Only Communicate Once: One-shot Federated Low-Rank Adaptation of MLLM},
  author={Binqian Xu, Haiyang Mei, Zechen Bai, Jinjin Gong, Rui Yan, Guo-Sen Xie, Yazhou Yao, Basura Fernando, Xiangbo Shu},
  booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems}
}

Acknowledgements

This repo is based on MiniCPM-V, OpenFedLLM, and PeFoMed thanks to the original authors for their works!

Contributors

1xbq1

36 commits

1xbq1/FedMLLM

47

stars

36

commits

Python

primary language

Jun 4, 2026

updated

README

FedMLLM

FedMLLM: Federated Fine-tuning MLLM on Multimodal Heterogeneity Data arXiv

Wide ImageNarrow Image

YOCO

You Only Communicate Once: One-shot Federated Learning for Multimodal Large Language Models

πŸ† Accepted at NeurIPS 2025

YOCO idea

YOCO Overview

TODO

Directory Structure

Click to expand / collapse
.
└── root/
    β”œβ”€β”€ data/
    β”‚   β”œβ”€β”€ hateful_memes/
    β”‚   β”‚   β”œβ”€β”€ minicpmv_data/
    β”‚   β”‚   β”‚   β”œβ”€β”€ modality-missing/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ mrate-0.3/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ mrate-0.4/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   └── mrate-0.5/
    β”‚   β”‚   β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ modality-single/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ image-3/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ image-5/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   └── image-7/
    β”‚   β”‚   β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ modality-mix/
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ qrate-0.2/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ qrate-0.3/
    β”‚   β”‚   β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”‚   └── qrate-0.4/
    β”‚   β”‚   β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ partition-alpha5.0-clt10
    β”‚   β”‚   β”‚   β”œβ”€β”€ partition-alpha1.0-clt10
    β”‚   β”‚   β”‚   └── partition-alpha0.5-clt10
    β”‚   β”‚   └── raw_data/ # Extracted files of the downloaded dataset
    β”‚   β”‚       β”œβ”€β”€ partition-alpha5.0-clt10
    β”‚   β”‚       β”œβ”€β”€ partition-alpha1.0-clt10
    β”‚   β”‚       └── partition-alpha0.5-clt10
    β”‚   └── crisis-mmd # Consistent with the *hateful_memes* folder structure.
    └── code/
        β”œβ”€β”€ data_gen/
        β”‚   β”œβ”€β”€ data_partition_crisismmd.py
        β”‚   β”œβ”€β”€ data_partition_hateful.py
        β”‚   β”œβ”€β”€ data_process_medalpaca.py
        β”‚   β”œβ”€β”€ data_process_vqarad.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_missing_aug.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_missing.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_mix_aug.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_mix.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_single_aug.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd_single.py
        β”‚   β”œβ”€β”€ gen_data_crisismmd.py
        β”‚   β”œβ”€β”€ gen_data_hateful_missing_aug.py
        β”‚   β”œβ”€β”€ gen_data_hateful_missing.py
        β”‚   β”œβ”€β”€ gen_data_hateful_mix_aug.py
        β”‚   β”œβ”€β”€ gen_data_hateful_mix.py
        β”‚   β”œβ”€β”€ gen_data_hateful_single_aug.py
        β”‚   β”œβ”€β”€ gen_data_hateful_single.py
        β”‚   β”œβ”€β”€ gen_data_hateful.py
        β”‚   β”œβ”€β”€ gen_data_medical_vtqa_single.py
        β”‚   └── gen_data_medical_vtqa_mix.py
        β”œβ”€β”€ finetune/
        β”‚   β”œβ”€β”€ federated_learning/
        β”‚   β”‚   β”œβ”€β”€ __init__.py
        β”‚   β”‚   β”œβ”€β”€ fed_global.py
        β”‚   β”‚   └── fed_utils.py
        β”‚   β”œβ”€β”€ __init__.py
        β”‚   β”œβ”€β”€ dataset.py
        β”‚   β”œβ”€β”€ finetune_lora.sh
        β”‚   β”œβ”€β”€ finetune.py
        β”‚   └── trainer.py
        β”œβ”€β”€ eval_crisismmd_aug.py
        β”œβ”€β”€ eval_crisismmd.py
        β”œβ”€β”€ eval_hateful_aug.py
        β”œβ”€β”€ eval_hateful.py
        β”œβ”€β”€ eval_medical_gpt_slake.py
        β”œβ”€β”€ eval_medical_gpt.py
        β”œβ”€β”€ eval_medical_slake.py
        β”œβ”€β”€ eval_medical.py
        β”œβ”€β”€ vqa_eval_slake.py
        β”œβ”€β”€ vqa_eval.py
        β”œβ”€β”€ vqa_slake.py
        β”œβ”€β”€ vqa.py
        └── start.sh

Install

conda create -n FedMLLM python=3.10 -y
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt

Dataset

Download dataset

  1. Hateful-Memes download
  2. CrisisMMD download
  3. VQA-RAD download
  4. MedAlpaca download
  5. SLAKE download

Dataset processing

cd data_gen/

python data_partition_crisismmd.py
python gen_data_crisismmd.py # aligned modal scenario
python gen_data_crisismmd_missing.py # missing modal scenario
python gen_data_crisismmd_missing_aug.py # missing modal scenario with prompt strategy
python gen_data_crisismmd_single.py # cross modal scenario
python gen_data_crisismmd_mix.py # hybrid modal scenario

python data_process_medalpaca.py
python data_process_vqarad.py
python gen_data_medical_vtqa_mix.py
python gen_data_medical_vtqa_single.py

Training and Testing

sh start.sh

Citation

@article{xu2024fedmllm,
  title={FedMLLM: Federated Fine-tuning MLLM on Multimodal Heterogeneity Data},
  author={Xu, Binqian and Shu, Xiangbo and Mei, Haiyang and Xie, Guosen and Fernando, Basura and Tang, Jinhui},
  journal={arXiv preprint arXiv:2411.14717},
  year={2024}
}

@inproceedings{xu2025you,
  title={You Only Communicate Once: One-shot Federated Low-Rank Adaptation of MLLM},
  author={Binqian Xu, Haiyang Mei, Zechen Bai, Jinjin Gong, Rui Yan, Guo-Sen Xie, Yazhou Yao, Basura Fernando, Xiangbo Shu},
  booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems}
}

Acknowledgements

This repo is based on MiniCPM-V, OpenFedLLM, and PeFoMed thanks to the original authors for their works!

Contributors

1xbq1

36 commits

Languages

Python

98.3%

Shell

1.7%