Model reference · open weights

Mini-BS-RoFormer

Available as managed deployment Licence fee Audio HiDolen · community Audio→audio 1 variants 1k dl/mo

Mini-BS-RoFormer is an open-weight audio or speech model from HiDolen. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

MakerHiDolen
TypeAudio & music
TaskAudio→audio
Parameters (lead)47M
Runs withtransformers
Released2025-12-29
Popularity1k downloads / month
LicenceCommercial licence needed

About

What Mini-BS-RoFormer is

Model for the Music source separation task. Made a bunch of improvements to the existing BS-RoFormer open-source implementation.

针对音乐音频分离任务的模型。对 现有的 BS-RoFormer 开源实现 做出了一些改进。

demo 示例试听

Model Details

模型总参数量 46.8M,权重精度 BF16。

在 MUSDB18HQ 数据的 val 集上的性能(单位 SDR,越高越好):

tracksMini-BS-RoFormer-V2-46.8MMini-BS-RoFormer-18MMini-BS-RoFormer
overall10.039.016.48
bass9.688.315.66
drums10.589.556.77
other8.998.146.06
vocal10.8610.037.44

使用时间维度下采样极大减轻了资源消耗。推理 30 秒音频所需运算量:

modelGFLOPs
Mini-BS-RoFormer-V2-46.8M8343.55
Mini-BS-RoFormer-18M10115.77
Mini-BS-RoFormer3068.64

Uses

使用的 transformers 库版本为 4.55.4。为了正常运行模型还需要安装库 soudfile、einops 和 librosa。

GPU 推理:

from transformers import AutoModel
import soundfile
import torch
import librosa

model_name = "HiDolen/Mini-BS-RoFormer-V2-46.8M"
model = AutoModel.from_pretrained(
    model_name,
    trust_remote_code=True,
)
model.to("cuda")

# 加载音频
file = "./Bruno Mars - Runaway Baby.mp3"
waveform, sr = librosa.load(file, sr=44100, mono=False)
waveform = torch.tensor(waveform).float()
waveform = waveform.to("cuda")

# 进行推理
result = model.separate(
    waveform,
    batch_size=2,
    verbose=True,
)

# 保存处理结果
for i in range(result.shape[0]):
    soundfile.write(f"separated_stem_{i}.wav", result[i].cpu().numpy().T, 44100)

以上代码会分离出 bass、drums、other 和 vocal 四个轨道。若想只分离人声和伴奏两轨,在最后保存音频时合并即可:

···

result = model.separate(
    waveform,
    batch_size=2,
    verbose=True,
)

# 合并 bass、drums、other 作为伴奏
instrumental = result[0] + result[1] + result[2]
vocals = result[3]
result = torch.stack([instrumental, vocals], dim=0)
for i in range(result.shape[0]):
    soundfile.write(f"separated_stem_{i}.wav", result[i].cpu().numpy().T, 44100)

Differences from the previous version

Mini-BS-RoFormer-V2 相比于之前版本的主要改进:

  1. 使用 bf16-true 精度进行训练
  2. 使用 muon 优化器训练 transformer 层,加速收敛
  3. 音频输入的 stft 运算,使用的 n_fft 从 2048 变为 4096。音频输出维持在 n_fft=2048
  4. freq_band 从原来的 62 段分频更换为基于梅尔频率的 80 段分频
  5. 时间维度下采样,采样步长为 4。大大减少了训练和推理的运算量
  6. MaskEstimator 额外预测 gate 门控,输出音频的空白部分会更加安静
  7. 其他若干代码修改

Training Details

使用 MUSDB18HQ 数据集的 train 和 test 集进行训练。

学习率恒定 5e-4,以 batch_size=16 训练 310k 步。

对 transformer 层使用 Muon 优化器,其他网络层使用 AdamW 优化器。

Acknowledgments

  • https://github.com/lucidrains/BS-RoFormer
  • https://arxiv.org/abs/2309.02612 (Music Source Separation with Band-Split RoPE Transformer)

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys mini-bs-roformer for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mini-bs-roformer below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -F model="mini-bs-roformer" -F file=@audio.mp3

Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms