Instructions to use BELLE-2/BELLE-VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BELLE-2/BELLE-VL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BELLE-2/BELLE-VL", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BELLE-2/BELLE-VL", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use BELLE-2/BELLE-VL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BELLE-2/BELLE-VL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BELLE-2/BELLE-VL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BELLE-2/BELLE-VL
- SGLang
How to use BELLE-2/BELLE-VL 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 "BELLE-2/BELLE-VL" \ --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": "BELLE-2/BELLE-VL", "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 "BELLE-2/BELLE-VL" \ --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": "BELLE-2/BELLE-VL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BELLE-2/BELLE-VL with Docker Model Runner:
docker model run hf.co/BELLE-2/BELLE-VL
Commit ·
457f20c
1
Parent(s): 50ee5f8
Update README.md
Browse files
README.md
CHANGED
|
@@ -51,18 +51,22 @@ print(response)
|
|
| 51 |
| Category | Score |
|
| 52 |
|------------------------|-------|
|
| 53 |
| **Perception** | **1595.34** |
|
| 54 |
-
| Existence | 190 |
|
| 55 |
-
| Count | 150 |
|
| 56 |
-
| Position | 130 |
|
| 57 |
-
| Color | 175 |
|
| 58 |
-
| Posters | 166.33|
|
| 59 |
-
| Celebrity | 136.76|
|
| 60 |
-
| Scene | 156.25|
|
| 61 |
-
| Landmark | 174 |
|
| 62 |
-
| Artwork | 139.5 |
|
| 63 |
-
| OCR | 177.5 |
|
|
|
|
|
|
|
|
|
|
| 64 |
| **Cognition** | **332.14** |
|
| 65 |
-
|
|
| 66 |
-
| Numerical
|
| 67 |
-
| Text
|
| 68 |
-
|
|
|
|
|
|
|
| 51 |
| Category | Score |
|
| 52 |
|------------------------|-------|
|
| 53 |
| **Perception** | **1595.34** |
|
| 54 |
+
| --Existence | 190 |
|
| 55 |
+
| --Count | 150 |
|
| 56 |
+
| --Position | 130 |
|
| 57 |
+
| --Color | 175 |
|
| 58 |
+
| --Posters | 166.33|
|
| 59 |
+
| --Celebrity | 136.76|
|
| 60 |
+
| --Scene | 156.25|
|
| 61 |
+
| --Landmark | 174 |
|
| 62 |
+
| --Artwork | 139.5 |
|
| 63 |
+
| --OCR | 177.5 |
|
| 64 |
+
|
| 65 |
+
| Category | Score |
|
| 66 |
+
|------------------------|-------|
|
| 67 |
| **Cognition** | **332.14** |
|
| 68 |
+
| --Commonsense Reasoning | 127.14|
|
| 69 |
+
| --Numerical Calculation | 47.5 |
|
| 70 |
+
| --Text Translation | 102.5 |
|
| 71 |
+
| --Code Reasoning | 55 |
|
| 72 |
+
|