Code Monkey home page Code Monkey logo

blendit's Introduction

blend🍸t

A simple LLM blender, to easily combine the best available open-source large language models into a super one.

Pre-requisites

1. Setup your Environment

Install Dependencies

  • Clone this repository and navigate into it:

    git clone https://github.com/pandego/blendit.git
    cd blendit
  • Create and activate your Python Environment:

    conda env create -f envrionment.yml
    conda activate blendit
  • Initiate your project with poetry:

    poetry install

That's it for the Python environment!

2. Blend it

In order to blend models you will have to setup a config.yaml file with the instructions for the blend. You can find some examples in src/config/.

  • (Optional) If you need to download a set of models to get started with the example above, you can run the following command:

    bash download_models.sh
  • Run the follow command to launch the blend, and let it shake 🍸

    sh run_merge.sh

    If you are curious, the most important part of the script is the following:

    mergekit-yaml src/config/example_task_arithmetic.yaml models/merged-models/my-first-blend \
    --verbose \
    --allow-crimes \         # experimental: allows blends of different model architectures
    --no-cuda \              # if you have a big Nvidia GPU, then set this to --cuda
    --copy-tokenizer \       # copies the tokenizer from the base model
    --out-shard-size 1B \    # splits model so it can be load in smaller RAMs (default: parse_kmb("5B"))
    --lazy-unpickle \        # experimental: lowers memory usage
    --write-model-card \
    --low-cpu-memory \
    --random-seed 123 \
    --trust-remote-code \
    --safe-serialization

    You can see all the options by running mergekit-yaml --help.

3. Upload it to HuggingFace

In order submit your blend to OpenLLM Leaderboard, you need to upload it to HuggingFace first.

  • You can do that by running the following script and follow the instructions:
    sh upload_model_to_hf.sh

#TODOs

[ ] Add way to test model locally
[x] Add way to submit it to HF for evaluation
[ ] Wrap it all up in a nice Streamlit App 
[ ] Dockerize it, deploy it!

blendit's People

Contributors

pandego avatar

Stargazers

Mehdi Elion avatar  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.