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.
Instructions to use Maxilicious20/Instrumenta-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maxilicious20/Instrumenta-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="Maxilicious20/Instrumenta-2")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForTextToWaveform processor = AutoProcessor.from_pretrained("Maxilicious20/Instrumenta-2") model = AutoModelForTextToWaveform.from_pretrained("Maxilicious20/Instrumenta-2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
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) andfacebook/encodec_32khz.
- Downloads last month
- 34