puar-playground / Phi-3-MusiX

huggingface.co
Total runs: 20
24-hour runs: 0
7-day runs: 0
30-day runs: 16
Model's Last Updated: August 14 2025
image-text-to-text

Introduction of Phi-3-MusiX

Model Details of Phi-3-MusiX

Phi-3-MusiX 🎵

Phi-3-MusiX is a LoRA adapter for microsoft/Phi-3-vision-128k-instruct for understanding symbolic music in the form of scanned music sheets, MIDI files, and structured annotations. This adapter equips Phi-3 with the ability to perform symbolic music reasoning and answer questions about scanned music sheets and MIDI content.


Inference
from transformers import AutoModelForCausalLM 
from transformers import AutoProcessor


self.model = AutoModelForCausalLM.from_pretrained('microsoft/Phi-3-vision-128k-instruct', device_map="cuda", trust_remote_code=True, torch_dtype="auto")
self.processor = AutoProcessor.from_pretrained('microsoft/Phi-3-vision-128k-instruct', trust_remote_code=True)
self.model.load_adapter('puar-playground/Phi-3-MusiX')


prompt = '' + f'USER: Answer the question:\n{question_string}. ASSISTANT:'

# setup message
messages = [{"role": "user", "content": f"<|image_1|>\n{prompt}"}]

# load image from dir
image = self.load_img(img_dir)

prompt_in = self.processor.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = self.processor(prompt_in, [image], return_tensors="pt").to("cuda")

generation_args = { 
    "max_new_tokens": 500,
    "temperature": 0.1,
    "do_sample": False,
}

with torch.no_grad():
    generate_ids = self.model.generate(**inputs, eos_token_id=self.processor.tokenizer.eos_token_id, **generation_args)

# remove input tokens
generate_ids = generate_ids[:, inputs['input_ids'].shape[1]:]
model_answer = self.processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
        
🧪 Training Data

The model is trained on the MusiXQA dataset, which includes four QA sets:

Each entry in the dataset includes:

  • A scanned music sheet image
  • Its structured metadata ( metadata.json )
  • A MIDI file
  • QA pair targeting music understanding

🎓 Reference

If you use this dataset in your work, please cite it using the following reference:

@article{chen2025musixqa,
  title={MusiXQA: Advancing Visual Music Understanding in Multimodal Large Language Models},
  author={Chen, Jian and Ma, Wenye and Liu, Penghang and Wang, Wei and Song, Tengwei and Li, Ming and Wang, Chenguang and Zhang, Ruiyi and Chen, Changyou},
  journal={arXiv preprint arXiv:2506.23009},
  year={2025}
}

Runs of puar-playground Phi-3-MusiX on huggingface.co

20
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
16
30-day runs

More Information About Phi-3-MusiX huggingface.co Model

More Phi-3-MusiX license Visit here:

https://choosealicense.com/licenses/mit

Phi-3-MusiX huggingface.co

Phi-3-MusiX huggingface.co is an AI model on huggingface.co that provides Phi-3-MusiX's model effect (), which can be used instantly with this puar-playground Phi-3-MusiX model. huggingface.co supports a free trial of the Phi-3-MusiX model, and also provides paid use of the Phi-3-MusiX. Support call Phi-3-MusiX model through api, including Node.js, Python, http.

puar-playground Phi-3-MusiX online free

Phi-3-MusiX huggingface.co is an online trial and call api platform, which integrates Phi-3-MusiX's modeling effects, including api services, and provides a free online trial of Phi-3-MusiX, you can try Phi-3-MusiX online for free by clicking the link below.

puar-playground Phi-3-MusiX online free url in huggingface.co:

https://huggingface.co/puar-playground/Phi-3-MusiX

Phi-3-MusiX install

Phi-3-MusiX is an open source model from GitHub that offers a free installation service, and any user can find Phi-3-MusiX on GitHub to install. At the same time, huggingface.co provides the effect of Phi-3-MusiX install, users can directly use Phi-3-MusiX installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Phi-3-MusiX install url in huggingface.co:

https://huggingface.co/puar-playground/Phi-3-MusiX

Url of Phi-3-MusiX

Provider of Phi-3-MusiX huggingface.co

puar-playground
ORGANIZATIONS

Other API from puar-playground