Image-Text-to-Text
Transformers
Safetensors
qwen3_vl
qwen3-vl
viss
streaming-video
visual-question-answering
causal-video
conversational
Instructions to use mis2/ViSS-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mis2/ViSS-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mis2/ViSS-8B") 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("mis2/ViSS-8B") model = AutoModelForMultimodalLM.from_pretrained("mis2/ViSS-8B", 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 mis2/ViSS-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mis2/ViSS-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mis2/ViSS-8B", "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/mis2/ViSS-8B
- SGLang
How to use mis2/ViSS-8B 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 "mis2/ViSS-8B" \ --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": "mis2/ViSS-8B", "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 "mis2/ViSS-8B" \ --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": "mis2/ViSS-8B", "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 mis2/ViSS-8B with Docker Model Runner:
docker model run hf.co/mis2/ViSS-8B
Download code/tests/test_public_protocol.py from mis2/ViSS-8B: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/mis2/ViSS-8B/resolve/main/code/tests/test_public_protocol.py
- Command line
-
hf download hf://mis2/ViSS-8B/code/tests/test_public_protocol.py
-
curl -L -o test_public_protocol.py https://huggingface.co/mis2/ViSS-8B/resolve/main/code/tests/test_public_protocol.py
1.76 kB
| import json | |
| from pathlib import Path | |
| import pytest | |
| from experiments.evaluate_qwen3vl_recent4_full import validate_processor_contract | |
| from scripts.configure_evaluation_protocol import configure | |
| from viss_core.evaluation_protocol import ProtocolValidationError, load_locked_protocol | |
| TEMPLATE = Path(__file__).resolve().parents[1] / "configs/evaluation/recent4.example.json" | |
| def test_unconfigured_template_cannot_be_used_as_a_locked_protocol(): | |
| with pytest.raises(ProtocolValidationError, match="not locked"): | |
| load_locked_protocol(TEMPLATE) | |
| def test_user_configured_protocol_preserves_processor_identity_check(tmp_path): | |
| template = json.loads(TEMPLATE.read_text()) | |
| contract = template["inference"]["processor_contract"] | |
| processor = tmp_path / "processor" | |
| processor.mkdir() | |
| config = processor / "preprocessor_config.json" | |
| config.write_text(json.dumps({ | |
| key: contract[key] | |
| for key in ["image_processor_type", "patch_size", "merge_size", "temporal_patch_size"] | |
| } | {"size": { | |
| key: contract[key] for key in ["shortest_edge", "longest_edge"] | |
| }})) | |
| streaming = tmp_path / "streaming.jsonl" | |
| ovo = tmp_path / "ovo.jsonl" | |
| for path in (streaming, ovo): | |
| path.write_text('{"uid": "synthetic-query"}\n') | |
| output = tmp_path / "configured.json" | |
| configure( | |
| template=TEMPLATE, | |
| streaming_samples=streaming, | |
| ovo_samples=ovo, | |
| processor_config=config, | |
| output=output, | |
| ) | |
| protocol = load_locked_protocol(output) | |
| validate_processor_contract(processor, protocol) | |
| config.write_text(config.read_text() + " ") | |
| with pytest.raises(ValueError, match="SHA-256 diverged"): | |
| validate_processor_contract(processor, protocol) | |