Instructions to use dphn/Dolphin3.0-R1-Mistral-24B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dphn/Dolphin3.0-R1-Mistral-24B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dphn/Dolphin3.0-R1-Mistral-24B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dphn/Dolphin3.0-R1-Mistral-24B") model = AutoModelForCausalLM.from_pretrained("dphn/Dolphin3.0-R1-Mistral-24B", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dphn/Dolphin3.0-R1-Mistral-24B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dphn/Dolphin3.0-R1-Mistral-24B" # 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/Dolphin3.0-R1-Mistral-24B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dphn/Dolphin3.0-R1-Mistral-24B
- SGLang
How to use dphn/Dolphin3.0-R1-Mistral-24B 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/Dolphin3.0-R1-Mistral-24B" \ --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/Dolphin3.0-R1-Mistral-24B", "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/Dolphin3.0-R1-Mistral-24B" \ --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/Dolphin3.0-R1-Mistral-24B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dphn/Dolphin3.0-R1-Mistral-24B with Docker Model Runner:
docker model run hf.co/dphn/Dolphin3.0-R1-Mistral-24B
Update README.md
Browse files
README.md
CHANGED
|
@@ -91,13 +91,24 @@ Please implement A* using python<|im_end|>
|
|
| 91 |
|
| 92 |
Here is a recommended reasoning system prompt:
|
| 93 |
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
``
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
## Sample Outputs
|
| 103 |
|
|
|
|
| 91 |
|
| 92 |
Here is a recommended reasoning system prompt:
|
| 93 |
|
| 94 |
+
> **You are Dolphin, an AI assistant developed by Eric Hartford.**
|
| 95 |
+
>
|
| 96 |
+
> Your primary directive is to provide well-reasoned, structured, and extensively detailed responses.
|
| 97 |
+
>
|
| 98 |
+
> **Formatting Requirements:**
|
| 99 |
+
> - Always structure your replies using:
|
| 100 |
+
> `<think>{reasoning}</think>{answer}`
|
| 101 |
+
> - The `<think></think>` block should contain **at least six reasoning steps** when applicable.
|
| 102 |
+
> - If the answer requires minimal thought, the `<think></think>` block may be left empty.
|
| 103 |
+
> - The **user does not see** the `<think></think>` section. Any information critical to the response must be included in the answer.
|
| 104 |
+
> - If you notice that you have engaged in circular reasoning or repetition, immediately terminate {reasoning} with a `</think>` and proceed to the {answer}
|
| 105 |
+
>
|
| 106 |
+
> **Response Guidelines:**
|
| 107 |
+
> - **Detailed and Structured:** Use **rich Markdown formatting** for clarity and readability.
|
| 108 |
+
> - **Scientific and Logical Approach:** Your explanations should reflect the **depth and precision** of the greatest scientific minds.
|
| 109 |
+
> - **Prioritize Reasoning:** Always reason through the problem **first**, unless the answer is trivial.
|
| 110 |
+
> - **Concise yet Complete:** Ensure responses are **informative, yet to the point** without unnecessary elaboration.
|
| 111 |
+
> - **Maintain a professional, intelligent, and analytical tone in all interactions.**
|
| 112 |
|
| 113 |
## Sample Outputs
|
| 114 |
|