Skip to content

Machine-Learning-for-Medical-Language/cnlp_llm

Repository files navigation

cnlp_llm

LLMs for Clinical NLP

Introduction

The goal of this library is to consolidate, extend, and provide helpful wrappers around tools for training and evaluating decoder LLMs for clinical NLP.

Table of Contents

Installation

Clone this repo and install using uv:

git clone https://github.com/Machine-Learning-for-Medical-Language/cnlp_llm.git
cd cnlp_llm
uv sync
source .venv/bin/activate

Development Tools

A few useful development tools are provided via the Makefile.

To install pre-commit hooks, run make hooks.

To lint, format, and type check your code, run make check.

To run tests with pytest, run make test.

Training

Pretraining (not yet implemented)

...

Fine-tuning

We use TRL for fine-tuning. Refer to the examples or run cnlp_llm finetune for more details.

Chat, Evaluation, and Serving

Simple Chat REPL

To start an interactive chat session with a model, run cnlp_llm chat. See the examples for more info.

Evaluation

For evaluation, we use Inspect. For more details, see the examples or the Inspect documentation.

Hosting an Inference Server

You can serve inference of an inspect Task on your local network with cnlp_llm serve. See the examples for more info.

About

LLMs for Clinical NLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •