Image-Text-to-Text
Transformers
Safetensors
qwen3_5
decision-model
typed-decisions
multimodal
conversational
Instructions to use inclusionAI/SingVL_S1_4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inclusionAI/SingVL_S1_4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="inclusionAI/SingVL_S1_4B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("inclusionAI/SingVL_S1_4B") model = AutoModelForMultimodalLM.from_pretrained("inclusionAI/SingVL_S1_4B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use inclusionAI/SingVL_S1_4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inclusionAI/SingVL_S1_4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/SingVL_S1_4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/inclusionAI/SingVL_S1_4B
- SGLang
How to use inclusionAI/SingVL_S1_4B 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 "inclusionAI/SingVL_S1_4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/SingVL_S1_4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "inclusionAI/SingVL_S1_4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "inclusionAI/SingVL_S1_4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use inclusionAI/SingVL_S1_4B with Docker Model Runner:
docker model run hf.co/inclusionAI/SingVL_S1_4B
Upload README.md
Browse files
README.md
CHANGED
|
@@ -221,16 +221,18 @@ Both the Public and private suites use `inference.engine:D3Engine` with the same
|
|
| 221 |
|
| 222 |
```bash
|
| 223 |
python -m pip install "huggingface_hub>=0.34,<2"
|
| 224 |
-
hf download inclusionAI/SingVL_S1_4B --revision
|
| 225 |
python -m pip install -r ./singvl-s1-4b/inference/requirements-di.txt
|
| 226 |
|
| 227 |
# With already-built and verified Public 0.3 suites:
|
| 228 |
python ./singvl-s1-4b/inference/run_decision_index.py \
|
| 229 |
-
--panel text --suite-dir ./suite-0.3 --out ./runs/singvl-text
|
| 230 |
python ./singvl-s1-4b/inference/run_decision_index.py \
|
| 231 |
-
--panel vision --suite-dir ./work/vision --out ./runs/singvl-vision
|
| 232 |
```
|
| 233 |
|
|
|
|
|
|
|
| 234 |
The launcher resolves its own code and checkpoint paths, so it can be called from
|
| 235 |
any directory. The model argument is a downloaded local checkpoint path. The
|
| 236 |
adapter applies the submitted prefix-bidirectional attention and decision readout.
|
|
@@ -239,7 +241,7 @@ See [the complete reproduction guide](inference/DECISION_INDEX.md) for suite
|
|
| 239 |
preparation, direct DI commands, HTTP serving, capacity limits and exact revisions.
|
| 240 |
The [original public results and code snapshot](https://huggingface.co/datasets/echoxvf/SingVL_S1_4B-DI-results/tree/90ec7e159da6fa21d762f1f75876ea79049d0f4a)
|
| 241 |
are pinned to `90ec7e159da6fa21d762f1f75876ea79049d0f4a`. For the batch release, see the
|
| 242 |
-
[Public predictions and scores](https://huggingface.co/datasets/echoxvf/SingVL_S1_4B-DI-results/tree/
|
| 243 |
[inference/release.json](inference/release.json) for hashes and provenance.
|
| 244 |
|
| 245 |
The original serial submission scored Text **69.76** and Vision **73.7495**. Both releases use a 1,638,400-pixel image cap. Private Text/Vision evaluation and official
|
|
|
|
| 221 |
|
| 222 |
```bash
|
| 223 |
python -m pip install "huggingface_hub>=0.34,<2"
|
| 224 |
+
hf download inclusionAI/SingVL_S1_4B --revision dd9fcbe2412068def01666b1d1a443e412f11214 --local-dir ./singvl-s1-4b
|
| 225 |
python -m pip install -r ./singvl-s1-4b/inference/requirements-di.txt
|
| 226 |
|
| 227 |
# With already-built and verified Public 0.3 suites:
|
| 228 |
python ./singvl-s1-4b/inference/run_decision_index.py \
|
| 229 |
+
--panel text --suite-dir ./suite-0.3 --out ./runs/singvl-65k-text
|
| 230 |
python ./singvl-s1-4b/inference/run_decision_index.py \
|
| 231 |
+
--panel vision --suite-dir ./work/vision --out ./runs/singvl-65k-vision
|
| 232 |
```
|
| 233 |
|
| 234 |
+
Use fresh output directories for the batch engine so that prior serial predictions are not resumed.
|
| 235 |
+
|
| 236 |
The launcher resolves its own code and checkpoint paths, so it can be called from
|
| 237 |
any directory. The model argument is a downloaded local checkpoint path. The
|
| 238 |
adapter applies the submitted prefix-bidirectional attention and decision readout.
|
|
|
|
| 241 |
preparation, direct DI commands, HTTP serving, capacity limits and exact revisions.
|
| 242 |
The [original public results and code snapshot](https://huggingface.co/datasets/echoxvf/SingVL_S1_4B-DI-results/tree/90ec7e159da6fa21d762f1f75876ea79049d0f4a)
|
| 243 |
are pinned to `90ec7e159da6fa21d762f1f75876ea79049d0f4a`. For the batch release, see the
|
| 244 |
+
[Public predictions and scores](https://huggingface.co/datasets/echoxvf/SingVL_S1_4B-DI-results/tree/709aaf417ebf1d00dd01fdb49e306573b801d488/releases/batch-65k) and
|
| 245 |
[inference/release.json](inference/release.json) for hashes and provenance.
|
| 246 |
|
| 247 |
The original serial submission scored Text **69.76** and Vision **73.7495**. Both releases use a 1,638,400-pixel image cap. Private Text/Vision evaluation and official
|