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 ·
663b052
1
Parent(s): 18b6885
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,25 +54,25 @@ print(response)
|
|
| 54 |
|
| 55 |
| Category | Score |
|
| 56 |
|------------------------|-------|
|
| 57 |
-
| **Perception** | **
|
| 58 |
| --Existence | 195.00 |
|
| 59 |
-
| --Count |
|
| 60 |
-
| --Position |
|
| 61 |
-
| --Color |
|
| 62 |
-
| --Posters |
|
| 63 |
-
| --Celebrity | 135.
|
| 64 |
-
| --Scene |
|
| 65 |
-
| --Landmark |
|
| 66 |
-
| --Artwork |
|
| 67 |
| --OCR | 177.50 |
|
| 68 |
|
| 69 |
| Category | Score |
|
| 70 |
|------------------------|-------|
|
| 71 |
-
| **Cognition** | **
|
| 72 |
-
| --Commonsense Reasoning |
|
| 73 |
| --Numerical Calculation | 42.50 |
|
| 74 |
-
| --Text Translation |
|
| 75 |
-
| --Code Reasoning |
|
| 76 |
|
| 77 |
|
| 78 |
## Citation
|
|
|
|
| 54 |
|
| 55 |
| Category | Score |
|
| 56 |
|------------------------|-------|
|
| 57 |
+
| **Perception** | **1620.10** |
|
| 58 |
| --Existence | 195.00 |
|
| 59 |
+
| --Count | 173.33 |
|
| 60 |
+
| --Position | 1310.00 |
|
| 61 |
+
| --Color | 185.00 |
|
| 62 |
+
| --Posters | 160.88|
|
| 63 |
+
| --Celebrity | 135.88|
|
| 64 |
+
| --Scene | 150.00|
|
| 65 |
+
| --Landmark | 169.25 |
|
| 66 |
+
| --Artwork | 143.50 |
|
| 67 |
| --OCR | 177.50 |
|
| 68 |
|
| 69 |
| Category | Score |
|
| 70 |
|------------------------|-------|
|
| 71 |
+
| **Cognition** | **305.36** |
|
| 72 |
+
| --Commonsense Reasoning | 132.86|
|
| 73 |
| --Numerical Calculation | 42.50 |
|
| 74 |
+
| --Text Translation | 72.50 |
|
| 75 |
+
| --Code Reasoning | 57.00 |
|
| 76 |
|
| 77 |
|
| 78 |
## Citation
|