explaingit

microsoft/biogpt

4,488PythonAudience · researcherComplexity · 4/5LicenseSetup · hard

TLDR

BioGPT is a Microsoft Research language model pre-trained on millions of biomedical research papers, fine-tuned for tasks like extracting drug interactions, answering medical questions, and generating scientific text.

Mindmap

mindmap
  root((BioGPT))
    What it does
      Biomedical language model
      Trained on PubMed papers
      Text generation and QA
    Model Variants
      BioGPT base
      BioGPT-Large
      Fine-tuned task models
    Tasks Supported
      Relation extraction
      Document classification
      Question answering
      Text generation
    Usage Methods
      Hugging Face easy path
      fairseq advanced path
    Audience
      Biomedical researchers
      NLP developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Mine PubMed literature to automatically extract drug-drug or drug-target interaction pairs from scientific papers

USE CASE 2

Build a question-answering system that answers biomedical questions by reading research literature

USE CASE 3

Generate biomedical text that continues a given scientific prompt for draft writing or hypothesis exploration

USE CASE 4

Fine-tune BioGPT on a custom biomedical dataset to classify papers by topic or extract domain-specific entities

Tech stack

PythonPyTorchfairseqHugging Face Transformers

Getting it running

Difficulty · hard Time to first run · 1h+

The fairseq path requires installing several tools from source, the Hugging Face route is much simpler and recommended for most users.

MIT License, use freely for any purpose, including commercial use, with attribution.

In plain English

BioGPT is a language model from Microsoft Research trained specifically on biomedical text. While general-purpose language models are trained on broad internet text, BioGPT was pre-trained on a large collection of biomedical research papers from PubMed, making it better suited for tasks involving medical and scientific language. The repository provides code and pre-trained model weights for several versions of the model, including a larger variant called BioGPT-Large. Beyond the base pre-trained model, fine-tuned versions are also available for specific tasks: extracting relationships between biological entities (such as drug-drug interactions or drug-target interactions), classifying documents by topic, answering questions from biomedical literature, and generating biomedical text. There are two main ways to use the models. The original method uses the fairseq training framework, which requires several additional tools installed from source, including a tokenizer and a byte-pair encoding tool. The simpler method is through the Hugging Face transformers library, where the model is available as a standard component and can be loaded with just a few lines of Python code. The Hugging Face route is substantially easier for most users. The models run on GPU and are intended for researchers and developers working in biomedical natural language processing. Practical use cases mentioned in the repository include mining scientific literature for entity relationships, building question-answering systems over medical papers, and generating biomedical text that continues a given prompt. This is a research release. It is not a consumer product or clinical tool, and the README does not describe any production deployment pathway.

Copy-paste prompts

Prompt 1
Using the BioGPT model from Hugging Face, write Python code to answer this biomedical question: 'What are the known interactions between metformin and statins?'
Prompt 2
Show me how to load BioGPT-Large with the transformers library and use it to extract drug-target relationships from this abstract: [paste abstract].
Prompt 3
How do I fine-tune BioGPT on a custom biomedical NER dataset using the fairseq framework?
Prompt 4
Write a Python script that takes a list of PubMed abstracts and uses BioGPT to classify each one into a topic category.
Prompt 5
Using BioGPT via Hugging Face transformers, generate a continuation of this biomedical hypothesis: [your hypothesis text].
Open on GitHub → Explain another repo

← microsoft on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.