Instructions to use haiyewon/Decomposer-Qwen3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use haiyewon/Decomposer-Qwen3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="haiyewon/Decomposer-Qwen3-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("haiyewon/Decomposer-Qwen3-8B") model = AutoModelForCausalLM.from_pretrained("haiyewon/Decomposer-Qwen3-8B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use haiyewon/Decomposer-Qwen3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "haiyewon/Decomposer-Qwen3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "haiyewon/Decomposer-Qwen3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/haiyewon/Decomposer-Qwen3-8B
- SGLang
How to use haiyewon/Decomposer-Qwen3-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "haiyewon/Decomposer-Qwen3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "haiyewon/Decomposer-Qwen3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "haiyewon/Decomposer-Qwen3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "haiyewon/Decomposer-Qwen3-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use haiyewon/Decomposer-Qwen3-8B with Docker Model Runner:
docker model run hf.co/haiyewon/Decomposer-Qwen3-8B
Decomposer
Decomposer decompiles symbolic music (MIDI) into executable Strudel programs. This model is the 8B model from the paper Decomposer: Learning to Decompile Symbolic Music to Programs, post-trained from Qwen3-8B.
- 📄 Paper: arXiv:2607.01849
- 🌐 Project page: yewon-kim.com/decomposer
- 🎹 Live demo: haiyewon/decomposer-demo
- 💻 Code: github.com/elianakim/Decomposer
- 🤗 Dataset: haiyewon/Strudel-Synth
Model Description
- Base model: Qwen/Qwen3-8B
- Model size: 8.2B
- Type: Causal Language Model
- Precision: bfloat16
Quick Start
Clone our GitHub code repo, run through the setup steps, and try:
git clone https://github.com/elianakim/Decomposer.git
cd Decomposer
uv sync
uv run generate_transformers.py \
--model haiyewon/Decomposer-Qwen3-8B \
--midi_path path/to/input.mid \
--n_outputs 5
The repo and inference scripts provide a more complete usage guide.
Model Details
Input Format
MIDI is serialized as instrument-wise note events. Onsets are given in cycle coordinates instead of seconds:
[BPM=120 Meter=4]
[acoustic_grand_piano] C4@0.00 E4@0.25 G4@0.50 C5@1.00
[drum] bass_drum@0.00 closed_hi_hat@0.25 closed_hi_hat@0.50 snare@0.75
- Header
[BPM=… Meter=…]— tempo/meter; if absent, madmom is used to estimate them. - Events — one line per instrument,
pitch@cycle_onsettokens; melodic pitches as note names (C4,F#3), drums as GM drum names (bass_drum,closed_hi_hat).
Training Data
Strudel-Synth is a synthetic corpus of 21,174 (MIDI, Strudel) pairs (20,152 train / 1,022 test) built by distilling Strudel programs from Claude-Opus-4.6 and rendering each to MIDI with the Strudel runtime. Its ~20K training split is divided into two disjoint ~10K halves, one per stage:
- SFT uses the first half as paired (MIDI, Strudel) examples.
- RL uses the second half (MIDI only), plus short-fragment (<30 s) LMD MIDI.
Inference Hyperparameters
Recommended settings matching the paper evaluation:
| Setting | Value |
|---|---|
temperature |
1.0 |
max_new_tokens |
4096 |
enable_thinking |
false |
Citation
If you find our model useful, please cite our research as
@article{kim2026decomposer,
title = {Decomposer: Learning to Decompile Symbolic Music to Programs},
author = {Kim, Yewon and Gandhi, Apurva and Chung, David and Neubig, Graham and Donahue, Chris},
journal = {arXiv preprint arXiv:2607.01849},
year = {2026}
}
- Downloads last month
- 109