GithubHelp home page GithubHelp logo

iusaspb / demo-llm-tuning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlrun/demo-llm-tuning

0.0 0.0 0.0 3.92 MB

Demo MLRun project for LLM Tuning and serving pipelines

License: Apache License 2.0

Python 43.24% Makefile 3.74% Jupyter Notebook 52.67% Dockerfile 0.36%

demo-llm-tuning's Introduction

MLOpsPedia - The MLOps Master Bot

huggingface-mlrun

This demo demonstrates how to fine tune a LLM and build an ML application: the MLOps master bot! We'll train falcon-7b on Iguazio's MLOps blogs and cover how easy it is to take a model and code from development to production. Even if its a big scary LLM model, MLRun will take care of the dirty work!

We will use:

  • HuggingFace - as the main machine learning framework to get the model and tokenizer.
  • DeepSpeed - as the distributed training framework.
  • and MLRun - as the orchastraitor to operationalize it, moving it from development to production.

The demo contains a single notebook that covers the two main stages in every MLOps project:

  • Training Pipeline Automation - Demonstrating how to get an existing model (falcon-7b) from HuggingFace's Transformers package and operationalize it through all of its life cycle phases: data collection, data ppreparation, training and evaluation, as a fully automated pipeline.
  • Application Serving Pipeline - Showing how to productize the newly trained LLM as a serverless function.

You can find all the python source code under /src

Be sure to check out Yaron Haviv's video Deploying Hugging Face Models to Production at Scale with GPUs to get a walkthrough of a simillar demo.


Installation

This project can run in different development environments:

  • Local computer (using PyCharm, VSCode, Jupyter, etc.)
  • Inside GitHub Codespaces
  • Other managed Jupyter environments

Install the code and mlrun client

To get started, fork this repo into your GitHub account and clone it into your development environment.

To install the package dependencies (not required in GitHub codespaces) use:

make install-requirements

If you prefer to use Conda use this instead (to create and configure a conda env):

make conda-env

Make sure you open the notebooks and select the mlrun conda environment

Install or connect to MLRun service/cluster

The MLRun service and computation can run locally (minimal setup) or over a remote Kubernetes environment.

If your development environment support docker and have enough CPU resources run:

make mlrun-docker

MLRun UI can be viewed in: http://localhost:8060

If your environment is minimal, run mlrun as a process (no UI):

[conda activate mlrun &&] make mlrun-api

For MLRun to run properly you should set your client environment, this is not required when using codespaces, the mlrun conda environment, or iguazio managed notebooks.

Your environment should include MLRUN_ENV_FILE=<absolute path to the ./mlrun.env file> (point to the mlrun .env file in this repo), see mlrun client setup instructions for details.

Note: You can also use a remote MLRun service (over Kubernetes), instead of starting a local mlrun, edit the mlrun.env and specify its address and credentials

demo-llm-tuning's People

Contributors

yonishelach avatar guy1992l avatar yaronha avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.