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_tvs_view_oracle.py from mis2/ViSS-8B: direct link, hf CLI and curl.
- Browser
- Download file 1.82 kB
-
https://huggingface.co/mis2/ViSS-8B/resolve/main/code/tests/test_tvs_view_oracle.py
- Command line
-
hf download hf://mis2/ViSS-8B/code/tests/test_tvs_view_oracle.py
-
curl -L -o test_tvs_view_oracle.py https://huggingface.co/mis2/ViSS-8B/resolve/main/code/tests/test_tvs_view_oracle.py
1.82 kB
| import json | |
| from pathlib import Path | |
| from experiments.materialize_tvs_view_oracle import materialize | |
| from experiments.tvs_correctness import is_correct, load_gold | |
| def _artifact(predictions: dict[str, str], frames: int) -> dict: | |
| return { | |
| "benchmark": "streamingbench", | |
| "model_manifest_sha256": "m", | |
| "annotation_sha256": "a", | |
| "evaluation_protocol_sha256": "p", | |
| "rows": [ | |
| {"uid": uid, "prediction": prediction, "frames_observed": frames} | |
| for uid, prediction in predictions.items() | |
| ], | |
| } | |
| def test_strict_oracle_selects_first_correct_view_and_charges_all_calls() -> None: | |
| recent = _artifact({"q1": "A", "q2": "B"}, 4) | |
| event = _artifact({"q1": "C", "q2": "D"}, 20) | |
| history = _artifact({"q1": "B", "q2": "A"}, 32) | |
| gold = { | |
| "q1": {"kind": "streaming_mcq", "answer": "C", "task": "X"}, | |
| "q2": {"kind": "streaming_mcq", "answer": "A", "task": "X"}, | |
| } | |
| result = materialize(recent, event, history, gold) | |
| assert [row["prediction"] for row in result["rows"]] == ["C", "A"] | |
| assert result["mean_model_calls"] == 3.0 | |
| assert result["mean_processed_frames"] == 56.0 | |
| assert result["chosen_view_counts"] == {"recent": 0, "event": 1, "history": 1} | |
| def test_official_correctness_contracts(tmp_path: Path) -> None: | |
| annotation = tmp_path / "ovo.json" | |
| annotation.write_text(json.dumps([ | |
| {"id": 1, "task": "EPM", "gt": 2}, | |
| {"id": 2, "task": "REC", "test_info": [{"count": 3}]}, | |
| {"id": 3, "task": "SSR", "test_info": [{"type": 0}, {"type": 1}]}, | |
| ])) | |
| gold = load_gold("ovo", annotation) | |
| assert is_correct("C", gold["ovo_1"]) | |
| assert is_correct("count = 3", gold["ovo_2_0"]) | |
| assert is_correct("N", gold["ovo_3_0"]) | |
| assert is_correct("Yes", gold["ovo_3_1"]) | |