cs.CLApr 2, 2026

BidirLM: From Text to Omnimodal Bidirectional Encoders by Adapting and Composing Causal LLMs

Authors: Nicolas Boizard, Théo Deschamps-Berger, Hippolyte Gisserot-Boukhlef, Céline Hudelot, Pierre Colombo

Organizations: Diabolocom · MICS, CentraleSupélec, Université Paris-Saclay · Artefact Research Center · Cohere

Abstract

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.

Figures & tables

Appendix figures & tables17 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. A Causal Language Modeling Detour Improves Encoder Continued Pretraining

    May 12, 2026Rian Touchent, Eric de la ClergerieLanguage Model PretrainingMasked Language Modeling

  2. Encoder-Free Multimodal LLMs Learn Implicit Encoders

    Oct 16, 2026David Harwath, Desh Raj, Xavier Velez +5Multimodal Large Language ModelsMultimodal Model Interpretability

  3. UltraBERT: Beyond the Limit of BERT Pre-Training

    Oct 10, 2026Jungwoo Park, Taewhoo Lee, Jaewoo KangLanguage Model PretrainingMasked Language Modeling