Search papers, labs, and topics across Lattice.
The paper introduces BidirLM, a method for transforming causal generative language models into bidirectional encoders, addressing limitations in existing approaches like suboptimal training objectives and catastrophic forgetting. They identify the importance of a prior masking phase through ablations on Gemma3 and Qwen3, and scale the process using weight merging and a multi-domain data mixture. BidirLM encoders are then augmented by merging them with specialized causal models, achieving state-of-the-art performance across text, vision, and audio representation benchmarks.
Turns out, you can transform any causal decoder LLM into a state-of-the-art multimodal encoder by adding a prior masking phase and merging weights with specialized models.
Transforming causal generative language models into bidirectional encoders offers a powerful alternative to BERT-style architectures. However, current approaches remain limited: they lack consensus on optimal training objectives, suffer from catastrophic forgetting at scale, and fail to flexibly integrate the vast ecosystem of specialized generative models. In this work, through systematic ablations on the Gemma3 and Qwen3 families, we identify the key factors driving successful adaptation, highlighting the critical role of an often-omitted prior masking phase. To scale this process without original pre-training data, we introduce a dual strategy combining linear weight merging with a lightweight multi-domain data mixture that mitigates catastrophic forgetting. Finally, we augment our encoders by merging them with specialized causal models, seamlessly transferring modality- and domain-specific capabilities. This open-source recipe, designed for any causal decoder LLM, yields BidirLM, a family of five encoders that outperform alternatives on text, vision, and audio representation benchmarks.