From 25377d87ddea7f43ee9175209173979693e8b55c Mon Sep 17 00:00:00 2001 From: Jacobsolawetz Date: Thu, 29 Aug 2024 19:38:30 -0500 Subject: [PATCH] Cloud Merging (#410) Introduces a light cloud merging option from Arcee --- README.md | 35 ++++++++++++++++++++++++++++++++--- examples/bio-merge.yml | 15 +++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 examples/bio-merge.yml diff --git a/README.md b/README.md index 0a191a1d..6042d928 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). There is also a [Hugging Face Space](https://huggingface.co/mergekit-community) with limited amounts of GPUs. ## 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..c47101f5 --- /dev/null +++ b/examples/bio-merge.yml @@ -0,0 +1,15 @@ +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