├── .gitattributes ├── .gitignore ├── .gitmodules ├── LICENSE ├── LICENSE_weights ├── README.md ├── images ├── muq-logo.jpeg ├── radar.jpg ├── tab-marble.jpg ├── tab-mulan.png └── tagging.jpg ├── requirements.txt ├── setup.py └── src ├── muq ├── __init__.py ├── muq │ ├── __init__.py │ ├── models │ │ ├── __init__.py │ │ └── muq_model.py │ ├── modules │ │ ├── __init__.py │ │ ├── conv.py │ │ ├── features.py │ │ ├── flash_conformer.py │ │ ├── random_quantizer.py │ │ └── rvq.py │ └── muq.py └── muq_mulan │ ├── __init__.py │ ├── models │ ├── __init__.py │ ├── audio.py │ ├── mulan.py │ └── text.py │ ├── modules │ ├── __init__.py │ ├── contrastive.py │ ├── distributed.py │ ├── extend_distributed.py │ ├── transformer.py │ └── utils.py │ └── muq_mulan.py └── recipes ├── contrastive_learning ├── README.md ├── config │ ├── accelerate │ │ ├── 2gpu.yaml │ │ ├── 32gpu4node.yaml │ │ ├── 32gpu4node_fp16.yaml │ │ ├── 32gpu4node_zero2.yaml │ │ ├── 8gpu_fp16.yaml │ │ └── 8gpu_fp16_zero2.yaml │ ├── dataset │ │ └── mtg_en_zh.yaml │ ├── model │ │ └── muq_mulan.yaml │ └── train.yaml ├── datasets │ └── mtg-jamendo │ │ ├── index │ │ ├── genre_idx.json │ │ ├── instrument_idx.json │ │ ├── keywords_idx.json │ │ └── moods_idx.json │ │ ├── prompt │ │ ├── en.txt │ │ └── zh.txt │ │ └── translate │ │ ├── genre_en2zh.json │ │ ├── instrument_en2zh.json │ │ ├── keywords_en2zh.json │ │ └── moods_en2zh.json ├── musiclm_pytorch │ ├── __init__.py │ ├── dataset.py │ └── trainer.py ├── requirements.txt ├── scripts │ ├── convert_muqmulan_fairseq_ckpt_to_huggingface.py │ └── inference_muqmulan_huggingface.py ├── setup.py ├── train.py └── utils.py └── pretrain ├── README.md ├── config └── pretrain │ ├── MuQ_large_iter_multinodes_v100.yaml │ └── MuQ_large_multinodes_v100.yaml ├── data ├── __init__.py ├── ark_dataset.py ├── mert_dataset.py └── utils │ ├── data_utils.py │ └── mixup.py ├── dataset └── music4all │ └── .gitkeep ├── models └── muq_fairseq.py ├── requirements.txt ├── rvq_trainer.py ├── scripts ├── convert_muq_fairseq_ckpt_to_huggingface.py ├── inference_muq_huggingface.py └── run_training_muq.sh └── tasks └── muq_pretraining.py /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/.gitignore -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/.gitmodules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/LICENSE -------------------------------------------------------------------------------- /LICENSE_weights: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/LICENSE_weights -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/README.md -------------------------------------------------------------------------------- /images/muq-logo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/images/muq-logo.jpeg -------------------------------------------------------------------------------- /images/radar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/images/radar.jpg -------------------------------------------------------------------------------- /images/tab-marble.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/images/tab-marble.jpg -------------------------------------------------------------------------------- /images/tab-mulan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/images/tab-mulan.png -------------------------------------------------------------------------------- /images/tagging.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/images/tagging.jpg -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/requirements.txt -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/setup.py -------------------------------------------------------------------------------- /src/muq/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/__init__.py -------------------------------------------------------------------------------- /src/muq/muq/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/__init__.py -------------------------------------------------------------------------------- /src/muq/muq/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/muq/muq/models/muq_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/models/muq_model.py -------------------------------------------------------------------------------- /src/muq/muq/modules/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/muq/muq/modules/conv.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/modules/conv.py -------------------------------------------------------------------------------- /src/muq/muq/modules/features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/modules/features.py -------------------------------------------------------------------------------- /src/muq/muq/modules/flash_conformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/modules/flash_conformer.py -------------------------------------------------------------------------------- /src/muq/muq/modules/random_quantizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/modules/random_quantizer.py -------------------------------------------------------------------------------- /src/muq/muq/modules/rvq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/modules/rvq.py -------------------------------------------------------------------------------- /src/muq/muq/muq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq/muq.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/__init__.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/muq/muq_mulan/models/audio.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/models/audio.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/models/mulan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/models/mulan.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/models/text.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/models/text.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/modules/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/muq/muq_mulan/modules/contrastive.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/modules/contrastive.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/modules/distributed.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/modules/distributed.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/modules/extend_distributed.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/modules/extend_distributed.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/modules/transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/modules/transformer.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/modules/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/modules/utils.py -------------------------------------------------------------------------------- /src/muq/muq_mulan/muq_mulan.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/muq/muq_mulan/muq_mulan.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/README.md -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/accelerate/2gpu.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/accelerate/2gpu.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/accelerate/32gpu4node.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/accelerate/32gpu4node.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/accelerate/32gpu4node_fp16.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/accelerate/32gpu4node_fp16.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/accelerate/32gpu4node_zero2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/accelerate/32gpu4node_zero2.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/accelerate/8gpu_fp16.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/accelerate/8gpu_fp16.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/accelerate/8gpu_fp16_zero2.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/accelerate/8gpu_fp16_zero2.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/dataset/mtg_en_zh.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/dataset/mtg_en_zh.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/model/muq_mulan.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/model/muq_mulan.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/config/train.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/config/train.yaml -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/index/genre_idx.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/index/genre_idx.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/index/instrument_idx.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/index/instrument_idx.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/index/keywords_idx.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/index/keywords_idx.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/index/moods_idx.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/index/moods_idx.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/prompt/en.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/prompt/en.txt -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/prompt/zh.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/prompt/zh.txt -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/genre_en2zh.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/genre_en2zh.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/instrument_en2zh.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/instrument_en2zh.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/keywords_en2zh.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/keywords_en2zh.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/moods_en2zh.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/datasets/mtg-jamendo/translate/moods_en2zh.json -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/musiclm_pytorch/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/musiclm_pytorch/__init__.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/musiclm_pytorch/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/musiclm_pytorch/dataset.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/musiclm_pytorch/trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/musiclm_pytorch/trainer.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/requirements.txt -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/scripts/convert_muqmulan_fairseq_ckpt_to_huggingface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/scripts/convert_muqmulan_fairseq_ckpt_to_huggingface.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/scripts/inference_muqmulan_huggingface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/scripts/inference_muqmulan_huggingface.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/setup.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/train.py -------------------------------------------------------------------------------- /src/recipes/contrastive_learning/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/contrastive_learning/utils.py -------------------------------------------------------------------------------- /src/recipes/pretrain/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/README.md -------------------------------------------------------------------------------- /src/recipes/pretrain/config/pretrain/MuQ_large_iter_multinodes_v100.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/config/pretrain/MuQ_large_iter_multinodes_v100.yaml -------------------------------------------------------------------------------- /src/recipes/pretrain/config/pretrain/MuQ_large_multinodes_v100.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/config/pretrain/MuQ_large_multinodes_v100.yaml -------------------------------------------------------------------------------- /src/recipes/pretrain/data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/data/__init__.py -------------------------------------------------------------------------------- /src/recipes/pretrain/data/ark_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/data/ark_dataset.py -------------------------------------------------------------------------------- /src/recipes/pretrain/data/mert_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/data/mert_dataset.py -------------------------------------------------------------------------------- /src/recipes/pretrain/data/utils/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/data/utils/data_utils.py -------------------------------------------------------------------------------- /src/recipes/pretrain/data/utils/mixup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/data/utils/mixup.py -------------------------------------------------------------------------------- /src/recipes/pretrain/dataset/music4all/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/recipes/pretrain/models/muq_fairseq.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/models/muq_fairseq.py -------------------------------------------------------------------------------- /src/recipes/pretrain/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/requirements.txt -------------------------------------------------------------------------------- /src/recipes/pretrain/rvq_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/rvq_trainer.py -------------------------------------------------------------------------------- /src/recipes/pretrain/scripts/convert_muq_fairseq_ckpt_to_huggingface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/scripts/convert_muq_fairseq_ckpt_to_huggingface.py -------------------------------------------------------------------------------- /src/recipes/pretrain/scripts/inference_muq_huggingface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/scripts/inference_muq_huggingface.py -------------------------------------------------------------------------------- /src/recipes/pretrain/scripts/run_training_muq.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/scripts/run_training_muq.sh -------------------------------------------------------------------------------- /src/recipes/pretrain/tasks/muq_pretraining.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tencent-ailab/MuQ/HEAD/src/recipes/pretrain/tasks/muq_pretraining.py --------------------------------------------------------------------------------