Image-Text-to-Text
Transformers
Safetensors
English
panovlm
feature-extraction
fastvit
vision-language
linear-attention
conversational
custom_code
Instructions to use PanocularAI/PanoVLM-500M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PanocularAI/PanoVLM-500M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="PanocularAI/PanoVLM-500M", 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("PanocularAI/PanoVLM-500M", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PanocularAI/PanoVLM-500M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PanocularAI/PanoVLM-500M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PanocularAI/PanoVLM-500M", "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/PanocularAI/PanoVLM-500M
- SGLang
How to use PanocularAI/PanoVLM-500M 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 "PanocularAI/PanoVLM-500M" \ --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": "PanocularAI/PanoVLM-500M", "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 "PanocularAI/PanoVLM-500M" \ --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": "PanocularAI/PanoVLM-500M", "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 PanocularAI/PanoVLM-500M with Docker Model Runner:
docker model run hf.co/PanocularAI/PanoVLM-500M
| { | |
| "allow_neg_eigval": false, | |
| "architectures": [ | |
| "PanoVLMForConditionalGeneration" | |
| ], | |
| "attn_mode": "chunk", | |
| "auto_map": { | |
| "AutoConfig": "configuration_panovlm.PanoVLMConfig", | |
| "AutoImageProcessor": "image_processing_panovlm.PanoVLMImageProcessor", | |
| "AutoModel": "modeling_panovlm.PanoVLMForConditionalGeneration", | |
| "AutoModelForImageTextToText": "modeling_panovlm.PanoVLMForConditionalGeneration", | |
| "AutoProcessor": "processing_panovlm.PanoVLMProcessor" | |
| }, | |
| "bos_token_id": 1, | |
| "conv_bias": false, | |
| "conv_size": 4, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 2, | |
| "expand_v": 1.0, | |
| "fuse_bitlinear": true, | |
| "fuse_norm": true, | |
| "head_dim": 128, | |
| "hidden_size": 1024, | |
| "image_seq_length": 256, | |
| "image_size": 1024, | |
| "image_token_id": 32001, | |
| "lower_bound": -1.0, | |
| "max_position_embeddings": 131072, | |
| "mlp_hidden_dim": 2816, | |
| "model_type": "panovlm", | |
| "num_heads": 8, | |
| "num_hidden_layers": 24, | |
| "num_reserved_token_slots": 128, | |
| "num_v_heads": null, | |
| "pad_token_id": null, | |
| "projector_type": "linear", | |
| "rms_norm_eps": 1e-05, | |
| "safe_gate": true, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.8.1", | |
| "use_bitlinear": false, | |
| "use_lower_bound": false, | |
| "use_short_conv": true, | |
| "vision_config": { | |
| "cls_ratio": 2.0, | |
| "downsamples": [ | |
| false, | |
| true, | |
| true, | |
| true, | |
| true | |
| ], | |
| "embed_dims": [ | |
| 96, | |
| 192, | |
| 384, | |
| 768, | |
| 1536 | |
| ], | |
| "inference_mode": true, | |
| "layers": [ | |
| 2, | |
| 12, | |
| 24, | |
| 4, | |
| 2 | |
| ], | |
| "lkc_use_act": true, | |
| "mlp_ratios": [ | |
| 4, | |
| 4, | |
| 4, | |
| 4, | |
| 4 | |
| ], | |
| "norm_layer": { | |
| "func_args": [], | |
| "func_kwargs": { | |
| "eps": 1e-05 | |
| }, | |
| "func_name": "LayerNorm2d" | |
| }, | |
| "num_classes": 0, | |
| "pos_embs": [ | |
| null, | |
| null, | |
| null, | |
| { | |
| "func_args": [], | |
| "func_kwargs": { | |
| "spatial_shape": [ | |
| 7, | |
| 7 | |
| ] | |
| }, | |
| "func_name": "RepConditionalPosEnc" | |
| }, | |
| { | |
| "func_args": [], | |
| "func_kwargs": { | |
| "spatial_shape": [ | |
| 7, | |
| 7 | |
| ] | |
| }, | |
| "func_name": "RepConditionalPosEnc" | |
| } | |
| ], | |
| "se_downsamples": [ | |
| false, | |
| false, | |
| false, | |
| false, | |
| false | |
| ], | |
| "stem_use_scale_branch": false, | |
| "token_mixers": [ | |
| "repmixer", | |
| "repmixer", | |
| "repmixer", | |
| "attention", | |
| "attention" | |
| ] | |
| }, | |
| "vision_feature_dim": 3072, | |
| "vocab_size": 32000 | |
| } | |