MiDashengLM-7B kculture
a model for analyzing traditional Korean music
2 min readupdated
MiDashengLM-7B kculture is an audio analysis model fine-tuned using LoRA (a small add-on over the base model) for working with traditional Korean music (gugak). It takes an audio recording as input and outputs structured data: text descriptions, genre, prevailing instruments, folk song region, and transcriptions. Based on the MiDashengLM-7B architecture (8.28 billion parameters), the model merges weights directly into the checkpoint, allowing it to run without extra configuration. This tool will be useful for folklore researchers, musicians, and audio application developers working with Asian music genres.
Key features
- Specialization in traditional Korean music (gugak) and folk genres.
- Comprehensive analysis: identification of instruments, genres, region, and performer's gender.
- Support for QA (question and answering) tasks on composition rhythm, tempo, and mood.
- Ready-to-use model with merged LoRA weights.
What you can do
- Classify musical instruments and genres in traditional Korean music tracks.
- Recognize the region of origin of folk songs and automatically transcribe lyrics.
- Integrate the model into pipelines for automatically generating music annotations and captions.
Example
import torch
from transformers import AutoModelForCausalLM, AutoProcessor
REPO = "xriverAI/midashenglm-7b-kculture"
model = AutoModelForCausalLM.from_pretrained(REPO, trust_remote_code=True, torch_dtype=torch.bfloat16).cuda().eval()
proc = AutoProcessor.from_pretrained(REPO, trust_remote_code=True)
msgs = [[{"role": "user", "content": [{"type": "text", "text": "What's the music instrument?"},
{"type": "audio", "path": "example_16k.wav"}]}]]
x = proc.apply_chat_template(msgs, tokenize=True, add_generation_prompt=True, add_special_tokens=True,
return_dict=True, padding=True).to(device=model.device, dtype=model.dtype)
with torch.no_grad():
out = model.generate(**x, max_new_tokens=128, do_sample=False)
print(proc.tokenizer.batch_decode(out, skip_special_tokens=True)[0])
Read more
DetailsBase model: mispeech/midashenglm-7b-0804-bf16 (7B, 8.28 billion parameters).
Quality: Music QA FENSE increased to 68.90, instrument classification to 86.20 ACC.
Limitations: may confuse instruments or generate non-existent names.
Hardware requirements: about 16GB VRAM for the model and 86GB+ for integration with Gemma 4.










Comments