Text Generation
Transformers
Safetensors
llama
Generated from Trainer
axolotl
conversational
text-generation-inference
Instructions to use dphn/dolphin-2.9.1-yi-1.5-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dphn/dolphin-2.9.1-yi-1.5-9b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dphn/dolphin-2.9.1-yi-1.5-9b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dphn/dolphin-2.9.1-yi-1.5-9b") model = AutoModelForCausalLM.from_pretrained("dphn/dolphin-2.9.1-yi-1.5-9b", 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 dphn/dolphin-2.9.1-yi-1.5-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dphn/dolphin-2.9.1-yi-1.5-9b" # 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.9.1-yi-1.5-9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dphn/dolphin-2.9.1-yi-1.5-9b
- SGLang
How to use dphn/dolphin-2.9.1-yi-1.5-9b 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.9.1-yi-1.5-9b" \ --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.9.1-yi-1.5-9b", "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.9.1-yi-1.5-9b" \ --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.9.1-yi-1.5-9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dphn/dolphin-2.9.1-yi-1.5-9b with Docker Model Runner:
docker model run hf.co/dphn/dolphin-2.9.1-yi-1.5-9b
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,13 +3,62 @@ license: apache-2.0
|
|
| 3 |
base_model: 01-ai/Yi-1.5-9B
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
| 15 |
<details><summary>See axolotl config</summary>
|
|
|
|
| 3 |
base_model: 01-ai/Yi-1.5-9B
|
| 4 |
tags:
|
| 5 |
- generated_from_trainer
|
| 6 |
+
- axolotl
|
| 7 |
+
datasets:
|
| 8 |
+
- cognitivecomputations/Dolphin-2.9
|
| 9 |
+
- teknium/OpenHermes-2.5
|
| 10 |
+
- m-a-p/CodeFeedback-Filtered-Instruction
|
| 11 |
+
- cognitivecomputations/dolphin-coder
|
| 12 |
+
- cognitivecomputations/samantha-data
|
| 13 |
+
- microsoft/orca-math-word-problems-200k
|
| 14 |
+
- Locutusque/function-calling-chatml
|
| 15 |
+
- internlm/Agent-FLAN
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# Dolphin 2.9.1 Yi 1.5 9b 🐬
|
| 19 |
+
|
| 20 |
+
Curated and trained by Eric Hartford, Lucas Atkins, and Fernando Fernandes, and Cognitive Computations
|
| 21 |
+
|
| 22 |
+
This is our most spectacular outcome ever. FFT, all parameters, 16bit. 70.9 MMLU on 9b. And it talks like a dream.
|
| 23 |
+
|
| 24 |
+
Although the max positional embeddings is 4k, we used rope theta of 1000000.0 and we trained with sequence length 8k. We plan to train on the upcoming 32k version as well.
|
| 25 |
+
|
| 26 |
+
Discord: https://discord.gg/8fbBeC7ZGx
|
| 27 |
+
|
| 28 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/63111b2d88942700629f5771/ldkN1J0WIDQwU4vutGYiD.png" width="600" />
|
| 29 |
+
|
| 30 |
+
Our appreciation for the sponsors of Dolphin 2.9.1:
|
| 31 |
+
- [Crusoe Cloud](https://crusoe.ai/) - provided excellent on-demand 8xH100 node
|
| 32 |
+
- [OnDemand](https://on-demand.io/) - provided inference sponsorship
|
| 33 |
+
|
| 34 |
+
This model is based on Yi-1.5-34b, and is governed by apache 2.0 license.
|
| 35 |
+
|
| 36 |
+
The base model has 4k context, but we used rope theta of 1000000.0 and the full-weight fine-tuning was with 12k sequence length.
|
| 37 |
+
|
| 38 |
+
Dolphin 2.9.1 uses ChatML prompt template format.
|
| 39 |
+
|
| 40 |
+
example:
|
| 41 |
+
|
| 42 |
+
```
|
| 43 |
+
<|im_start|>system
|
| 44 |
+
You are Dolphin, a helpful AI assistant.<|im_end|>
|
| 45 |
+
<|im_start|>user
|
| 46 |
+
{prompt}<|im_end|>
|
| 47 |
+
<|im_start|>assistant
|
| 48 |
+
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
Dolphin-2.9.1 has a variety of instruction, conversational, and coding skills. It also has initial agentic abilities and supports function calling.
|
| 52 |
+
|
| 53 |
+
Dolphin is uncensored. We 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 with 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.
|
| 54 |
+
|
| 55 |
+
Dolphin is licensed according to apache 2.0 license. We grant permission for any use, including commercial. Dolphin was trained on data generated from GPT4, among other models.
|
| 56 |
+
|
| 57 |
+
## Evals
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
|
| 61 |
+
## Training
|
| 62 |
|
| 63 |
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
|
| 64 |
<details><summary>See axolotl config</summary>
|