Image-Text-to-Text
Transformers
Safetensors
English
visionpsynano
feature-extraction
vision-language-model
multimodal
edge
on-device
nanovlm
vqa
conversational
custom_code
Instructions to use qvac/VisionPsy-Nano-460M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qvac/VisionPsy-Nano-460M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="qvac/VisionPsy-Nano-460M", 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("qvac/VisionPsy-Nano-460M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use qvac/VisionPsy-Nano-460M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qvac/VisionPsy-Nano-460M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qvac/VisionPsy-Nano-460M", "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/qvac/VisionPsy-Nano-460M
- SGLang
How to use qvac/VisionPsy-Nano-460M 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 "qvac/VisionPsy-Nano-460M" \ --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": "qvac/VisionPsy-Nano-460M", "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 "qvac/VisionPsy-Nano-460M" \ --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": "qvac/VisionPsy-Nano-460M", "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 qvac/VisionPsy-Nano-460M with Docker Model Runner:
docker model run hf.co/qvac/VisionPsy-Nano-460M
| { | |
| "add_prefix_space": false, | |
| "backend": "tokenizers", | |
| "bos_token": "<|im_start|>", | |
| "clean_up_tokenization_spaces": false, | |
| "eos_token": "<|im_end|>", | |
| "errors": "replace", | |
| "global_image_token": "<|global_image|>", | |
| "image_token": "<|image|>", | |
| "is_local": false, | |
| "local_files_only": false, | |
| "model_max_length": 8192, | |
| "model_specific_special_tokens": { | |
| "global_image_token": "<|global_image|>", | |
| "image_token": "<|image|>", | |
| "r1c1": "<row_1_col_1>", | |
| "r1c2": "<row_1_col_2>", | |
| "r1c3": "<row_1_col_3>", | |
| "r1c4": "<row_1_col_4>", | |
| "r1c5": "<row_1_col_5>", | |
| "r1c6": "<row_1_col_6>", | |
| "r1c7": "<row_1_col_7>", | |
| "r1c8": "<row_1_col_8>", | |
| "r2c1": "<row_2_col_1>", | |
| "r2c2": "<row_2_col_2>", | |
| "r2c3": "<row_2_col_3>", | |
| "r2c4": "<row_2_col_4>", | |
| "r2c5": "<row_2_col_5>", | |
| "r2c6": "<row_2_col_6>", | |
| "r2c7": "<row_2_col_7>", | |
| "r2c8": "<row_2_col_8>", | |
| "r3c1": "<row_3_col_1>", | |
| "r3c2": "<row_3_col_2>", | |
| "r3c3": "<row_3_col_3>", | |
| "r3c4": "<row_3_col_4>", | |
| "r3c5": "<row_3_col_5>", | |
| "r3c6": "<row_3_col_6>", | |
| "r3c7": "<row_3_col_7>", | |
| "r3c8": "<row_3_col_8>", | |
| "r4c1": "<row_4_col_1>", | |
| "r4c2": "<row_4_col_2>", | |
| "r4c3": "<row_4_col_3>", | |
| "r4c4": "<row_4_col_4>", | |
| "r4c5": "<row_4_col_5>", | |
| "r4c6": "<row_4_col_6>", | |
| "r4c7": "<row_4_col_7>", | |
| "r4c8": "<row_4_col_8>", | |
| "r5c1": "<row_5_col_1>", | |
| "r5c2": "<row_5_col_2>", | |
| "r5c3": "<row_5_col_3>", | |
| "r5c4": "<row_5_col_4>", | |
| "r5c5": "<row_5_col_5>", | |
| "r5c6": "<row_5_col_6>", | |
| "r5c7": "<row_5_col_7>", | |
| "r5c8": "<row_5_col_8>", | |
| "r6c1": "<row_6_col_1>", | |
| "r6c2": "<row_6_col_2>", | |
| "r6c3": "<row_6_col_3>", | |
| "r6c4": "<row_6_col_4>", | |
| "r6c5": "<row_6_col_5>", | |
| "r6c6": "<row_6_col_6>", | |
| "r6c7": "<row_6_col_7>", | |
| "r6c8": "<row_6_col_8>", | |
| "r7c1": "<row_7_col_1>", | |
| "r7c2": "<row_7_col_2>", | |
| "r7c3": "<row_7_col_3>", | |
| "r7c4": "<row_7_col_4>", | |
| "r7c5": "<row_7_col_5>", | |
| "r7c6": "<row_7_col_6>", | |
| "r7c7": "<row_7_col_7>", | |
| "r7c8": "<row_7_col_8>", | |
| "r8c1": "<row_8_col_1>", | |
| "r8c2": "<row_8_col_2>", | |
| "r8c3": "<row_8_col_3>", | |
| "r8c4": "<row_8_col_4>", | |
| "r8c5": "<row_8_col_5>", | |
| "r8c6": "<row_8_col_6>", | |
| "r8c7": "<row_8_col_7>", | |
| "r8c8": "<row_8_col_8>" | |
| }, | |
| "pad_token": "<|im_end|>", | |
| "processor_class": "VisionPsyNanoProcessor", | |
| "r1c1": "<row_1_col_1>", | |
| "r1c2": "<row_1_col_2>", | |
| "r1c3": "<row_1_col_3>", | |
| "r1c4": "<row_1_col_4>", | |
| "r1c5": "<row_1_col_5>", | |
| "r1c6": "<row_1_col_6>", | |
| "r1c7": "<row_1_col_7>", | |
| "r1c8": "<row_1_col_8>", | |
| "r2c1": "<row_2_col_1>", | |
| "r2c2": "<row_2_col_2>", | |
| "r2c3": "<row_2_col_3>", | |
| "r2c4": "<row_2_col_4>", | |
| "r2c5": "<row_2_col_5>", | |
| "r2c6": "<row_2_col_6>", | |
| "r2c7": "<row_2_col_7>", | |
| "r2c8": "<row_2_col_8>", | |
| "r3c1": "<row_3_col_1>", | |
| "r3c2": "<row_3_col_2>", | |
| "r3c3": "<row_3_col_3>", | |
| "r3c4": "<row_3_col_4>", | |
| "r3c5": "<row_3_col_5>", | |
| "r3c6": "<row_3_col_6>", | |
| "r3c7": "<row_3_col_7>", | |
| "r3c8": "<row_3_col_8>", | |
| "r4c1": "<row_4_col_1>", | |
| "r4c2": "<row_4_col_2>", | |
| "r4c3": "<row_4_col_3>", | |
| "r4c4": "<row_4_col_4>", | |
| "r4c5": "<row_4_col_5>", | |
| "r4c6": "<row_4_col_6>", | |
| "r4c7": "<row_4_col_7>", | |
| "r4c8": "<row_4_col_8>", | |
| "r5c1": "<row_5_col_1>", | |
| "r5c2": "<row_5_col_2>", | |
| "r5c3": "<row_5_col_3>", | |
| "r5c4": "<row_5_col_4>", | |
| "r5c5": "<row_5_col_5>", | |
| "r5c6": "<row_5_col_6>", | |
| "r5c7": "<row_5_col_7>", | |
| "r5c8": "<row_5_col_8>", | |
| "r6c1": "<row_6_col_1>", | |
| "r6c2": "<row_6_col_2>", | |
| "r6c3": "<row_6_col_3>", | |
| "r6c4": "<row_6_col_4>", | |
| "r6c5": "<row_6_col_5>", | |
| "r6c6": "<row_6_col_6>", | |
| "r6c7": "<row_6_col_7>", | |
| "r6c8": "<row_6_col_8>", | |
| "r7c1": "<row_7_col_1>", | |
| "r7c2": "<row_7_col_2>", | |
| "r7c3": "<row_7_col_3>", | |
| "r7c4": "<row_7_col_4>", | |
| "r7c5": "<row_7_col_5>", | |
| "r7c6": "<row_7_col_6>", | |
| "r7c7": "<row_7_col_7>", | |
| "r7c8": "<row_7_col_8>", | |
| "r8c1": "<row_8_col_1>", | |
| "r8c2": "<row_8_col_2>", | |
| "r8c3": "<row_8_col_3>", | |
| "r8c4": "<row_8_col_4>", | |
| "r8c5": "<row_8_col_5>", | |
| "r8c6": "<row_8_col_6>", | |
| "r8c7": "<row_8_col_7>", | |
| "r8c8": "<row_8_col_8>", | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "unk_token": "<|endoftext|>", | |
| "vocab_size": 49152 | |
| } | |