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
Download inference/release.json from inclusionAI/SingVL_S1_4B: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/inclusionAI/SingVL_S1_4B/resolve/main/inference/release.json
- Command line
-
hf download hf://inclusionAI/SingVL_S1_4B/inference/release.json
-
curl -L -o release.json https://huggingface.co/inclusionAI/SingVL_S1_4B/resolve/main/inference/release.json
1.24 kB
| { | |
| "download_revision": "dd9fcbe2412068def01666b1d1a443e412f11214", | |
| "model_repo": "inclusionAI/SingVL_S1_4B", | |
| "evaluated_weights_revision": "93f15cd61c1cf417d9cb2631f6be2df13510829e", | |
| "results_repo": "echoxvf/SingVL_S1_4B-DI-results", | |
| "results_revision": "90ec7e159da6fa21d762f1f75876ea79049d0f4a", | |
| "decision_index_kit_commit": "f5a6e4fd85fed05e77878dfc4966d0568bfb45ec", | |
| "engine": "inference.engine:D3Engine", | |
| "model_argument": "local checkpoint directory", | |
| "weights_sha256": { | |
| "model-00001-of-00002.safetensors": "167ea2740250a44a210d3bdec1c36123c7b518d12fe69e423f913807afdd03a7", | |
| "model-00002-of-00002.safetensors": "d348920079085286938444faebe746e5cd4433c07cb192d28f87825c6c403db9" | |
| }, | |
| "model_py_sha256": "b08a6287081282065b8b909a4f7baffe37a5d268d57f513f219220dd43c951b2", | |
| "engine_py_sha256": "57dd22ca4cb9414e9820831bc455b6238525b28f5a52e25bb976d64f3984b237", | |
| "weights_unchanged": true, | |
| "batch_token_budget": 65536, | |
| "original_serial_model_revision": "b6672ce4fd31aab79aee3f0729fd8738f87361cf", | |
| "batch_results_path": "releases/batch-65k", | |
| "batch_results_revision": "709aaf417ebf1d00dd01fdb49e306573b801d488", | |
| "batch_public_scores": { | |
| "text": 69.75, | |
| "vision": 73.74949871316771 | |
| } | |
| } | |