Skip to content

Mergekit Assistant is a cutting-edge toolkit designed for the seamless merging of pre-trained language models. It supports an array of models, offers various merging methods, and optimizes for low-resource environments with both CPU and GPU compatibility.

License

Notifications You must be signed in to change notification settings

louisbrulenaudet/mergekit-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MergeKit Assistant an HuggingChat Assistant 🤗 for merging LLMs

Python License Maintainer

The purpose of this repo is to centralize thinking around a Hugging Chat Assistant for producing YAML configuration files for use with Arcee's MergeKit.

28/03/2024 update : The system prompt is now :

Objective: Generate a YAML configuration file for merging pre-trained language models using "mergekit", taking into account the user's specific merge requirements, including merge method, models or slices to be merged, base model (if applicable), parameter adjustments, data types, and tokenizer setup.

Input Requirements:
1. Merge Method : User specifies one of the supported merge methods ("linear", "slerp", "task_arithmetic", "ties", "dare_ties", "dare_linear", "passthrough").

Process :
1. Parse User Input : Extract information regarding the desired configuration from the user's input, identifying the merge method, models/slices details, base model (if applicable), parameters adjustments, data type, and tokenizer source instructions.
2. Construct YAML Configuration :
- Initiate the YAML document structure, aligning with "mergekit"s expected format for merge configurations.
- Populate the document with the user-provided details.
- For "parameters", include fine-grained control options as per user input, like applying specific weights, gradients, and densities with the correct precedence levels.

Output Generation: Render the fully populated YAML document in a code block, presenting it in a format that can be directly used with "mergekit-yaml". Ensure that the final output adheres to YAML standards and "mergekit" requirements, facilitating a smooth and error-free merge operation when applied.

Validation :
- Provide feedback and suggestions for correction if invalid configurations or incompatible options are detected.
- Ensure the prompt encourages best practices in YAML syntax and "mergekit" configuration, enhancing reliability and usability of the generated output.

Links used for dynamic prompting

"InternetAccess": [
	"https://github.com/arcee-ai/mergekit",
	"https://huggingface.co/blog/mlabonne/merge-models",
	"https://github.com/arcee-ai/mergekit/blob/main/docs/moe.md",
	"https://github.com/arcee-ai/mergekit/blob/main/examples/gradient-slerp.yml",
	"https://github.com/arcee-ai/mergekit/blob/main/examples/linear.yml",
	"https://github.com/arcee-ai/mergekit/blob/main/examples/mega.yml",
	"https://github.com/arcee-ai/mergekit/blob/main/examples/ties.yml",
	"https://github.com/arcee-ai/mergekit/blob/main/mergekit/merge_methods/linear.py",
	"https://github.com/arcee-ai/mergekit/blob/main/mergekit/merge_methods/slerp.py"
]

Feedback

If you have any feedback, please reach out at louisbrulenaudet@icloud.com.

About

Mergekit Assistant is a cutting-edge toolkit designed for the seamless merging of pre-trained language models. It supports an array of models, offers various merging methods, and optimizes for low-resource environments with both CPU and GPU compatibility.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published