Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexity
Mutian He, Philip N. Garner
TL;DR
This paper addresses the cost of deploying large pretrained transformers in non-text domains by enabling their conversion into linear-time substitutes through Cross-Architecture Layerwise Distillation (CALD) that jointly fine-tunes and converts models. CALD transfers parameters and distills behavior from a task-tuned teacher to a linear-time student (e.g., RoBERTa→Linformer, Pythia→Mamba, Wav2Vec2→Mamba2) and explores Target Guided, Trajectory Guided, Waypoint Guided, and Hybrid modes, using a combined loss over cross-entropy, output distillation, and hidden-state alignment. Across language processing, language modeling, and speech tasks, CALD substantially reduces performance gaps relative to unguided transfers and approaches or surpasses the baselines, with trajectory/hybrid strategies providing further gains depending on hidden-state drift during fine-tuning. The results demonstrate substantial practical benefits, including reduced pretraining costs (e.g., Wav2Vec2-large→Mamba2 ≈ 1.6 days on a single GPU versus full pretraining), enabling broader adoption of linear-time architectures for long-form speech and cross-domain tasks.
Abstract
Architectures such as Linformer and Mamba have recently emerged as competitive linear time replacements for transformers. However, corresponding large pretrained models are often unavailable, especially in non-text domains. To remedy this, we present a Cross-Architecture Layerwise Distillation (CALD) approach that jointly converts a transformer model to a linear time substitute and fine-tunes it to a target task. We also compare several means to guide the fine-tuning to optimally retain the desired inference capability from the original model. The methods differ in their use of the target model and the trajectory of the parameters. In a series of empirical studies on language processing, language modeling, and speech processing, we show that CALD can effectively recover the result of the original model, and that the guiding strategy contributes to the result. Some reasons for the variation are suggested.
