Instructions to use Open-Orca/OpenOrcaxOpenChat-Preview2-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Open-Orca/OpenOrcaxOpenChat-Preview2-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Open-Orca/OpenOrcaxOpenChat-Preview2-13B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Open-Orca/OpenOrcaxOpenChat-Preview2-13B") model = AutoModelForCausalLM.from_pretrained("Open-Orca/OpenOrcaxOpenChat-Preview2-13B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Open-Orca/OpenOrcaxOpenChat-Preview2-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Open-Orca/OpenOrcaxOpenChat-Preview2-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open-Orca/OpenOrcaxOpenChat-Preview2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B
- SGLang
How to use Open-Orca/OpenOrcaxOpenChat-Preview2-13B 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 "Open-Orca/OpenOrcaxOpenChat-Preview2-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open-Orca/OpenOrcaxOpenChat-Preview2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Open-Orca/OpenOrcaxOpenChat-Preview2-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Open-Orca/OpenOrcaxOpenChat-Preview2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Open-Orca/OpenOrcaxOpenChat-Preview2-13B with Docker Model Runner:
docker model run hf.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B
Update README.md
Browse files
README.md
CHANGED
|
@@ -74,7 +74,8 @@ Suffix (space after colon):
|
|
| 74 |
```
|
| 75 |
<|end_of_turn|>\nAssistant:
|
| 76 |
```
|
| 77 |
-
|
|
|
|
| 78 |
|
| 79 |
|
| 80 |
# Evaluation
|
|
@@ -154,6 +155,8 @@ Pre-quantized models are now available courtesy of our friend TheBloke:
|
|
| 154 |
* **GGML**: https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GGML
|
| 155 |
* **GPTQ**: https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ
|
| 156 |
|
|
|
|
|
|
|
| 157 |
|
| 158 |
## Serving with OpenChat
|
| 159 |
|
|
@@ -200,7 +203,9 @@ For "`Bot string`" ...
|
|
| 200 |
```
|
| 201 |
Assistant:
|
| 202 |
```
|
| 203 |
-
For "`Context`",
|
|
|
|
|
|
|
| 204 |
```
|
| 205 |
You are a helpful assistant. Please answer truthfully and write out your thinking step by step to be sure you get the right answer. If you make a mistake or encounter an error in your thinking, say so out loud and attempt to correct it. If you don't know or aren't sure about something, say so clearly. You will act as a professional logician, mathematician, and physicist. You will also act as the most appropriate type of expert to answer any particular question or solve the relevant problem; state which expert type your are, if so. Also think of any particular named expert that would be ideal to answer the relevant question or solve the relevant problem; name and act as them, if appropriate.
|
| 206 |
```
|
|
|
|
| 74 |
```
|
| 75 |
<|end_of_turn|>\nAssistant:
|
| 76 |
```
|
| 77 |
+
|
| 78 |
+
**Oobabooga's text-generation-webui instructions can be found [further down the page](https://huggingface.co/Open-Orca/OpenOrcaxOpenChat-Preview2-13B#serving-with-oobabooga--text-generation-webui).**
|
| 79 |
|
| 80 |
|
| 81 |
# Evaluation
|
|
|
|
| 155 |
* **GGML**: https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GGML
|
| 156 |
* **GPTQ**: https://huggingface.co/TheBloke/OpenOrcaxOpenChat-Preview2-13B-GPTQ
|
| 157 |
|
| 158 |
+
The serving instructions below only apply to the unquantized model being presented in the repository you are viewing here.
|
| 159 |
+
There are some notes, such as on use of the prompt format, that will still apply to the quantized models though.
|
| 160 |
|
| 161 |
## Serving with OpenChat
|
| 162 |
|
|
|
|
| 203 |
```
|
| 204 |
Assistant:
|
| 205 |
```
|
| 206 |
+
For "`Context`", this is analogous to system prompt.
|
| 207 |
+
It is not necessary, but we have found good results with the below example.
|
| 208 |
+
System prompts used in the Orca training also work well. ...
|
| 209 |
```
|
| 210 |
You are a helpful assistant. Please answer truthfully and write out your thinking step by step to be sure you get the right answer. If you make a mistake or encounter an error in your thinking, say so out loud and attempt to correct it. If you don't know or aren't sure about something, say so clearly. You will act as a professional logician, mathematician, and physicist. You will also act as the most appropriate type of expert to answer any particular question or solve the relevant problem; state which expert type your are, if so. Also think of any particular named expert that would be ideal to answer the relevant question or solve the relevant problem; name and act as them, if appropriate.
|
| 211 |
```
|