Giter VIP home page Giter VIP logo

dependable_llm's Introduction

dependent-llm

A LLM training and validation pipeline

Installation

pip install -e . to install the library

Example

  • Train an LLAMA-2 7b model with text2sql datasets
python -m dependent.dependent.examples.sft_spider

Usage

  • Refer to how the text2sql example set up the configuration
  • Steps:
    1. Configuration stage: create a fine-tune pipeline configuration dict/yaml/json and wrap it with DPConfig class.
      • The configuration has 4 sections: algorithm, llm, train, and data.
      • Each section is wrapped with the corresponding configuration class.
      • The configuration classes are designed to maximize flexibity in composing different LLM libraries.
      • New arguments required by some LLM library can be easily added in the configuration stage.
    2. Create fine-tuning pipeline: create a customized fine-tuning pipeline with the DPConfig configuration.
      • Fine-tuning pipeline for different task can be different. An example is text2sql pipeline
      • For different tasks, dataset adapter may be needed. An example is text2sql dataset adapter
      • As aforementioned, DPConfig class can help add new arguments easily.
    3. Fine-tunning: run the fine-tuning pipeline.
      • K-split training: use DataSplit class can split, compose, concatenate datasets with ease.
      • Trainer library: use different trainers for fine-tuning.

TODOs

  • Add support for hyperparameter tuning based on the DPConfig class.
  • Add support for more training APIs in trainers
  • Add mlflow to manage the pipeline
  • Add wandb to monitor the training and evaluation process
  • Add RLHF support by referring to trlx

dependable_llm's People

Contributors

zwc662 avatar

Stargazers

 avatar

Watchers

 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.