GithubHelp home page GithubHelp logo

aaron-di / unofficial-evolutionary-model-merge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fangyuan-ksgk/evolutionary-model-merge

0.0 0.0 0.0 77 KB

Unofficial Implementation of Evolutionary Model Merging

License: Apache License 2.0

Python 54.02% Jupyter Notebook 45.98%

unofficial-evolutionary-model-merge's Introduction

Evolutionary-Model-Merge

Unofficial Implementation of Evolutionary Model Merging ⭐

  • Inspired by work from Sakana.AI [Evolutionary Optimization of Model Merging Recipes] (https://arxiv.org/abs/2403.13187)
  • Built with reference on code from Maxime Labonne's code in AutoMerger, MergeKit, and of course, CLAUDE-3
  • Computation done on @Modal
  • Collaborate with @aarongrainer
ParamSpace.mp4

image

To run your own evolutionary model merge optimizer ⭐

python evolve.py

Evaluating fitness score of a LLM is done by computing the average perplexity score on a instruction-following dataset. I use a experimental one [Ksgk-fy/alignment-sft-test01]. Feel free to replace that with yours ;> Following code allows one to evaluate the model's performance.

modal run eval.py --model-id mistralai/Mistral-7B-Instruct-v0.2

Model Merging with config is done through

modal run merge.py --unique_id

As a experimental run, I've only scraped the top 2 performing 7B LLM from the open llm leaderboard, and SLERP merging is carried out only.

Computation is done on the cloud, using Modal.

Nest to try:

https://towardsdatascience.com/create-mixtures-of-experts-with-mergekit-11b318c99562

unofficial-evolutionary-model-merge's People

Contributors

fangyuan-ksgk 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.