Skip to content

LLM-Merging: Building LLMs Efficiently through Merging

Notifications You must be signed in to change notification settings

sushant-97/LLM-Merging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM-Merging: Building LLMs Efficiently through Merging

This includes the starter code for the LLM-Merging competition.

Setup Environment

conda env create -f environment.yml --name llm-merging
conda activate llm-merging 

Developing New Merging Methods

  1. To add a new merging method, create a new file in llm_merging/merging.

    This file should implement __init__.py and merge.py functions and extend llm_merging/merging/Merges.

    See llm_merging/merging/FlanT5Avg.py or llm_merging/merging/LlamaAvg.py for examples.

  2. Modify setup.py and add an entry with the merging method inllm_merging.merging.Merges.

    For example, the entry llama_avg = llm_merging.merging.LlamaAvg:LlamaAvg indicates the method is called llama_avg and the file is at llm_merging/merging/LlamaAvg

Evaluate Method

Authentication tokens are requied for certain models like Llama2 which require user agreeing to some terms. The authentication token can be found here export HF_AUTH_TOKEN=""

python llm_merging/setup.py install 
python llm_merging/main.py -m {merging_method}

About

LLM-Merging: Building LLMs Efficiently through Merging

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 58.4%
  • Python 41.6%