Run this model with HF Jobs

Run Maxilicious20/Instrumenta-2 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/Maxilicious20/Instrumenta-2. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Maxilicious20/Instrumenta-2 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instrumenta-2 / README.md
Maxilicious20's picture
Upload README.md
3f0b2af verified
|
Raw History Blame Contribute Delete
1.79 kB
metadata
library_name: transformers
pipeline_tag: text-to-audio
tags:
  - music
  - text-to-music
  - musicgen
  - instrumental
license: apache-2.0

Instrumenta-2

Text-to-instrumental music generation model (up to 20 s, 32 kHz mono). Built on the MusicGen architecture (MusicgenForConditionalGeneration) and trained from scratch (~126M decoder parameters; using frozen google-t5/t5-base text encoder and facebook/encodec_32khz audio tokenizer components).

Usage

from transformers import pipeline
import scipy.io.wavfile as wav

pipe = pipeline("text-to-audio", model="Maxilicious20/Instrumenta-2")
out = pipe(
    "warm acoustic fingerstyle guitar with soft ambient strings",
    forward_params={"do_sample": True, "guidance_scale": 3.0, "max_new_tokens": 1003},
)
wav.write("output.wav", out["sampling_rate"], out["audio"].squeeze())

max_new_tokens=1003 corresponds to 20 s (frames = max_new_tokens - 3 across 4 codebooks at 50 frames/s).

Training

  • Architecture: Autoregressive 4-codebook Transformer decoder (~126M parameters) with T5-base cross-attention conditioning and a 32 kHz EnCodec audio tokenizer.
  • Training Pipeline: Two-stage training consisting of pretraining from scratch on instrumental audio clips followed by Supervised Fine-Tuning (SFT) on descriptive text-audio pairs.
  • Hardware: NVIDIA GeForce RTX 4060 (8 GB VRAM).

Limitations

  • Maximum generation length of 20 s per pass; designed for instrumental music without vocals or multi-section song structures.
  • Specific tempo (BPM) or musical key instructions in prompts are only followed to a limited extent.

License

This model is released under the Apache-2.0 License.

  • Frozen backbone components: google-t5/t5-base (Apache-2.0) and facebook/encodec_32khz.