Views
No views yet
⚠ Reconstruction. The training script behind the original Qwen-Audio-Mix-Instruct release (MixAssist paper, arXiv:2507.06329) was lost. This adapter was trained with a verified reconstruction of that pipeline: everything recoverable from public artifacts is used verbatim (base model, nf4 QLoRA recipe, single epoch); the remaining hyperparameters are documented standard defaults. Behavior matches the original release in side-by-side evaluation, but weights are not bit-identical.
1import librosa, torch
2from peft import PeftModel
3from transformers import AutoProcessor, Qwen2AudioForConditionalGeneration
4
5base = "Qwen/Qwen2-Audio-7B-Instruct"
6processor = AutoProcessor.from_pretrained(base)
7model = PeftModel.from_pretrained(
8 Qwen2AudioForConditionalGeneration.from_pretrained(base, torch_dtype=torch.float16, device_map={"": 0}),
9 "mclemcrew/Qwen2-Audio-MixAssist-LoRA",
10)
11
12audio, _ = librosa.load("my_mix_segment.wav", sr=16000)
13conversation = [
14 {"role": "system", "content": "You are an expert audio engineer assisting with music production and mixing. Provide clear, specific advice on audio engineering techniques, mixing adjustments, and production decisions based on the audio samples and the user's questions. Focus on practical, actionable guidance."},
15 {"role": "user", "content": [
16 {"type": "audio", "audio_url": "my_mix_segment.wav"},
17 {"type": "text", "text": "The vocals feel buried in the chorus. What should I do?"},
18 ]},
19]
20text = processor.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
21inputs = processor(text=text, audios=[audio], sampling_rate=16000, return_tensors="pt").to(model.device)
22out = model.generate(**inputs, do_sample=True, temperature=0.7, top_k=20, top_p=0.5,
23 repetition_penalty=1.1, max_new_tokens=300)
24print(processor.batch_decode(out[:, inputs["input_ids"].size(1):], skip_special_tokens=True)[0])repetition_penalty=1.1 (the released
model's own generation config). Greedy decoding without a repetition penalty
produces degenerate loops on any model trained on this data.| Setting | Value | Status |
|---|---|---|
| Base model | Qwen/Qwen2-Audio-7B-Instruct | ground truth |
| Quantization | QLoRA 4-bit nf4 + double quant, fp16 compute | ground truth |
| Epochs | 1 | ground truth (paper: 4 overfit) |
| Data | MixAssist, has_content==True → 241 train / 34 dev / 156 test | ground truth |
| LoRA | r=8, α=32, dropout 0.05, LM q/v projections only (audio tower frozen) | reconstructed default |
| LR / schedule | 2e-4, linear, warmup 0.03 | reconstructed default |
| Batch | 1 × grad accum 8 | reconstructed default |
1@misc{clemens2025mixassistaudiolanguagedatasetcocreative,
2 title={MixAssist: An Audio-Language Dataset for Co-Creative AI Assistance in Music Mixing},
3 author={Michael Clemens and Ana Marasović},
4 year={2025},
5 eprint={2507.06329},
6 archivePrefix={arXiv},
7 primaryClass={cs.SD},
8 url={https://arxiv.org/abs/2507.06329},
9}