Tie merging

#3
by Vezora - opened

Could you possibly share the script you used for ties merging on a mistral model? It would be a great help thank you!

Vezora changed discussion title from Tie merging. to Tie merging

Hi @Vezora ,

I used this repo:

https://github.com/cg123/mergekit

The weights and density things are related to this repo.

Thank you so much for your quick reply!
I see where you wrote the density and weights on your repo, thank you for that!

If I could bother you once more, is this what your yaml looked like? Sorry there is not example for ties merge on their read me.

slices:
  - sources:
    - model: C:\Users\PC\Documents\text-generation-webui\models\mistral-7b
      Weight: .05
      Density: .05
  - sources:
    - model: C:\Users\PC\Documents\text-generation-webui\models\Mistral-7B
      Weight: .05
      Density: .05
merge_method: ties
dtype: bfloat16

Thank you!

You need to specify the base model as well. :)

If you find YAML difficult, you can use this alternative (of course, you will need to make changes here).

mergekit-legacy ./output-model --base-model TheBloke/Llama-2-13B-fp16 --cuda \
    --merge WizardLM/WizardLM-13B-V1.2 --weight 0.3 --density 0.5 \
    --merge garage-bAInd/Platypus2-13B --weight 0.5 --density 0.5

Thank you for mentioning that legacy command, I tried with yaml and got a bunch of errors. Thank you! I got it to work!

Weyaxi changed discussion status to closed

Sign up or log in to comment