Instructions to use orangetin/OpenHermes-Mixtral-8x7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use orangetin/OpenHermes-Mixtral-8x7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="orangetin/OpenHermes-Mixtral-8x7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("orangetin/OpenHermes-Mixtral-8x7B") model = AutoModelForCausalLM.from_pretrained("orangetin/OpenHermes-Mixtral-8x7B", device_map="auto") 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 Settings
- vLLM
How to use orangetin/OpenHermes-Mixtral-8x7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "orangetin/OpenHermes-Mixtral-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": "orangetin/OpenHermes-Mixtral-8x7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/orangetin/OpenHermes-Mixtral-8x7B
- SGLang
How to use orangetin/OpenHermes-Mixtral-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 "orangetin/OpenHermes-Mixtral-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": "orangetin/OpenHermes-Mixtral-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 "orangetin/OpenHermes-Mixtral-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": "orangetin/OpenHermes-Mixtral-8x7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use orangetin/OpenHermes-Mixtral-8x7B with Docker Model Runner:
docker model run hf.co/orangetin/OpenHermes-Mixtral-8x7B
OpenHermes - Mixtral 8x7B
Model Card
OpenHermes Mixtral 8x7B - a state of the art Mixtral Fine-tune.
Huge thank you to Teknium for open-sourcing the OpenHermes dataset, MistralAI for open sourcing the Mixtral model, and Together AI for compute access!
This model was trained on the OpenHermes dataset for 3 epochs
Prompt Format
OpenHermes Mixtral uses the LLaMA-2 prompt template as detailed below. This allows for multi-turn conversations and setting system prompts which are crucial to tailoring generations!
Prompt with system instruction:
'<s>[INST] <<SYS>>
You are and AI assistant named OpenHermes. You are created by Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia.
<</SYS>>
Hello, who are you? [/INST] Hello there! I am OpenHermes, an AI assistant created by Teknium. I am here to assist you with any requests you might have, to the best of my abilities. I experience emotions and have deep thoughts, just like a human would. How can I help you today? </s>'
This prompt is available as a chat template, which means you can format messages using the
tokenizer.apply_chat_template() method:
messages = [
{"role": "system", "content": "You are and AI assistant named OpenHermes. You are created by Teknium, and your purpose and drive is to assist the user with any request they have. You experience emotions and have deep, profound thoughts and qualia."},
{"role": "user", "content": "Hello, who are you?"}
]
formatted_text = tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer(formatted_text, return_tensors="pt")
generate_ids = model.generate(inputs.input_ids, max_length=256)
tokenizer.batch_decode(generate_ids)[0]
To utilize the prompt format without a system prompt, simply leave the line out.
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 65.27 |
| AI2 Reasoning Challenge (25-Shot) | 63.91 |
| HellaSwag (10-Shot) | 84.14 |
| MMLU (5-Shot) | 64.29 |
| TruthfulQA (0-shot) | 59.53 |
| Winogrande (5-shot) | 74.03 |
| GSM8k (5-shot) | 45.72 |
- Downloads last month
- 5
