Image-Text-to-Text
Transformers
Safetensors
English
Chinese
groundinganything_vlm
text-generation
visual-grounding
object-detection
referring-expression-comprehension
pointing
ocr
document-layout
custom-code
conversational
custom_code
Instructions to use GroundingPI/GroundAnything-VLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GroundingPI/GroundAnything-VLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="GroundingPI/GroundAnything-VLM", 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("GroundingPI/GroundAnything-VLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GroundingPI/GroundAnything-VLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GroundingPI/GroundAnything-VLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GroundingPI/GroundAnything-VLM", "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/GroundingPI/GroundAnything-VLM
- SGLang
How to use GroundingPI/GroundAnything-VLM 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 "GroundingPI/GroundAnything-VLM" \ --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": "GroundingPI/GroundAnything-VLM", "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 "GroundingPI/GroundAnything-VLM" \ --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": "GroundingPI/GroundAnything-VLM", "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 GroundingPI/GroundAnything-VLM with Docker Model Runner:
docker model run hf.co/GroundingPI/GroundAnything-VLM
Download checksums.sha256 from GroundingPI/GroundAnything-VLM: direct link, hf CLI and curl.
- Browser
- Download file 2.57 kB
-
https://huggingface.co/GroundingPI/GroundAnything-VLM/resolve/refs%2Fpr%2F5/checksums.sha256
- Command line
-
hf download hf://GroundingPI/GroundAnything-VLM@refs/pr/5/checksums.sha256
-
curl -L -o checksums.sha256 https://huggingface.co/GroundingPI/GroundAnything-VLM/resolve/refs%2Fpr%2F5/checksums.sha256
2.57 kB
| c419c191a33774f4e1f834b3fb36033dc84e8ba316a3d1935eed1fa529884a74 LICENSE | |
| 1a34a8e9a0fb2a1a59d65bf121c0d791221e4696f3f5d99a5d29427b1e8bcb64 README.md | |
| 7316e325dde0dd407bcc80ed5d3d080223e54572a4685b2aa1ee52041e41d466 added_tokens.json | |
| a0bc6f6fc7a29a80017a433e8f03a1cc1236e838a944a2d034295a60c4f2fddb chat_template.jinja | |
| 2a23a7cf76128488c8866582bab06ffb1db387f7f7de82e06fafea65514ce10d config.json | |
| 7ad33532c846fdd81dd41a6ba54db54e3c47cada50472d732ba91eaede725323 configuration_groundinganything.py | |
| 6b255ff08426effe581833b3809bf2232cac9eb93d1e5cf83fff76ce62791e38 configuration_groundinganything_vision.py | |
| 42e0cb3d5a6a9e5c93c20555739f1038753ba1adb139c5c82a3a9f3b39ed5eab generation_config.json | |
| 33cb222671104ec4f0d3d234a3db7561b94d11543089d5f250c14a2f1b8651c3 image_processing_groundinganything.py | |
| 78403540328f9847d6b7ebc5c44eb2e6a752863de0afb7d0710728bb161dc60d media_utils.py | |
| 8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5 merges.txt | |
| 10ddf16622bfbf7822b5185991acf6a767d80a3e121b35f7ade89bb2a56b85f0 model-00001-of-00002.safetensors | |
| bea2c7937fec8c3e3aaa297bffc079550d6dd97ecd2d4ae8934662ae0775c29a model-00002-of-00002.safetensors | |
| c7845f2a74a6c57a6e58e71c963344446d777601767dc8e81259dbd3b63686f7 model.safetensors.index.json | |
| 86ba0522e32bcf5d512f8e7dcc529abd22a39f10d55fa8327efcb65cbd758a67 modeling_groundinganything.py | |
| a839e10631620ae5fe70ec3aa9d009af521f7ea03faa66b32adce287105003be modeling_groundinganything_vision.py | |
| 25bb3df57b6e161612335b9e138ce2dbbccbf3c763d92136ac3ca902d81521a1 preprocessor_config.json | |
| 90e533272ff79d068ce922e9156e5d83f3cf2cc9e565af37b135c09e9fe57b81 processing_groundinganything.py | |
| 534931ef99997dec0735da46a570a45696cfee6dace291cc9fa9a2da24420685 requirements.txt | |
| 8d9ceecd9136834e5f55184b2a3f58ea1047f9b27f0d23fb29bcad50257b006d special_tokens_map.json | |
| 5d9a9d7525aeecc0360ffd43f891ce9d2220297df5092a293a98e2fd31e9d99d streammind_gate.py | |
| 1a45e3949a652ba4fa8e65017b134404adee1146e1c61fa05e55cdcfa1279e01 tokenizer.json | |
| d9089e4621f850e727a86c64110730d10feb459a9532e8bd8b77c8303d417bd3 tokenizer_config.json | |
| ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910 vocab.json | |
| cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE-Apache-2.0 | |
| 20c797ce19af0c17de52c6afb144644768a591c521655f5ebf5712c9850f2887 LICENSE-Kimi-K3 | |
| cddaec9f528f9ebf5ac627850eefcb3f14ee55e168776a1b650f91353ce8293e assets/demo.mp4 | |
| 3c282238bb1598093c078e57dcc1db4b3ce8fb1f39db6c09ca90e0686f1043a2 assets/demo-poster.jpg | |
| e0f0bbfa420324807403cfffe5ce664a33675c4e569de71b82cac7fb3b750f3e assets/fig1-teaser.png | |