Abstract
The recent surge in open-source Multimodal Large Language Models (MLLM) frameworks, such as LLaVA, provides a convenient kickoff for artificial intelligence developers and researchers. However, most of the MLLM frameworks take vision as the main input modality, and provide limited in-depth support for the modality of speech, audio, and music. This situation hinders the development of audio-language models, and forces researchers to spend a lot of effort on code writing and hyperparameter tuning. We present SLAM-LLM, an open-source deep learning framework designed to train customized MLLMs, focused on speech, language, audio, and music processing. SLAM-LLM provides a modular configuration of different encoders, projectors, LLMs, and parameter-efficient fine-tuning plugins. SLAM-LLM also includes detailed training and inference recipes for mainstream tasks, along with high-performance checkpoints like LLM-based Automatic Speech Recognition (ASR), Automated Audio Captioning (AAC), and Music Captioning (MC). Some of these recipes have already reached or are nearing state-of-the-art performance, and some relevant techniques have also been accepted by academic papers. We hope SLAM-LLM will accelerate iteration, development, data engineering, and model training for researchers. We are committed to continually pushing forward audio-based MLLMs through this open-source framework, and call on the community to contribute to the LLM-based speech, audio and music processing.
Introduction
The AI community has witnessed a "Cambrian explosion" of multimodal models, yet existing frameworks remain predominantly vision-centric. Researchers working on speech recognition (ASR), audio captioning (AAC), or music analysis often find themselves retrofitting vision-based systems or writing complex boilerplate code from scratch. Auditory data presents unique challenges: it is inherently temporal, often variable in length, and requires specialized feature extraction compared to static images. SLAM-LLM addresses this gap by providing a unified, flexible infrastructure that treats audio-related modalities as first-class citizens, lowering the barrier to entry for building high-performance "Audio-Language Models" (ALMs).
The SLAM-LLM Framework
SLAM-LLM adopts a clean, decoupled architecture consisting of three main components: Encoders, Projectors, and LLM backbones. The framework is designed for rapid experimentation, allowing users to define model configurations, training parameters, and datasets through standardized YAML files. This modularity enables the creation of "customized recipes" tailored to specific auditory tasks.
Modular Components and Best Practices
The framework supports a wide array of pre-trained models and fine-tuning strategies:
- Encoders: Supports supervised models like OpenAI’s Whisper and self-supervised learning (SSL) models such as HuBERT, WavLM, BEATs, and MERT.
- Projectors: Bridges the gap between encoder features and the LLM’s input space. This includes Linear layers for tasks requiring strict temporal alignment (like ASR) and Q-Formers for global semantic tasks (like captioning).
- LLM Backbones: Compatible with popular models like LLaMA, Vicuna, Qwen, and Sailor (specialized for Southeast Asian languages).
To maintain efficiency, SLAM-LLM utilizes Parameter-Efficient Fine-Tuning (PEFT) strategies like LoRA and prefix-tuning. This allows researchers to adapt massive models to specific tasks using relatively modest compute resources; for example, training on 1,000 hours of speech can be completed in approximately 4 hours on 4x A100 GPUs.
Key Insights and Findings
Through extensive benchmarking, several critical insights for building ALMs were identified:
- Chat Models > Base Models: Instruction-tuned "Chat" LLMs (like Vicuna) significantly outperform their "Base" counterparts in ASR tasks, as they treat speech embeddings more like a language to be translated.
- SSL Scaling Power: While supervised models like Whisper are excellent baselines, SSL encoders (like HuBERT X-Large) show superior scaling. When fine-tuned on large datasets, SSL encoders eventually surpass Whisper’s performance.
- The Whisper Truncation Trap: Whisper’s fixed 30-second window is computationally expensive and can degrade performance for shorter utterances. The authors recommend SSL encoders with variable-length embeddings for long-form audio.
- Domain Specialization: For low-resource languages, using an LLM already specialized in those languages (e.g., Sailor-7B) provides a massive boost over general-purpose English-centric models.
Performance Evaluation
SLAM-LLM has demonstrated state-of-the-art (SOTA) results across a variety of benchmarks:
- ASR: Achieved a Word Error Rate (WER) of 1.84% on LibriSpeech test-clean using a HuBERT X-Large encoder and Vicuna-7B.
- Audio Captioning: Set new SOTA results on the Clotho dataset with a 54.0 FENSE score.
- Contextual ASR: Demonstrated that providing the LLM with "hotwords" or OCR text from slides can reduce error rates by over 20% relative to standard ASR.
Conclusion and Future Work
SLAM-LLM provides a robust, open-source foundation for the development of auditory MLLMs. Future work involves exploring more efficient attention mechanisms for very long audio sequences and expanding the framework to support complex, multi-turn "Omni" speech dialogues where the model can both listen and speak in real-time.
Summary updated