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 config.json from inclusionAI/SingVL_S1_4B: direct link, hf CLI and curl.
- Browser
- Download file 8.22 kB
-
https://huggingface.co/inclusionAI/SingVL_S1_4B/resolve/main/config.json
- Command line
-
hf download hf://inclusionAI/SingVL_S1_4B/config.json
-
curl -L -o config.json https://huggingface.co/inclusionAI/SingVL_S1_4B/resolve/main/config.json
8.22 kB
| { | |
| "architectures": [ | |
| "Qwen3_5ForConditionalGeneration" | |
| ], | |
| "bos_token_id": null, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 248046, | |
| "hidden_size": 2560, | |
| "image_token_id": 248056, | |
| "jev_gdn_mode": "causal", | |
| "jev_mask_version": "single-turn-prefix-v1", | |
| "jev_packing": { | |
| "attention": "segment-bidirectional-sdpa", | |
| "code_sha256": { | |
| "packed_model.py": "35c00a2d8c8c03f2ab347a6e070ce80b8e40f59e57c1d1460a74bb6de00acb70", | |
| "packed_plugin.py": "c35794e4d4b1ca575d52d4c79230712f220f80d65061dc2e0394d315052a2b15" | |
| }, | |
| "gdn": "causal-varlen-reset", | |
| "mode": "prefix_bidir", | |
| "version": "packed-soft-v2" | |
| }, | |
| "jev_prefix_attention_mode": "prefix_bidir", | |
| "jev_prefix_code_sha256": { | |
| "engine.py": "d81678d3f347590a4e8447a34c4c01b715634be483abc7d52048ba1fa3850f5b", | |
| "masks.py": "749a9166733cfcf80c9ce14d5b1d81dd26e5be5bddc2079b0d63438093013492", | |
| "modeling.py": "8d0340ac50ca859ee55efc5b6f72ef70edbd31fc67e4bd61cd1c2e33e904a9ed", | |
| "swift_plugin.py": "f7503838a9fb474e0763a4b637d8f2bad01e0629b2d98ad404f26efc7f932561" | |
| }, | |
| "jev_prefix_contract": "all-input-before-first-answer; single-turn; no-thinking", | |
| "jev_prefix_media": { | |
| "FPS": "1.0", | |
| "IMAGE_MAX_TOKEN_NUM": "2304", | |
| "IMAGE_MIN_TOKEN_NUM": "64", | |
| "MAX_PIXELS": "1806336", | |
| "MIN_PIXELS": "65536", | |
| "VIDEO_MAX_PIXELS": "50176", | |
| "VIDEO_MAX_TOKEN_NUM": "49", | |
| "VIDEO_MIN_TOKEN_NUM": "49" | |
| }, | |
| "jev_renderer_version": "single-turn-prefix-v1", | |
| "jev_soft_choice": { | |
| "answer_input": false, | |
| "code_sha256": { | |
| "literal_media.py": "381a1197eadf69e0f903086619acd85cd73b72a623613f2dc498bd7db3c1de5c", | |
| "soft_choice.py": "8de4594c710a3370cee4bb0e351007f16c543cac47009981c7f07cfd413515a8", | |
| "soft_inference.py": "37a58a5046f4ed22fc93407ae2a2f7f260ffe32b483ffd3f18eebdb4bd8338b9", | |
| "soft_plugin.py": "fa4a0ab7c97a73c53be9c41fa7717a120bd0c0baa5847cbc2776c9cb9e3db245" | |
| }, | |
| "eos_loss": false, | |
| "index_sha256": "21b4e4eed8993df8c6b86ebd1c62d60360616e9a82082d199df48c75c5e653cf", | |
| "normalization": "full-vocabulary", | |
| "readout": "last-valid-input-position", | |
| "token_ids": [ | |
| 5840, | |
| 1803, | |
| 1646, | |
| 1745, | |
| 13276, | |
| 8018, | |
| 1825, | |
| 28946, | |
| 15015, | |
| 29595, | |
| 11568, | |
| 939, | |
| 1354, | |
| 1058, | |
| 18183, | |
| 2456, | |
| 88898, | |
| 905, | |
| 1846, | |
| 802, | |
| 33869, | |
| 7839, | |
| 14006, | |
| 2860, | |
| 2926, | |
| 22828, | |
| 6844, | |
| 9798, | |
| 4738, | |
| 9265, | |
| 11261, | |
| 19278, | |
| 36513, | |
| 93801, | |
| 8335, | |
| 14544, | |
| 85266, | |
| 9110, | |
| 28000, | |
| 15137, | |
| 4525, | |
| 25261, | |
| 12717, | |
| 7116, | |
| 17078, | |
| 14497, | |
| 57339, | |
| 74909, | |
| 52072, | |
| 19305, | |
| 4887, | |
| 12607, | |
| 3580, | |
| 6281, | |
| 2036, | |
| 9362, | |
| 8533, | |
| 2080, | |
| 10911, | |
| 2925, | |
| 3040, | |
| 9690, | |
| 27731, | |
| 8023, | |
| 6901, | |
| 8702, | |
| 6211, | |
| 1123, | |
| 16307, | |
| 18990, | |
| 64045, | |
| 63037, | |
| 33380, | |
| 6151, | |
| 3392, | |
| 5449, | |
| 3967, | |
| 1113, | |
| 5095, | |
| 51923, | |
| 49600, | |
| 17099, | |
| 51483, | |
| 17756, | |
| 16037, | |
| 8135, | |
| 30237, | |
| 5683, | |
| 9992, | |
| 7444, | |
| 5751, | |
| 10284, | |
| 20887, | |
| 59884, | |
| 52396, | |
| 16103, | |
| 67547, | |
| 18535, | |
| 8006, | |
| 7263, | |
| 1425, | |
| 6878, | |
| 14453, | |
| 9097, | |
| 44072, | |
| 76089, | |
| 68720, | |
| 2662, | |
| 2629, | |
| 923, | |
| 6548, | |
| 8924, | |
| 52194, | |
| 622, | |
| 1515, | |
| 1300, | |
| 37523, | |
| 44473, | |
| 36530, | |
| 3152, | |
| 93924, | |
| 3505, | |
| 15731, | |
| 6542, | |
| 14176, | |
| 11091, | |
| 1686, | |
| 11660, | |
| 80440, | |
| 18836, | |
| 26132, | |
| 5934, | |
| 24794, | |
| 40229, | |
| 3660, | |
| 11361, | |
| 10191, | |
| 8225, | |
| 3860, | |
| 78413, | |
| 17680, | |
| 15900, | |
| 78138, | |
| 15653, | |
| 5213, | |
| 22150, | |
| 39500, | |
| 10460, | |
| 35131, | |
| 21563, | |
| 43194, | |
| 27127, | |
| 3697, | |
| 20011, | |
| 24368, | |
| 15058, | |
| 23658, | |
| 8362, | |
| 16035, | |
| 24583, | |
| 52857, | |
| 38403, | |
| 60456, | |
| 81519, | |
| 40097, | |
| 16522, | |
| 29722, | |
| 21756, | |
| 18567, | |
| 1736, | |
| 48043, | |
| 87013, | |
| 22456, | |
| 23165, | |
| 55523, | |
| 13097, | |
| 50397, | |
| 41741, | |
| 23073, | |
| 6401, | |
| 86538, | |
| 16585, | |
| 11622, | |
| 2464, | |
| 84982, | |
| 75516, | |
| 36984, | |
| 58795, | |
| 47217, | |
| 59675, | |
| 5681, | |
| 3151, | |
| 1271, | |
| 887, | |
| 5203, | |
| 2685, | |
| 1849, | |
| 72470, | |
| 5370, | |
| 74063, | |
| 27629, | |
| 1655, | |
| 1728, | |
| 669, | |
| 3682, | |
| 3191, | |
| 59865, | |
| 2712, | |
| 1580, | |
| 922, | |
| 77243, | |
| 2990, | |
| 78493, | |
| 5228, | |
| 2750, | |
| 42711, | |
| 44568, | |
| 56402, | |
| 48236, | |
| 38993, | |
| 43559, | |
| 61250, | |
| 32942, | |
| 86302, | |
| 25310, | |
| 26313, | |
| 81770, | |
| 12185, | |
| 78382, | |
| 213977, | |
| 75226, | |
| 25599, | |
| 28885, | |
| 62454, | |
| 86528, | |
| 3281, | |
| 62811, | |
| 41497, | |
| 73141, | |
| 78179, | |
| 48758, | |
| 51204, | |
| 63437, | |
| 16651, | |
| 53100, | |
| 62839, | |
| 59799, | |
| 39111, | |
| 32427, | |
| 221265, | |
| 79852, | |
| 75920, | |
| 73966, | |
| 17311, | |
| 32940, | |
| 8294 | |
| ], | |
| "version": "soft-choice-full-vocab-v2" | |
| }, | |
| "model_type": "qwen3_5", | |
| "pad_token_id": 248044, | |
| "text_config": { | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attn_output_gate": true, | |
| "bos_token_id": null, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 248044, | |
| "full_attention_interval": 4, | |
| "head_dim": 256, | |
| "hidden_act": "silu", | |
| "hidden_size": 2560, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 9216, | |
| "jev_prefix_attention_mode": "prefix_bidir", | |
| "layer_types": [ | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "linear_attention", | |
| "full_attention" | |
| ], | |
| "linear_conv_kernel_dim": 4, | |
| "linear_key_head_dim": 128, | |
| "linear_num_key_heads": 16, | |
| "linear_num_value_heads": 32, | |
| "linear_value_head_dim": 128, | |
| "mamba_ssm_dtype": "float32", | |
| "max_position_embeddings": 262144, | |
| "mlp_only_layers": [], | |
| "model_type": "qwen3_5_text", | |
| "mtp_num_hidden_layers": 0, | |
| "mtp_use_dedicated_embeddings": false, | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 32, | |
| "num_key_value_heads": 4, | |
| "pad_token_id": 248044, | |
| "partial_rotary_factor": 0.25, | |
| "rms_norm_eps": 1e-06, | |
| "rope_parameters": { | |
| "mrope_interleaved": true, | |
| "mrope_section": [ | |
| 11, | |
| 11, | |
| 10 | |
| ], | |
| "partial_rotary_factor": 0.25, | |
| "rope_theta": 10000000, | |
| "rope_type": "default" | |
| }, | |
| "tie_word_embeddings": true, | |
| "use_cache": false, | |
| "vocab_size": 248320 | |
| }, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.2.0", | |
| "use_cache": false, | |
| "video_token_id": 248057, | |
| "vision_config": { | |
| "deepstack_visual_indexes": [], | |
| "depth": 24, | |
| "dtype": "bfloat16", | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 1024, | |
| "in_channels": 3, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "model_type": "qwen3_5", | |
| "num_heads": 16, | |
| "num_position_embeddings": 2304, | |
| "out_hidden_size": 2560, | |
| "patch_size": 16, | |
| "spatial_merge_size": 2, | |
| "temporal_patch_size": 2 | |
| }, | |
| "vision_end_token_id": 248054, | |
| "vision_start_token_id": 248053 | |
| } | |