Image-Text-to-Text
Transformers
Safetensors
internvl_chat
feature-extraction
internvl
vllm
compressed-tensors
w4a16
bf16vision
ampere
rtx
conversational
custom_code
Instructions to use useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision", trust_remote_code=True) 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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision", "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/useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision
- SGLang
How to use useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision 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 "useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision" \ --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": "useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision", "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 "useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision" \ --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": "useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision", "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 useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision with Docker Model Runner:
docker model run hf.co/useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision
InternVL3_5-4B-Instruct W4A16 BF16-Vision
Ampere-friendly serving build of OpenGVLab/InternVL3_5-4B-Instruct.
Text-side linears are compressed-tensors W4A16. The vision tower and multimodal connector stay BF16.
Stock proof
docker run --rm -it \
--gpus all \
--ipc=host \
-p 8001:8000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
vllm/vllm-openai:latest \
OpenGVLab/InternVL3_5-4B-Instruct \
--served-model-name InternVL3_5-4B-Instruct-stock \
--trust-remote-code \
--dtype bfloat16 \
--max-model-len 4096
Use
docker run --rm -it \
--gpus all \
--ipc=host \
-p 8001:8000 \
-v /path/to/InternVL3_5-4B-Instruct-W4A16-BF16Vision:/model \
-v ~/.cache/huggingface:/root/.cache/huggingface \
vllm/vllm-openai:latest \
--model /model \
--served-model-name InternVL3_5-4B-Instruct-W4A16-BF16Vision \
--trust-remote-code \
--dtype bfloat16 \
--quantization compressed-tensors \
--max-model-len 4096 \
--limit-mm-per-prompt '{"image":1}' \
--allowed-local-media-path /
Smoke test
python verify.py --url http://localhost:8001/v1/chat/completions
Notes
- Built for RTX 30xx/40xx Ampere cards.
- Vision stays BF16 on disk and at runtime.
- The repo includes the calibration corpus and local
smoke_image.pngasset used for verification; the image test uses that file directly.
- Downloads last month
- 51
Model tree for useful-quants/InternVL3_5-4B-Instruct-W4A16-BF16Vision
Base model
OpenGVLab/InternVL3_5-4B-Pretrained Finetuned
OpenGVLab/InternVL3_5-4B-Instruct