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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BELLE-2/BELLE-VL", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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 ·
84d3852
1
Parent(s): 2ba12a5
Update README.md
Browse files
README.md
CHANGED
|
@@ -55,25 +55,25 @@ print(response)
|
|
| 55 |
|
| 56 |
| Category | Score |
|
| 57 |
|------------------------|-------|
|
| 58 |
-
| **Perception** | **
|
| 59 |
-
| --Existence |
|
| 60 |
-
| --Count |
|
| 61 |
-
| --Position |
|
| 62 |
-
| --Color |
|
| 63 |
-
| --Posters |
|
| 64 |
-
| --Celebrity |
|
| 65 |
-
| --Scene |
|
| 66 |
-
| --Landmark |
|
| 67 |
-
| --Artwork |
|
| 68 |
-
| --OCR | 177.
|
| 69 |
|
| 70 |
| Category | Score |
|
| 71 |
|------------------------|-------|
|
| 72 |
-
| **Cognition** | **
|
| 73 |
-
| --Commonsense Reasoning |
|
| 74 |
-
| --Numerical Calculation |
|
| 75 |
-
| --Text Translation |
|
| 76 |
-
| --Code Reasoning | 55 |
|
| 77 |
|
| 78 |
|
| 79 |
## Citation
|
|
|
|
| 55 |
|
| 56 |
| Category | Score |
|
| 57 |
|------------------------|-------|
|
| 58 |
+
| **Perception** | **1606.00** |
|
| 59 |
+
| --Existence | 195.00 |
|
| 60 |
+
| --Count | 160.00 |
|
| 61 |
+
| --Position | 131.67 |
|
| 62 |
+
| --Color | 170.00 |
|
| 63 |
+
| --Posters | 164.29|
|
| 64 |
+
| --Celebrity | 135.29|
|
| 65 |
+
| --Scene | 157.50|
|
| 66 |
+
| --Landmark | 173.25 |
|
| 67 |
+
| --Artwork | 141.50 |
|
| 68 |
+
| --OCR | 177.50 |
|
| 69 |
|
| 70 |
| Category | Score |
|
| 71 |
|------------------------|-------|
|
| 72 |
+
| **Cognition** | **325.00** |
|
| 73 |
+
| --Commonsense Reasoning | 125.00|
|
| 74 |
+
| --Numerical Calculation | 42.50 |
|
| 75 |
+
| --Text Translation | 107.50 |
|
| 76 |
+
| --Code Reasoning | 55.00 |
|
| 77 |
|
| 78 |
|
| 79 |
## Citation
|