On Decoder-Only Architecture For Speech-to-Text and Large Language Model Integration

Jian Wu, Yashesh Gaur, Zhuo Chen, Long Zhou, Yimeng Zhu, Tianrui Wang, Jinyu Li, Shujie Liu, Bo Ren, Linquan Liu, Yu Wu

Abstract

Recent advancements in Large Language Models (LLMs) have primarily focused on text-based modalities using decoder-only architectures. However, the speech-to-text (STT) community has traditionally relied on encoder-decoder frameworks. This research introduces Speech-LLaMA, a novel approach that adapts a pre-trained LLaMA-7B model for speech tasks. By utilizing a specialized Connectionist Temporal Classification (CTC) compressor and Low-Rank Adaptation (LoRA), the study demonstrates that decoder-only architectures are not only viable for speech but are significantly more parameter-efficient and accurate than traditional baselines.

1. Introduction

The landscape of Natural Language Processing (NLP) has been transformed by the success of decoder-only models like GPT and LLaMA. Despite this, speech-to-text and speech translation systems have largely remained tethered to the "encoder-decoder" (seq2seq) paradigm, exemplified by models such as Whisper. This research explores whether the architectural advantages of decoder-only LLMs can be extended to the acoustic domain. The resulting system, Speech-LLaMA, bridges the gap between continuous audio signals and discrete text generation, achieving state-of-the-art performance on multilingual benchmarks.

2. Challenges in Speech-LLM Integration

Integrating speech into existing LLMs presents three primary technical hurdles:

  1. Modality Mismatch: Speech signals are continuous and high-frequency. A few seconds of audio generates hundreds of acoustic frames, creating a sequence length disparity compared to text tokens.
  2. Computational Constraints: Training a 7-billion-parameter model from scratch to understand audio is computationally prohibitive for most researchers.
  3. Architectural Inertia: The historical reliance on seq2seq models has left the potential of decoder-only architectures for speech largely unexplored.

3. Methodology: The Speech-LLaMA Architecture

Speech-LLaMA addresses these challenges through a modular design that "plugs" audio capabilities into a frozen LLM.

3.1 CTC Compressor

To handle the length of audio sequences, the researchers developed a CTC Compressor. This component uses Connectionist Temporal Classification to identify redundant acoustic frames. The system can either remove "blank" frames or average consecutive frames belonging to the same phoneme/sound. This drastically reduces the sequence length before the data is passed to the LLM, mitigating memory and computational bottlenecks.

3.2 Audio Encoder and Semantic Mapping

A lightweight stack of Transformer layers acts as an audio encoder. Its primary role is to map compressed acoustic features into a 4096-dimensional semantic space that aligns with LLaMA’s internal text embeddings. This allows the LLM to process audio features as if they were high-dimensional "pseudo-tokens."

3.3 Parameter-Efficient Fine-Tuning (LoRA)

Rather than updating all 7 billion parameters, the researchers employed Low-Rank Adaptation (LoRA). By updating only a tiny fraction of the weights (approximately 2.1 million parameters), the model retains its pre-trained linguistic knowledge while learning to interpret the new acoustic modality.

4. Experimental Setup

The model was trained on a massive 14,000-hour internal dataset encompassing 13 source languages (including German, Chinese, Spanish, and Japanese) with English as the target translation language. Evaluation was conducted on the CoVoST 2 dataset, a standard benchmark for multilingual speech-to-text translation, using BLEU scores to measure translation quality.

5. Key Results and Insights

5.1 Performance Gains

The Speech-LLaMA configuration (E6) achieved an average BLEU score of 26.3, representing a significant improvement over the strong seq2seq baseline of 21.7. This confirms that pre-trained LLMs can be effectively adapted for high-accuracy speech translation.

5.2 Architectural Efficiency

In a "from-scratch" experiment comparing a decoder-only model to a traditional seq2seq model, the decoder-only architecture achieved comparable performance while using 40% fewer parameters. This suggests that sharing parameters for both input processing and output generation is inherently more efficient for speech tasks.

5.3 Strategy Optimization

  • Frame-Averaging: The CTC compressor performed best when using frame-averaging rather than simple blank-removal, yielding a 1.5 BLEU point increase.
  • Prefix Masking: Performance was significantly boosted by using a non-causal attention mask for the audio portion (allowing the model to view the entire audio clip) while maintaining a causal mask for text generation.

6. Conclusion and Future Work

Speech-LLaMA demonstrates that decoder-only LLMs are highly capable of processing speech when equipped with an efficient compression and adaptation layer. While the current model is non-streaming and uses a frozen CTC compressor, future work will explore joint training of all components and scaling the LoRA rank to further enhance performance. This research paves the way for truly multimodal LLMs that can "hear" and "speak" with the same efficiency they bring to text.

Summary updated

BibTeX
@inproceedings{wu2023decoder,
  author = {Jian Wu and Yashesh Gaur and Zhuo Chen and Long Zhou and Yimeng Zhu and Tianrui Wang and Jinyu Li and Shujie Liu and Bo Ren and Linquan Liu and Yu Wu},
  title = {{On Decoder-Only Architecture For Speech-to-Text and Large Language Model Integration}},
  booktitle = {ASRU},
  year = {2023},
  doi = {10.1109/asru57964.2023.10389705},
}
Figure