Instructions to use stabilityai/StableBeluga2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stabilityai/StableBeluga2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stabilityai/StableBeluga2")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("stabilityai/StableBeluga2") model = AutoModelForMultimodalLM.from_pretrained("stabilityai/StableBeluga2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use stabilityai/StableBeluga2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stabilityai/StableBeluga2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stabilityai/StableBeluga2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/stabilityai/StableBeluga2
- SGLang
How to use stabilityai/StableBeluga2 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 "stabilityai/StableBeluga2" \ --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": "stabilityai/StableBeluga2", "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 "stabilityai/StableBeluga2" \ --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": "stabilityai/StableBeluga2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use stabilityai/StableBeluga2 with Docker Model Runner:
docker model run hf.co/stabilityai/StableBeluga2
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,11 +12,11 @@ pipeline_tag: text-generation
|
|
| 12 |
|
| 13 |
## Model Description
|
| 14 |
|
| 15 |
-
`
|
| 16 |
|
| 17 |
## Usage
|
| 18 |
|
| 19 |
-
Start chatting with `
|
| 20 |
|
| 21 |
```python
|
| 22 |
import torch
|
|
@@ -43,21 +43,21 @@ This is a system prompt, please behave and help the user.
|
|
| 43 |
Your prompt here
|
| 44 |
|
| 45 |
### Assistant
|
| 46 |
-
The output of
|
| 47 |
```
|
| 48 |
|
| 49 |
## Model Details
|
| 50 |
|
| 51 |
* **Developed by**: [Stability AI](https://stability.ai/)
|
| 52 |
-
* **Model type**:
|
| 53 |
* **Language(s)**: English
|
| 54 |
* **Library**: [HuggingFace Transformers](https://github.com/huggingface/transformers)
|
| 55 |
-
* **License**: Fine-tuned checkpoints (`
|
| 56 |
* **Contact**: For questions and comments about the model, please email `lm@stability.ai`
|
| 57 |
|
| 58 |
### Training Dataset
|
| 59 |
|
| 60 |
-
`
|
| 61 |
|
| 62 |
### Training Procedure
|
| 63 |
|
|
|
|
| 12 |
|
| 13 |
## Model Description
|
| 14 |
|
| 15 |
+
`Stable Beluga 2` is a Llama2 70B model finetuned on an Orca style Dataset
|
| 16 |
|
| 17 |
## Usage
|
| 18 |
|
| 19 |
+
Start chatting with `Stable Beluga 2` using the following code snippet:
|
| 20 |
|
| 21 |
```python
|
| 22 |
import torch
|
|
|
|
| 43 |
Your prompt here
|
| 44 |
|
| 45 |
### Assistant
|
| 46 |
+
The output of Stable Beluga 2
|
| 47 |
```
|
| 48 |
|
| 49 |
## Model Details
|
| 50 |
|
| 51 |
* **Developed by**: [Stability AI](https://stability.ai/)
|
| 52 |
+
* **Model type**: Stable Beluga 2 is an auto-regressive language model fine-tuned on Llama2 70B.
|
| 53 |
* **Language(s)**: English
|
| 54 |
* **Library**: [HuggingFace Transformers](https://github.com/huggingface/transformers)
|
| 55 |
+
* **License**: Fine-tuned checkpoints (`Stable Beluga 2`) is licensed under the [STABLE BELUGA NON-COMMERCIAL COMMUNITY LICENSE AGREEMENT](https://huggingface.co/stabilityai/StableBeluga2/LICENSE.TXT)
|
| 56 |
* **Contact**: For questions and comments about the model, please email `lm@stability.ai`
|
| 57 |
|
| 58 |
### Training Dataset
|
| 59 |
|
| 60 |
+
` Stable Beluga 2` is trained on our internal Orca-style dataset
|
| 61 |
|
| 62 |
### Training Procedure
|
| 63 |
|