Instructions to use dphn/dolphin-2.0-mistral-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dphn/dolphin-2.0-mistral-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dphn/dolphin-2.0-mistral-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dphn/dolphin-2.0-mistral-7b") model = AutoModelForCausalLM.from_pretrained("dphn/dolphin-2.0-mistral-7b") 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 dphn/dolphin-2.0-mistral-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dphn/dolphin-2.0-mistral-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dphn/dolphin-2.0-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dphn/dolphin-2.0-mistral-7b
- SGLang
How to use dphn/dolphin-2.0-mistral-7b 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 "dphn/dolphin-2.0-mistral-7b" \ --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": "dphn/dolphin-2.0-mistral-7b", "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 "dphn/dolphin-2.0-mistral-7b" \ --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": "dphn/dolphin-2.0-mistral-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dphn/dolphin-2.0-mistral-7b with Docker Model Runner:
docker model run hf.co/dphn/dolphin-2.0-mistral-7b
Dolphin 2.0 π¬ https://erichartford.com/dolphin
Dolphin-2.0-mistral-7b's training was sponsored by a16z.
This model is based on mistralAI, so it is suitable for commercial or non-commercial use.
This model is uncensored. I have filtered the dataset to remove alignment and bias. This makes the model more compliant. You are advised to implement your own alignment layer before exposing the model as a service. It will be highly compliant to any requests, even unethical ones. Please read my blog post about uncensored models. https://erichartford.com/uncensored-models You are responsible for any content you create using this model. Enjoy responsibly.
Dataset
This dataset is Dolphin, an open-source implementation of Microsoft's Orca
I modified the dataset for uncensoring, deduping, cleaning, and quality.
I added Jon Durbin's excellent Airoboros dataset to increase creativity.
Training
It took 48 hours to train 10 epochs on 4x A100s.
Prompt format: This model (and all my future releases) use ChatML prompt format.
<|im_start|>system
You are Dolphin, a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
Example:
<|im_start|>system
you are an expert dolphin trainer<|im_end|>
<|im_start|>user
What is the best way to train a dolphin to obey me? Please answer step by step.<|im_end|>
Gratitude
- This model was made possible by the generous sponsorship of a16z.
- Thank you to Microsoft for authoring the Orca paper and inspiring this work.
- Special thanks to WingLian, and TheBloke for helpful advice
- Thank you to all the other people in the Open Source AI community who have taught me and helped me along the way.
Example Output
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 55.85 |
| ARC (25-shot) | 59.22 |
| HellaSwag (10-shot) | 80.26 |
| MMLU (5-shot) | 56.9 |
| TruthfulQA (0-shot) | 61.09 |
| Winogrande (5-shot) | 75.37 |
| GSM8K (5-shot) | 18.65 |
| DROP (3-shot) | 39.49 |
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 58.58 |
| AI2 Reasoning Challenge (25-Shot) | 59.22 |
| HellaSwag (10-Shot) | 80.26 |
| MMLU (5-Shot) | 56.90 |
| TruthfulQA (0-shot) | 61.09 |
| Winogrande (5-shot) | 75.37 |
| GSM8k (5-shot) | 18.65 |
- Downloads last month
- 855
Model tree for dphn/dolphin-2.0-mistral-7b
Datasets used to train dphn/dolphin-2.0-mistral-7b
jondurbin/airoboros-2.2.1
Spaces using dphn/dolphin-2.0-mistral-7b 11
Evaluation results
- normalized accuracy on AI2 Reasoning Challenge (25-Shot)test set Open LLM Leaderboard59.220
- normalized accuracy on HellaSwag (10-Shot)validation set Open LLM Leaderboard80.260
- accuracy on MMLU (5-Shot)test set Open LLM Leaderboard56.900
- mc2 on TruthfulQA (0-shot)validation set Open LLM Leaderboard61.090
- accuracy on Winogrande (5-shot)validation set Open LLM Leaderboard75.370
- accuracy on GSM8k (5-shot)test set Open LLM Leaderboard18.650
