Description
BioGPT is a specialized generative pre-trained transformer model designed for biomedical text generation and mining. Developed by Microsoft researchers, it aims to advance natural language processing capabilities within the biomedical domain. The project provides access to both foundational pre-trained models and versions fine-tuned for specific downstream tasks.
This repository serves as the central hub for BioGPT, offering the implementation details, requirements, and instructions for installation and usage. Users can clone the repository and follow the provided steps to set up the necessary dependencies, including PyTorch, fairseq, Moses, and fastBPE. The project emphasizes clear guidance on configuring environment variables and installing required libraries to ensure a smooth setup process.
BioGPT offers a range of pre-trained model checkpoints, including the base BioGPT and BioGPT-Large, which can be downloaded directly or accessed via the Hugging Face Hub. Additionally, fine-tuned checkpoints are available for tasks such as question answering (BioGPT-QA-PubMedQA), relation extraction (BioGPT-RE-BC5CDR, BioGPT-RE-DDI, BioGPT-RE-DTI), and document classification (BioGPT-DC-HoC). These fine-tuned models are tailored to perform specific biomedical NLP tasks with higher accuracy.
The project also details how to integrate BioGPT into custom code using PyTorch, providing example snippets for both pre-trained and fine-tuned models. Furthermore, BioGPT has been integrated into the Hugging Face transformers library, allowing for straightforward text generation and feature extraction using pipelines and direct model loading. This integration simplifies the adoption of BioGPT for researchers and developers working with biomedical text data.
BioGPT is released under the MIT license, which extends to its pre-trained models, promoting open access and collaboration within the research community. The project also adheres to the Microsoft Open Source Code of Conduct, fostering a welcoming environment for contributions and suggestions from the community. Demos are available on Hugging Face Spaces for interactive exploration of BioGPT's capabilities.
Microsoft BioGPT's Core Features
Generative Pre-trained Transformer for Biomedical Text
Supports text generation and mining tasks
Provides pre-trained and fine-tuned model checkpoints
Integration with Hugging Face transformers library
Available via direct download and Hugging Face Hub
Fine-tuned models for Question Answering
Fine-tuned models for Relation Extraction
Fine-tuned models for Document Classification
Example usage code for PyTorch integration
MIT licensed for open use and distribution
Getting Started with Microsoft BioGPT
Clone Repository: Clone the microsoft/BioGPT GitHub repository.
Install Dependencies: Install PyTorch, fairseq, Moses, fastBPE, sacremoses, and scikit-learn as per instructions.
Configure Environment: Set MOSES and FASTBPE environment variables to their respective installation paths.
Download Checkpoints: Download pre-trained or fine-tuned model checkpoints from provided URLs or Hugging Face Hub.
Integrate into Code: Import necessary classes and load models using provided Python code examples.
Execute Generation: Use the loaded model to encode input text and generate biomedical text.
Utilize Hugging Face: Load BioGPT directly using Hugging Face transformers pipeline for text generation.
Microsoft BioGPT's Use Cases
- Biomedical Text Generation
- Biomedical Question Answering
- Relation Extraction
- Document Classification
- Biomedical Information Mining
- Drug-Target Interaction Prediction








