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_confidence_gated_third_view_agent.py from mis2/ViSS-8B: direct link, hf CLI and curl.
- Browser
- Download file 3.08 kB
-
https://huggingface.co/mis2/ViSS-8B/resolve/main/code/tests/test_confidence_gated_third_view_agent.py
- Command line
-
hf download hf://mis2/ViSS-8B/code/tests/test_confidence_gated_third_view_agent.py
-
curl -L -o test_confidence_gated_third_view_agent.py https://huggingface.co/mis2/ViSS-8B/resolve/main/code/tests/test_confidence_gated_third_view_agent.py
3.08 kB
| from experiments.materialize_confidence_gated_third_view_agent import materialize | |
| def _confidence(margin): | |
| return {"top2_margin": margin, "task_or_group_used": False} | |
| def _row(uid, prediction, margin, *, escalated=True): | |
| return { | |
| "uid": uid, | |
| "prediction": prediction, | |
| "generation_confidence": _confidence(margin), | |
| "sampling": {"frame_indices": [1], "frame_timestamps": [0.0]}, | |
| "query_time": 1.0, | |
| "frames_observed": 1, | |
| "agent_policy": {"escalated": escalated}, | |
| } | |
| def _value(rows): | |
| return { | |
| "benchmark": "streamingbench", | |
| "model_manifest_sha256": "model", | |
| "annotation_sha256": "annotation", | |
| "evaluation_protocol_sha256": "protocol", | |
| "rows": rows, | |
| } | |
| def _threshold(commit=-0.1): | |
| return { | |
| "status": "source_disjoint_internal_threshold_calibration", | |
| "eligible_as_frozen_benchmark_controller_config": True, | |
| "model_manifest_sha256": "model", | |
| "policy": {"commit_threshold": commit}, | |
| } | |
| def test_third_view_uses_current_answer_source_margin() -> None: | |
| recent = _value([_row("x", "A", 0.8), _row("y", "A", 0.2)]) | |
| event = _value([_row("x", "B", 0.5), _row("y", "B", 0.8)]) | |
| base = _value([_row("x", "A", 0.5), _row("y", "B", 0.8)]) | |
| third = _value([_row("x", "C", 0.4), _row("y", "C", 0.6)]) | |
| result = materialize(recent, event, base, third, _threshold(-0.3)) | |
| rows = {row["uid"]: row for row in result["rows"]} | |
| assert rows["x"]["prediction"] == "A" | |
| assert rows["x"]["third_view_policy"]["current_view"] == "recent4" | |
| assert rows["x"]["third_view_policy"]["committed"] is False | |
| assert rows["y"]["prediction"] == "C" | |
| assert rows["y"]["third_view_policy"]["current_view"] == "causalbudget20" | |
| assert rows["y"]["third_view_policy"]["committed"] is True | |
| assert result["third_view_committed"] == 1 | |
| def test_unchanged_third_answer_never_counts_as_commit() -> None: | |
| recent = _value([_row("x", "A", 0.2)]) | |
| event = _value([_row("x", "B", 0.3)]) | |
| base = _value([_row("x", "B", 0.3)]) | |
| third = _value([_row("x", "B", 0.9)]) | |
| result = materialize(recent, event, base, third, _threshold()) | |
| assert result["rows"][0]["prediction"] == "B" | |
| assert result["rows"][0]["third_view_policy"]["committed"] is False | |
| def test_full_precomputed_third_view_only_triggers_on_event_disagreement() -> None: | |
| recent = _value([_row("x", "A", 0.2), _row("z", "A", 0.4)]) | |
| event = _value([_row("x", "B", 0.3), _row("z", "A", 0.5)]) | |
| base = _value([_row("x", "B", 0.3), _row("z", "A", 0.5)]) | |
| third = _value([_row("x", "C", 0.9), _row("z", "C", 0.9)]) | |
| result = materialize(recent, event, base, third, _threshold()) | |
| rows = {row["uid"]: row for row in result["rows"]} | |
| assert rows["x"]["prediction"] == "C" | |
| assert rows["z"]["prediction"] == "A" | |
| assert rows["z"]["third_view_policy"]["triggered"] is False | |
| assert result["third_view_triggered"] == 1 | |
| assert result["third_view_input_rows"] == 2 | |
| assert result["third_view_unused_precomputed_rows"] == 1 | |