Views
No views yet
1from transformers import AutoTokenizer, AutoModel, AutoModelForMaskedLM
2
3tokenizer = AutoTokenizer.from_pretrained("BidirLM/BidirLM-0.6B-Base", trust_remote_code=True)
4
5# Base encoder
6model = AutoModel.from_pretrained("BidirLM/BidirLM-0.6B-Base", trust_remote_code=True)
7
8# Masked language model
9mlm = AutoModelForMaskedLM.from_pretrained("BidirLM/BidirLM-0.6B-Base", trust_remote_code=True)transformers>=5.0trust_remote_code=True.Note: This model was trained withtransformers==4.57.6(transformers 4.x). The version onmainwas patched to work withtransformers>=5.0. For the original (pre-patch) version, which is compatible withtransformers>=4.57.6,<5.0.0, use thetransformers-v4branch:python1from transformers import AutoModel 2model = AutoModel.from_pretrained( 3 "BidirLM/BidirLM-0.6B-Base", 4 trust_remote_code=True, 5 revision="transformers-v4", 6)
1@misc{boizard2026bidirlmtextomnimodalbidirectional,
2 title={BidirLM: From Text to Omnimodal Bidirectional Encoders by Adapting and Composing Causal LLMs},
3 author={Nicolas Boizard and Théo Deschamps-Berger and Hippolyte Gisserot-Boukhlef and Céline Hudelot and Pierre Colombo},
4 year={2026},
5 eprint={2604.02045},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL},
8 url={https://arxiv.org/abs/2604.02045},
9}