Instructions to use microsoft/Orca-2-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/Orca-2-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="microsoft/Orca-2-13b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/Orca-2-13b") model = AutoModelForCausalLM.from_pretrained("microsoft/Orca-2-13b") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use microsoft/Orca-2-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "microsoft/Orca-2-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "microsoft/Orca-2-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/microsoft/Orca-2-13b
- SGLang
How to use microsoft/Orca-2-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 "microsoft/Orca-2-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": "microsoft/Orca-2-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 "microsoft/Orca-2-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": "microsoft/Orca-2-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use microsoft/Orca-2-13b with Docker Model Runner:
docker model run hf.co/microsoft/Orca-2-13b
Commit ·
2539ff5
1
Parent(s): 80a5dc4
Update README.md (#9)
Browse files- Update README.md (adca42845868bf8f6475946da03778618ff44e91)
Co-authored-by: Luciano Del Corro <lucianodelcorro@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -13,11 +13,15 @@ license_link: LICENSE
|
|
| 13 |
|
| 14 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 15 |
|
| 16 |
-
Orca 2 is
|
| 17 |
-
in tasks such as reasoning over user given data, reading comprehension, math problem solving and text summarization.
|
| 18 |
-
The model is designed to excel particularly in reasoning.
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## What is Orca 2’s intended use(s)?
|
| 23 |
|
|
|
|
| 13 |
|
| 14 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 15 |
|
| 16 |
+
Orca 2 is built for research purposes only and provides a single turn response in tasks such as reasoning over user given data, reading comprehension, math problem solving and text summarization. The model is designed to excel particularly in reasoning.
|
|
|
|
|
|
|
| 17 |
|
| 18 |
+
Note that:
|
| 19 |
+
|
| 20 |
+
1. This is a research model, intended to show that we can use capable models and complex workflows (advanced prompts, multiple calls) to create synthetic data that can teach Small Language Models (SLMs) new capabilities. We chose reasoning because it is a widely useful capability that SLMs lack.
|
| 21 |
+
2. The model is not optimized for chat and has not been trained with RLHF or DPO. It is best used after being finetuned for chat or for a specific task.
|
| 22 |
+
3. Beyond reasoning, the model inherits capabilities and limitations of its base (LLAMA-2 base). We have already seen that the benefits of the Orca training can be applied to other base model too.
|
| 23 |
+
|
| 24 |
+
We make Orca 2's weights publicly available to support further research on the development, evaluation, and alignment of SLMs.
|
| 25 |
|
| 26 |
## What is Orca 2’s intended use(s)?
|
| 27 |
|