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/docs/INSTALL.md from mis2/ViSS-8B: direct link, hf CLI and curl.
- Browser
- Download file 2.03 kB
-
https://huggingface.co/mis2/ViSS-8B/resolve/main/code/docs/INSTALL.md
- Command line
-
hf download hf://mis2/ViSS-8B/code/docs/INSTALL.md
-
curl -L -o INSTALL.md https://huggingface.co/mis2/ViSS-8B/resolve/main/code/docs/INSTALL.md
Installation
Use Python 3.10 or later. Run commands from the source root; editable installation keeps the configuration and script paths available.
CPU source checks
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
python -m pytest -q tests
These tests exercise code contracts with synthetic inputs. They do not validate a trained checkpoint or execute a full benchmark.
GPU inference
Install a CUDA-enabled PyTorch build appropriate for the machine first, then install the inference extras:
python -m pip install -e ".[inference]"
The inference extras pin PyTorch 2.7.0 and Transformers 4.57.3. The PyTorch version follows the repository runtime requirements; the Transformers version follows the retained ViSS model configuration. The extras declare Accelerate, qwen-vl-utils, and Decord as well. They specify an installation recipe, not a claim that every GPU/driver combination has been validated.
Install FFmpeg and ensure ffprobe is on PATH. Multi-GPU shell launchers
also use Bash 4 or newer, jq, sha256sum, and nvidia-smi.
Training and attention
python -m pip install -e ".[inference,training]"
python -m pip install flash-attn==2.7.4.post1 --no-build-isolation
FlashAttention installation needs a compatible CUDA toolkit and compiler.
The trainer defaults to flash_attention_2. Use --attn-implementation sdpa
for a development run when FlashAttention is unavailable; this changes the
runtime configuration.
The package includes no model weights. Before a GPU run, confirm that the
selected checkpoint loads with AutoModelForImageTextToText and that the
processor matches the intended evaluation contract.
Environment records
Save the installed package versions and launch command alongside your own
runs. Generated outputs belong under outputs/ or checkpoints/ and are
excluded from the source archive. Do not commit credentials, benchmark media,
or local machine paths.