For pretraining with entity-entity relations, see the folder lm-bio-kgc. The code in this folder was adapter from the paper "Scientific Language Models for Biomedical Knowledge Base Completion: An Empirical Study".
For pretraining with entity synonyms, see the folder rescnn_bioel.
Each subfolder has its own instructions.