Views
No views yet
gena-lm-bert-base-yeast is trained on the baker’s yeast (Saccharomyces cerevisiae) genome.gena-lm-bert-base-yeast) model is trained with a masked language model (MLM) objective, following data preprocessing methods pipeline in the BigBird paper and by masking 15% of tokens. Model config for gena-lm-bert-base-yeast is similar to the bert-base:gena-lm-bert-base-yeast on data obtained from O’Donnell et al. and includes telomere-to-telomere assemblies of 142 strains. Specific accessions are available here.
Pre-training was performed for 3,325,000 iterations with batch size 256 and sequence length was equal to 512 tokens. We modified Transformer to use Pre-Layer normalization. We upload the checkpoint with the best loss on validation set.1from transformers import AutoTokenizer, AutoModel
2
3tokenizer = AutoTokenizer.from_pretrained('AIRI-Institute/gena-lm-bert-base-yeast')
4model = AutoModel.from_pretrained('AIRI-Institute/gena-lm-bert-base-yeast', trust_remote_code=True)
5git clone https://github.com/AIRI-Institute/GENA_LM.git1from GENA_LM.src.gena_lm.modeling_bert import BertForSequenceClassification
2from transformers import AutoTokenizer
3
4tokenizer = AutoTokenizer.from_pretrained('AIRI-Institute/gena-lm-bert-base-yeast')
5model = BertForSequenceClassification.from_pretrained('AIRI-Institute/gena-lm-bert-base-yeast')1from transformers import AutoTokenizer, AutoModel
2model = AutoModel.from_pretrained('AIRI-Institute/gena-lm-bert-base-yeast', trust_remote_code=True)
3gena_module_name = model.__class__.__module__
4print(gena_module_name)
5import importlib
6# available class names:
7# - BertModel, BertForPreTraining, BertForMaskedLM, BertForNextSentencePrediction,
8# - BertForSequenceClassification, BertForMultipleChoice, BertForTokenClassification,
9# - BertForQuestionAnswering
10# check https://huggingface.co/docs/transformers/model_doc/bert
11cls = getattr(importlib.import_module(gena_module_name), 'BertForSequenceClassification')
12print(cls)
13model = cls.from_pretrained('AIRI-Institute/gena-lm-bert-base-yeast', num_labels=2)1@article{GENA_LM,
2 author = {Fishman, Veniamin and Kuratov, Yuri and Shmelev, Aleksei and Petrov, Maxim and Penzar, Dmitry and Shepelin, Denis and Chekanov, Nikolay and Kardymon, Olga and Burtsev, Mikhail},
3 title = {GENA-LM: a family of open-source foundational DNA language models for long sequences},
4 journal = {Nucleic Acids Research},
5 volume = {53},
6 number = {2},
7 pages = {gkae1310},
8 year = {2025},
9 month = {01},
10 issn = {0305-1048},
11 doi = {10.1093/nar/gkae1310},
12 url = {https://doi.org/10.1093/nar/gkae1310},
13 eprint = {https://academic.oup.com/nar/article-pdf/53/2/gkae1310/61443229/gkae1310.pdf},
14}