Skip to content

unionai-oss/bert-llm-classification-pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BERT-LLM Classification Fine-Tuning and Serving Pipeline

This repository contains a pipeline for fine-tuning a BERT-LLM model on a classification task and serving the model using the Union AI workflow and inference platform.

Project Setup

The quickest way to setup and the run the tutorial notebook is often using a hosted notebook, like Google colab.

Open In Colab

Or you can follow the steps below to setup the project locally.

Sign up for a Union account

Serverless is the easiest way to get started with Union. You can sign up for a free account and $30 of credit at Union Serverless. BYOC (Bring Your Own Cloud) is also available for more features and advanced users. Schedule a demo to learn more about Union BYOC.

Read more in the overview of Union Serverless and Union BYOC.

Clone the repository

git clone https://github.com/unionai-oss/bert-llm-classification-pipeline
cd bert-llm-classification-pipeline

Install dependencies

pip install -r requirements.txt

Authenticate to Union from CLI

After you have signed up for Union, you can authenticate to Union from the CLI.

If on Union Serverless union create login --serverless --auth device-flow

If on Union BYOC (Bring Your Own Cloud) union create login --host <union-host-url>

Now your environment is setup to run the project on remotely Union.

Run through the tutorial notebook or run the pipeline from CLI.

The tutorial notebook will guide you through the steps to fine-tune a BERT-LLM model on a classification task and serve the model using Union AI.

jupyter notebook tutorial.ipynb

Or you can run the steps for the training pipeline and serving from the CLI.

Train the model:

Serve the model:

Run Batch Inference:

Run Near Real-time Batch Inference with Actors:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published