Instructions to use ntegrals/Mistral-Merge-Ties-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ntegrals/Mistral-Merge-Ties-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ntegrals/Mistral-Merge-Ties-Instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ntegrals/Mistral-Merge-Ties-Instruct") model = AutoModelForCausalLM.from_pretrained("ntegrals/Mistral-Merge-Ties-Instruct") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ntegrals/Mistral-Merge-Ties-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ntegrals/Mistral-Merge-Ties-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ntegrals/Mistral-Merge-Ties-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ntegrals/Mistral-Merge-Ties-Instruct
- SGLang
How to use ntegrals/Mistral-Merge-Ties-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ntegrals/Mistral-Merge-Ties-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ntegrals/Mistral-Merge-Ties-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ntegrals/Mistral-Merge-Ties-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ntegrals/Mistral-Merge-Ties-Instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ntegrals/Mistral-Merge-Ties-Instruct with Docker Model Runner:
docker model run hf.co/ntegrals/Mistral-Merge-Ties-Instruct
| base_model: | |
| - ntegrals/Mistral-Merge-7B-Instruct-Slerp | |
| - OpenPipe/mistral-ft-optimized-1218 | |
| - mistralai/Mistral-7B-v0.1 | |
| library_name: transformers | |
| tags: | |
| - mergekit | |
| - merge | |
| # merged | |
| This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit). | |
| ## Merge Details | |
| ### Merge Method | |
| This model was merged using the [TIES](https://arxiv.org/abs/2306.01708) merge method using [mistralai/Mistral-7B-v0.1](https://huggingface.co/mistralai/Mistral-7B-v0.1) as a base. | |
| ### Models Merged | |
| The following models were included in the merge: | |
| * [ntegrals/Mistral-Merge-7B-Instruct-Slerp](https://huggingface.co/ntegrals/Mistral-Merge-7B-Instruct-Slerp) | |
| * [OpenPipe/mistral-ft-optimized-1218](https://huggingface.co/OpenPipe/mistral-ft-optimized-1218) | |
| ### Configuration | |
| The following YAML configuration was used to produce this model: | |
| ```yaml | |
| base_model: mistralai/Mistral-7B-v0.1 | |
| dtype: float16 | |
| merge_method: ties | |
| modules: | |
| default: | |
| slices: | |
| - sources: | |
| - layer_range: [0, 32] | |
| model: mistralai/Mistral-7B-v0.1 | |
| - layer_range: [0, 32] | |
| model: OpenPipe/mistral-ft-optimized-1218 | |
| parameters: | |
| density: 0.5 | |
| weight: 0.5 | |
| - layer_range: [0, 32] | |
| model: ntegrals/Mistral-Merge-7B-Instruct-Slerp | |
| parameters: | |
| density: 0.5 | |
| weight: 0.3 | |
| parameters: | |
| normalize: 1.0 | |
| ``` | |