From fea373953ab3c5bf2581e2cdfa3a83ac06a5ed81 Mon Sep 17 00:00:00 2001 From: jacobsolawetz Date: Mon, 26 Aug 2024 15:59:21 -0500 Subject: [PATCH 1/5] cloud merging --- README.md | 35 ++++++++++++++++++++++++++++++++--- examples/bio-merge.yml | 16 ++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 examples/bio-merge.yml diff --git a/README.md b/README.md index 0a191a1d..96393d92 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ Features: - Interpolated gradients for parameter values (inspired by Gryphe's [BlockMerge_Gradient](https://github.com/Gryphe/BlockMerge_Gradient) script) - Piecewise assembly of language models from layers ("Frankenmerging") - [Mixture of Experts merging](#mixture-of-experts-merging) +- [LORA extraction](#lora-extraction) +- [Evolutionary merge methods](#evolutionary-merge-methods) -🔊 Call to Evolve - to solve evolutionary merge methods as a community - please see . - -🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a graphical user interface for mergekit in Hugging Face Spaces! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at [Hugging Face Spaces - mergekit-community](https://huggingface.co/mergekit-community). +🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU Backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](app.arcee.ai). ## Installation @@ -213,6 +213,35 @@ mergekit-extract-lora finetuned_model_id_or_path base_model_id_or_path output_pa The `mergekit-moe` script supports merging multiple dense models into a mixture of experts, either for direct use or for further training. For more details see the [`mergekit-moe` documentation](docs/moe.md). +## Evolutionary merge methods + +See `docs/evolve.md` for details. + +## ✨ Merge in the Cloud ✨ + +We host merging on Arcee's cloud GPUs - you can launch a cloud merge in the [Arcee App](app.arcee.ai). Or through python - grab an ARCEE_API_KEY: + +`export ARCEE_API_KEY=` +`pip install -q arcee-py` + +``` +import arcee +arcee.merge_yaml("bio-merge","./examples/bio-merge.yml") +``` + +Check your merge status at the [Arcee App](app.arcee.ai) + +When complete, either deploy your merge: + +``` +arcee.start_deployment("bio-merge", merging="bio-merge") +``` + +Or download your merge: + +`!arcee merging download bio-merge` + + ## Citation We now have a [paper](https://arxiv.org/abs/2403.13257) you can cite for the MergeKit library: diff --git a/examples/bio-merge.yml b/examples/bio-merge.yml new file mode 100644 index 00000000..aaf84db9 --- /dev/null +++ b/examples/bio-merge.yml @@ -0,0 +1,16 @@ +models: + - model: mistralai/Mistral-7B-Instruct-v0.2 + parameters: + density: 0.5 + weight: 0.5 + - model: BioMistral/BioMistral-7B + parameters: + density: 0.5 + weight: 0.5 + +merge_method: ties +base_model: mistralai/Mistral-7B-v0.1 +parameters: + normalize: false + int8_mask: true +dtype: float16 \ No newline at end of file From 4b72299b0cb10f04e4c60135073a940e5dad9e43 Mon Sep 17 00:00:00 2001 From: jacobsolawetz Date: Wed, 28 Aug 2024 10:12:39 -0500 Subject: [PATCH 2/5] fix bio merge example --- examples/bio-merge.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/bio-merge.yml b/examples/bio-merge.yml index aaf84db9..bc9dba66 100644 --- a/examples/bio-merge.yml +++ b/examples/bio-merge.yml @@ -7,7 +7,6 @@ models: parameters: density: 0.5 weight: 0.5 - merge_method: ties base_model: mistralai/Mistral-7B-v0.1 parameters: From eb78b6823722a17f56485b2b12b549722c95a27d Mon Sep 17 00:00:00 2001 From: jacobsolawetz Date: Wed, 28 Aug 2024 10:14:26 -0500 Subject: [PATCH 3/5] bio merge yaml fix2 --- examples/bio-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/bio-merge.yml b/examples/bio-merge.yml index bc9dba66..c47101f5 100644 --- a/examples/bio-merge.yml +++ b/examples/bio-merge.yml @@ -12,4 +12,4 @@ base_model: mistralai/Mistral-7B-v0.1 parameters: normalize: false int8_mask: true -dtype: float16 \ No newline at end of file +dtype: float16 From c4b465da91c1a3f0ffe938eb5af883bc21098f9b Mon Sep 17 00:00:00 2001 From: jacobsolawetz Date: Wed, 28 Aug 2024 12:02:51 -0500 Subject: [PATCH 4/5] hf space ressurection --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96393d92..637dff59 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Features: - [LORA extraction](#lora-extraction) - [Evolutionary merge methods](#evolutionary-merge-methods) -🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU Backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](app.arcee.ai). +🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU Backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](app.arcee.ai). There is also a [Hugging Face Space](https://huggingface.co/mergekit-community) with some GPUs, but limited amounts of GPUs. ## Installation From 9c9b3fb4461997b6d9f2d0e806dab17a5e6ccf90 Mon Sep 17 00:00:00 2001 From: jacobsolawetz Date: Thu, 29 Aug 2024 19:28:45 -0500 Subject: [PATCH 5/5] with limited GPUs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 637dff59..6042d928 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Features: - [LORA extraction](#lora-extraction) - [Evolutionary merge methods](#evolutionary-merge-methods) -🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU Backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](app.arcee.ai). There is also a [Hugging Face Space](https://huggingface.co/mergekit-community) with some GPUs, but limited amounts of GPUs. +🌐 GUI Launch Alert 🤗 - We are excited to announce the launch of a mega-GPU Backed graphical user interface for mergekit in Arcee! This GUI simplifies the merging process, making it more accessible to a broader audience. Check it out and contribute at the [Arcee App](app.arcee.ai). There is also a [Hugging Face Space](https://huggingface.co/mergekit-community) with limited amounts of GPUs. ## Installation