Instructions to use InferenceIllusionist/TeTO-MS-8x7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use InferenceIllusionist/TeTO-MS-8x7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="InferenceIllusionist/TeTO-MS-8x7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("InferenceIllusionist/TeTO-MS-8x7b") model = AutoModelForCausalLM.from_pretrained("InferenceIllusionist/TeTO-MS-8x7b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use InferenceIllusionist/TeTO-MS-8x7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "InferenceIllusionist/TeTO-MS-8x7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InferenceIllusionist/TeTO-MS-8x7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/InferenceIllusionist/TeTO-MS-8x7b
- SGLang
How to use InferenceIllusionist/TeTO-MS-8x7b 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 "InferenceIllusionist/TeTO-MS-8x7b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InferenceIllusionist/TeTO-MS-8x7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "InferenceIllusionist/TeTO-MS-8x7b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "InferenceIllusionist/TeTO-MS-8x7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use InferenceIllusionist/TeTO-MS-8x7b with Docker Model Runner:
docker model run hf.co/InferenceIllusionist/TeTO-MS-8x7b
TeTO-MS-8x7b
Tesoro + Typhon + OpenGPT
Presenting a Model Stock experiment combining the unique strengths from the following 8x7b Mixtral models:
- Tess-2.0-Mixtral-8x7B-v0.2 / migtissera / General Purpose
- Typhon-Mixtral-v1 / Sao10K / Creative & Story Completion
- Open_Gpt4_8x7B_v0.2 / rombodawg / Conversational
Weighted (iMat) GGUFS: https://huggingface.co/Quant-Cartel/TeTO-MS-8x7b-iMat-GGUF
EXL2 rpcal courtesy of Quant Cartel: https://huggingface.co/Quant-Cartel/TeTO-MS-8x7b-exl2-rpcal
Recommended Template
- Basic: Alpaca Format
- Advanced: See context/instruct/sampler settings in our new Recommended Settings repo.
- Huge shout out to rAIfle for his original work on the Wizard 8x22b templates which were modified for this model.
Methodology
[I]nnovative layer-wise weight averaging technique surpasses state-of-the-art model methods such as Model Soup, utilizing only two fine-tuned models. This strategy can be aptly coined Model Stock, highlighting its reliance on selecting a minimal number of models to draw a more optimized-averaged model (From arXiv:2403.19522)
- Methodology and merging process was based on the following paper - Model Stock: All we need is just a few fine-tuned models
- Initial model selection was based on top performing models of Mixtral architecture covering a variety of use cases and skills
- Base model (Mixtral Instruct 8x7b v0.1) was chosen after outperforming two other potential base models in terms of MMLU benchmark performance.
Output
This is a merge of pre-trained language models created using mergekit.
Merge Details
Merge Method
This model was merged using the Model Stock merge method using Mixtral-8x7B-v0.1-Instruct as a base.
Models Merged
The following models were included in the merge:
- migtissera_Tess-2.0-Mixtral-8x7B-v0.2
- rombodawg_Open_Gpt4_8x7B_v0.2
- Sao10K_Typhon-Mixtral-v1
Configuration
The following YAML configuration was used to produce this model:
models:
- model: models/migtissera_Tess-2.0-Mixtral-8x7B-v0.2
- model: models/Sao10K_Typhon-Mixtral-v1
- model: models/rombodawg_Open_Gpt4_8x7B_v0.2
merge_method: model_stock
base_model: models/Mixtral-8x7B-v0.1-Instruct
dtype: float16
Appendix - Llama.cpp MMLU Benchmark Results*
These results were calculated via perplexity.exe from llama.cpp using the following params:
.\perplexity -m .\models\TeTO-8x7b-MS-v0.03\TeTO-MS-8x7b-Q6_K.gguf -bf .\evaluations\mmlu-test.bin --multiple-choice -c 8192 -t 23 -ngl 200
* V0.01 (4 model / Mixtral Base):
Final result: 43.3049 +/- 0.4196
Random chance: 25.0000 +/- 0.3667
* V0.02 (3 model / Tess Mixtral Base):
Final result: 43.8356 +/- 0.4202
Random chance: 25.0000 +/- 0.3667
* V0.03 (4 model / Mixtral Instruct Base):
Final result: 45.7004 +/- 0.4219
Random chance: 25.0000 +/- 0.3667
*Please be advised metrics above are not representative of final HF benchmark scores for reasons given here
- Downloads last month
- 9